summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-12-27 08:00:42 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-12-27 08:00:42 +0000
commiteb330d25844d5dba0b3f24fb7ca470d783d5bfe7 (patch)
tree6fd1375f2151a4eeea1d6ffb45b35eb5bee6ed76
parent3f11d67a569b4cf14a9c4bf3e5b1bb80799be00f (diff)
downloadcoreutils-eb330d25844d5dba0b3f24fb7ca470d783d5bfe7.tar.xz
chdir-related fixes
-rw-r--r--ChangeLog13
-rw-r--r--lib/ChangeLog25
2 files changed, 37 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9df87dc49..0e5b0b4a5 100644
--- 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.
diff --git a/lib/ChangeLog b/lib/ChangeLog
index ff51f7ebe..a6fde0dea 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -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,