summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2006-01-11(fts_stat): When following a symlink-to-directory,Jim Meyering
don't interpret all stat-fails+lstat-succeeds as indicating a dangling symlink. That can also happen at least for ELOOP. The fix: return FTS_SLNONE only when the stat errno is ENOENT.
2006-01-11*** empty log message ***Jim Meyering
2006-01-11(fts_open): Put new (2006-01-04) maxarglen declaration and uses in theirJim Meyering
own block, so pre-c99 compilers don't object.
2006-01-11*** empty log message ***Jim Meyering
2006-01-11[!_LIBC]: Include "fcntl--.h", to map open to open_safer.Jim Meyering
2006-01-11*** empty log message ***Jim Meyering
2006-01-11(fchmodat, fchownat): Declare.Jim Meyering
(chmodat, lchmodat): Define convenience functions. (chownat, lchownat): Likewise.
2006-01-11(fchownat): New function.Jim Meyering
2006-01-11(fchmodat): New file and function.Jim Meyering
2006-01-11*** empty log message ***Jim Meyering
2006-01-11(OP): Remove useless space-before-TAB.Jim Meyering
2006-01-10Sync from gnulib.Paul Eggert
2006-01-10Update copyright year.Paul Eggert
2006-01-10Remove stray "lib/"s in previous change.Paul Eggert
2006-01-10Sync from gnulib.Paul Eggert
2006-01-10*** empty log message ***Jim Meyering
2006-01-10Avoid the double-free (first in fts_read, second in fts_close) thatJim Meyering
would occur when an `active' directory is made inaccessible (e.g., via chmod a-x) during a traversal. (fts_read): After a failed fchdir, update sp->fts_cur before returning. Reproduce this failure by mkdir -p a/b; cd a; chmod a-x . b Reported by Stavros Passas.
2006-01-10*** empty log message ***Jim Meyering
2006-01-09fix typo in commentJim Meyering
2006-01-06*** empty log message ***Jim Meyering
2006-01-06(COPYRIGHT_YEAR): Update to 2006.Jim Meyering
2006-01-04.Jim Meyering
2006-01-04(tzname): Don't declare if it is already #defined.Paul Eggert
2006-01-04*** empty log message ***Jim Meyering
2006-01-04Merge from glibc.Jim Meyering
(fts_open): Avoid function call in MAX macro use.
2006-01-03(xtime_make, xtime_nonnegative_nsec, xtime_nsec): UsePaul Eggert
long int, not int, for nanosecond counts, so that people who are used to POSIX struct timespec won't be surprised.
2006-01-03correct first-line commentJim Meyering
2006-01-02New approach to safer chmod.Paul Eggert
2006-01-02No longer used.Paul Eggert
2006-01-02New file.Paul Eggert
2006-01-02Include lchmod.h, lchmod.c.Paul Eggert
(make_dir_parents): Use lchown rather than chown, and lchmod rather than chmod.
2005-12-27chdir-related fixesPaul Eggert
2005-12-27(save_cwd): Don't bother trying to open directoryPaul Eggert
for write access: POSIX says that must fail.
2005-12-27(rpl_chown) [CHOWN_MODIFIES_SYMLINK]:Paul Eggert
Don't try O_WRONLY unless O_RDONLY failed wth EACCES. Fall back on chown if open failed with EACCES.
2005-12-27(defined_S_IFMT): New macro.Paul Eggert
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.
2005-12-27(diropen): Don't bother trying to open directory for write access:Paul Eggert
POSIX says that must fail.
2005-12-27(chdir_no_follow): Don't bother trying to open directory for writePaul Eggert
access: POSIX says that must fail.
2005-12-27(cdb_free): Don't bother trying to open directoryPaul Eggert
for write access: POSIX says that must fail. (cdb_free): Open with O_NOCTTY | O_NONBLOCK as well, for minor improvements on hosts that lack O_DIRECTORY.
2005-12-26(chdir_no_follow): Move declaration of local,Jim Meyering
sb2, `down' into the scope where it is used. Note that on some systems this function also fails when DIR is a writable-yet-unreadable directory.
2005-12-26*** empty log message ***Jim Meyering
2005-12-25chdir-safer.c still needs unistd.hPaul Eggert
2005-12-25Whoops; don't remove the include for unistd.h, since it defines fchdir.Paul Eggert
2005-12-25chdir-safer cleanupPaul Eggert
2005-12-25(chdir_no_follow): Don't include stdio.h, assert.h,Paul Eggert
unistd.h, fcntl--.h; not needed. (O_DIRECTORY): Define if not already defined. (chdir_no_follow): Revamp describing comment to match code more closely. Redo use of internal vars to avoid lint complaints. Work even if directory is writeable but not readable. Open with O_DIRECTORY | O_NOCTTY, for benefit of hosts that don't have O_NOFOLLOW. Use O_NONBLOCK (POSIX spelling) rather than O_NDELAY. Don't bother invoking fstat if open does not dereference symlink, since the result isn't used then. Don't assume file descriptor is positive; it might be zero now that we no longer include fcntl--.h (we don't need fcntl--.h since we immediately close the descriptor).
2005-12-25(FCHMOD_SAFER_H): Remove: it was misnamed, and wasn't needed anyay.Paul Eggert
2005-12-25*** empty log message ***Jim Meyering
2005-12-25(chdir_no_follow): Remove unnecessary test of S_ISDIR (sb_init.st_mode).Jim Meyering
2005-12-23*** empty log message ***Jim Meyering
2005-12-23(make_dir_parents): Use chdir_no_follow onlyJim Meyering
if we've just created the directory.
2005-12-23*** empty log message ***Jim Meyering