bug#17035: [PATCH] chmod -c -R produces errors with special permissions

2014-03-18 Thread Dylan Alex Simon
chmod sometimes tries to stat files in the wrong directory when reporting changes: mkdir -p a/b chmod -R g+s a/b # requires some special permission bit set first chmod -c -R g+w a chmod: getting new attributes of 'b': No such file or directory A fix is attached. From

bug#17035: [PATCH] chmod -c -R produces errors with special permissions

2014-03-18 Thread Pádraig Brady
On 03/18/2014 04:06 PM, Dylan Alex Simon wrote: chmod sometimes tries to stat files in the wrong directory when reporting changes: mkdir -p a/b chmod -R g+s a/b # requires some special permission bit set first chmod -c -R g+w a chmod: getting new attributes of 'b': No such file or

bug#17035: [PATCH] chmod -c -R produces errors with special permissions

2014-03-18 Thread Bernhard Voelker
On 03/18/2014 07:45 PM, Pádraig Brady wrote: The fix looks good. It seems this bug was introduced with the change to FTS in 5.1.0 (released Dec 2003) Wasn't it commit v5.2.1-690-gbc580f6? I'll push soon in your name with these changes merged in. $ git diff HEAD@{1} diff --git a/NEWS

bug#17035: [PATCH] chmod -c -R produces errors with special permissions

2014-03-18 Thread Bernhard Voelker
On 03/18/2014 07:45 PM, Pádraig Brady wrote: @@ -121,7 +121,7 @@ mode_changed (int dirfd, char const *file, char const *file_full_name, struct stat new_stats; - if (fstatat (dirfd, file, new_stats, 0) != 0) + if (fstatat (dir_fd, file, new_stats, 0) != 0) {

bug#17035: [PATCH] chmod -c -R produces errors with special permissions

2014-03-18 Thread Jim Meyering
On Tue, Mar 18, 2014 at 11:45 AM, Pádraig Brady p...@draigbrady.com wrote: diff --git a/tests/chmod/c-option.sh b/tests/chmod/c-option.sh ... +# This should never warn, but in did when special +# bits are set on b (the common case under test) +chmod -c -R g+w a 2err +test -s err fail=1

bug#17035: [PATCH] chmod -c -R produces errors with special permissions

2014-03-18 Thread Pádraig Brady
On 03/18/2014 10:18 PM, Bernhard Voelker wrote: On 03/18/2014 07:45 PM, Pádraig Brady wrote: The fix looks good. It seems this bug was introduced with the change to FTS in 5.1.0 (released Dec 2003) Wasn't it commit v5.2.1-690-gbc580f6? I think that restricted the issue to if (new_mode

bug#17035: [PATCH] chmod -c -R produces errors with special permissions

2014-03-18 Thread Pádraig Brady
On 03/18/2014 11:36 PM, Jim Meyering wrote: compare /dev/null err || fail=1 Yes better thanks

bug#17035: [PATCH] chmod -c -R produces errors with special permissions

2014-03-18 Thread Pádraig Brady
On 03/18/2014 11:41 PM, Pádraig Brady wrote: On 03/18/2014 10:18 PM, Bernhard Voelker wrote: On 03/18/2014 07:45 PM, Pádraig Brady wrote: The fix looks good. It seems this bug was introduced with the change to FTS in 5.1.0 (released Dec 2003) Wasn't it commit v5.2.1-690-gbc580f6? I think