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

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



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.


Cheers

-- 
Leo "costela" Antunes
[insert a witty retort here]


Reply to: