[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: on the use of chmod/chown in maintainer scripts



On Sun, 13 May 2012, Leo "costela" Antunes wrote:

> Hi,
> 
> On 12/05/12 12:23, Peter Palfrader wrote:
> > This may not be entirely trivial to solve.  find | xargs constructs at best
> > mitigate this to a race.  While chown does have a --no-derefence flag, this
> > does not protect us in the case of hardlinks.  chmod has no such flag, and it'd
> > useful only for symlinks anyway.  Neither tool has a --only-if-link-count-is-one
> > flag.
> 
> >From find(1):
> -links n
> 	File has n links.
> 
> So I guess this specific problem could theoretically be solved this way.
> However, I'm actually also for a more general solution, as being
> discussed for dpkg or at least debhelper.
This creates just a race condition.

Alex
 


Reply to: