[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in tidy section
From: |
Bas van der Vlies |
Subject: |
Re: Bug in tidy section |
Date: |
Wed, 18 Sep 2002 17:04:46 +0200 |
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 in tidy section, Bas van der Vlies, 2002/09/18
- Re: Bug in tidy section,
Bas van der Vlies <=