Subject: Re: CVS commit: pkgsrc/graphics/xart
To: Christoph Badura <bad@bsd.de>
From: Roland Illig <rillig@NetBSD.org>
List: pkgsrc-changes
Date: 01/10/2007 10:35:19
Christoph Badura wrote:
> On Mon, Jan 08, 2007 at 01:40:23AM +0000, Roland Illig wrote:
> 
>>Modified Files:
>>	pkgsrc/graphics/xart: Makefile
> 
> 
>>Log Message:
>>When fixing file permissions with find | xargs, there is always a race
>>condition. Fixed this by using find -exec for the directories.
> 
> 
> Exactly what race condition are you talking about?

There have been directories that had been extracted with mode 415 (or 
similar, at least non-executable for the user). These directories also 
had subdirectories.

mkdir dir
mkdir dir/subdir
touch dir/subdir/file
chmod 123 dir/subdir/file
chmod 444 dir/subdir
chmod 400 dir

When find(1) iterated over such a directory, it couldn't change to the 
subdirectories to fix their permissions, too, because the directory was 
still non-executable at that point.

$ find . -print