[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in tidy section
From: |
Mark . Burgess |
Subject: |
Re: Bug in tidy section |
Date: |
Fri, 20 Sep 2002 08:26:36 +0200 (MET DST) |
Yes, you break a security check. I'll look at this sometime soon.
M
On 18 Sep, Bas van der Vlies wrote:
> On Wed, 18 Sep 2002 10:41:02 +0200
> Bas van der Vlies <address@hidden> wrote:
>
>> cfengine 2.0.4
>>
>> I want to delete links with the tidy command. I have specified
>> dirlinks=tidy and links=tidy. But no links will be deleted even
>> if they point to a non-existent file.
>>
>> This is from the manual:
>> The value links=tidy has the same effect as the -L command line option
>> except that here it may be specified per item rather than globally.
>> Setting
>> this value causes links which point to non-existent files to be deleted.
>> This feature will not work on commands with the home wildcard feature. If
>> you want to clean up old links you should either user a files command or
>> the command line option which sets the tidy feature globally.
>>
>> I have done some research in tidy.c function RecursiveTidySpecialArea()
>> there is check for the owner of a link:
>> if (S_ISLNK(statbuf.st_mode) && (statbuf.st_mode != getuid()))
>> {
>> snprintf(OUTPUT,bufsize,"File %s is an untrusted link. cfagent
>> will not follow it with a destructive operation (tidy)",pcwd);
>> continue;
>> }
>> }
>>
> I removed this check completely and now it deletes the links. Did a broke
> something else?
>
>
> --
> ********************************************************************
> * *
> * Bas van der Vlies e-mail: address@hidden *
> * SARA - Academic Computing Services phone: +31 20 592 8012 *
> * Kruislaan 415 fax: +31 20 6683167 *
> * 1098 SJ Amsterdam *
> * *
> ********************************************************************
>
>
> _______________________________________________
> Bug-cfengine mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-cfengine
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272 Email: address@hidden
Fax : +47 22453205 WWW : http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~