]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
chdir-related fixes
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 27 Dec 2005 08:00:42 +0000 (08:00 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 27 Dec 2005 08:00:42 +0000 (08:00 +0000)
ChangeLog
lib/ChangeLog

index 9df87dc498c2b66e7f7743dc0bb76151518ea817..0e5b0b4a52cc13aa5e52f8368a4d13ce68c081aa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,18 @@
-2005-12-22  Jim Meyering  <jim@meyering.net>
+2005-12-26  Paul Eggert  <eggert@cs.ucla.edu>
 
        * Version 6.0-cvs.
 
+       * src/chown-core.c (restricted_chown):
+       Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
+       * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
+       | O_NOFOLLOW too, for consistency with other dir-openers.
+       Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
+       (is_empty_dir): Likewise.
+       * src/shred.c (wipename): Likewise.  Don't bother trying to open
+       dir for writing, since POSIX prohibits it.
+
+2005-12-22  Jim Meyering  <jim@meyering.net>
+
        * tests/help-version: Redirect stderr to /dev/full, to suppress
        write error diagnostic.
 
index ff51f7ebe433e67a5a691d33eae3e61bbc064372..a6fde0deade92ce9fae148bb61114c7993676eaa 100644 (file)
@@ -1,3 +1,28 @@
+2005-12-26  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * chdir-long.c (cdb_free): Don't bother trying to open directory
+       for write access: POSIX says that must fail.
+       * chdir-safer.c (chdir_no_follow): Likewise.
+       * fts.c (diropen): Likewise.
+       * save-cwd.c (save_cwd): Likewise.
+       * chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
+       well, for minor improvements on hosts that lack O_DIRECTORY.
+       * chmod-safer.c (defined_S_IFMT): New macro.
+       Include stat-macros.h.
+       Include stdlib.h, for abort().
+       Don't include stdio.h or assert.h; no longer needed.
+       (same_file_type): Don't assume S_IFMT is defined, as POSIX
+       does not require this.  Don't assume S_IFCHR and S_IFBLK have
+       their usual sort of bit pattern.
+       (fchmod_new): Open with O_NOCTTY for as well, for minor
+       improvement on hosts where that matters.  Don't bother to assert,
+       since the caller (in this source file) checks the same thing.
+       Discard any errno from a close failure, for consistency with other
+       code.
+       * chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
+       Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
+       Fall back on chown if open failed with EACCES.
+
 2005-12-26  Jim Meyering  <jim@meyering.net>
 
        * chdir-safer.c (chdir_no_follow): Move declaration of local,