GNU bug report logs - #18280
chmod: fix symlink race condition

Previous Next

Package: coreutils;

Reported by: Tobias Stoeckmann <tobias <at> stoeckmann.org>

Date: Sat, 16 Aug 2014 17:47:02 UTC

Severity: wishlist

Tags: patch

Merged with 11108, 32772

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Tobias Stoeckmann <tobias <at> stoeckmann.org>
Cc: 18280 <at> debbugs.gnu.org
Subject: bug#18280: chmod: race condition
Date: Sun, 17 Aug 2014 07:45:48 -0700
Tobias Stoeckmann wrote:
> For me, it sounds like configure should run a functionality test, calling
> fchmodat with AT_SYMLINK_NOFOLLOW and see if it fails and ENOTSUP is set
> in errno.  In that case, don't call fchmodat or force 0 for flags,
> otherwise use AT_SYMLINK_NOFOLLOW.

Yes, that sounds like a reasonable way to move forward.  At least, that 
is what I was thinking of doing in 2012.  I never got around to it, 
partly because (although it's an improvement) it's not a complete fix 
for the race.




This bug report was last modified 1 year and 118 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.