]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
chmod: undo previous change
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 28 Mar 2012 20:26:12 +0000 (13:26 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 28 Mar 2012 20:26:58 +0000 (13:26 -0700)
It's not portable; see <http://bugs.gnu.org/11108#17>.
* src/chmod.c, NEWS: Undo previous change.

NEWS
src/chmod.c

diff --git a/NEWS b/NEWS
index 40dadc27d4674b094c5de60e3955e12f2ac047aa..c8d2bbcf07ee1482b4dbb9a10e12203d37744b0a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,12 +2,6 @@ GNU coreutils NEWS                                    -*- outline -*-
 
 * Noteworthy changes in release ?.? (????-??-??) [?]
 
-** Bug fixes
-
-  When recursing, chmod -R no longer gets confused into following a symlink
-  if some other process simultaneously replaces a non-symlink with a symlink.
-  The fix is effective on modern hosts with the fchmodat or lchmod syscalls.
-  [bug introduced in the beginning]
 
 * Noteworthy changes in release 8.16 (2012-03-26) [stable]
 
index 2e1f1c70b65fab77a43e174a086d14cc69efe7fe..aa4ac771c700157148b9ac1e6a4f8b3e23959e5e 100644 (file)
@@ -268,15 +268,7 @@ process_file (FTS *fts, FTSENT *ent)
 
       if (! S_ISLNK (old_mode))
         {
-          /* Use any native support for AT_SYMLINK_NOFOLLOW, to avoid
-             following a symlink if there is a race.  */
-          #if HAVE_FCHMODAT || HAVE_LCHMOD
-          int follow_flag = AT_SYMLINK_NOFOLLOW;
-          #else
-          int follow_flag = 0;
-          #endif
-
-          if (fchmodat (fts->fts_cwd_fd, file, new_mode, follow_flag) == 0)
+          if (chmodat (fts->fts_cwd_fd, file, new_mode) == 0)
             chmod_succeeded = true;
           else
             {