Age | Commit message (Collapse) | Author | |
---|---|---|---|
2005-12-29 | add src/system.h | Jim Meyering | |
2005-12-28 | . | Jim Meyering | |
2005-12-28 | *** empty log message *** | Jim Meyering | |
2005-12-28 | (EXTRA_DIST): Add .x-sc_prohibit_assert_without_use. | Jim Meyering | |
2005-12-28 | (sc_obsolete_symbols): Prohibit use of O_NDELAY. | Jim Meyering | |
(sc_prohibit_assert_without_use): New rule. (syntax-check-rules): Add it to the list. (CVS_LIST): Define in terms of $(srcdir). | |||
2005-12-28 | Don't include <assert.h>; it wasn't used. | Jim Meyering | |
2005-12-27 | chdir-related fixes | Paul Eggert | |
2005-12-27 | (wipename): Use similar open flags to other places we open directories. | Paul Eggert | |
Don't bother trying to open dir for writing, since POSIX prohibits it. | |||
2005-12-27 | (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY | Paul Eggert | |
| O_NOFOLLOW too, for consistency with other dir-openers. Use POSIX-preferred O_NONBLOCK rather than O_NDELAY. (is_empty_dir): Likewise. | |||
2005-12-27 | (restricted_chown): | Paul Eggert | |
Don't try O_WRONLY unless O_RDONLY failed wth EACCES. | |||
2005-12-27 | (save_cwd): Don't bother trying to open directory | Paul 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 write | Paul Eggert | |
access: POSIX says that must fail. | |||
2005-12-27 | (cdb_free): Don't bother trying to open directory | Paul 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-25 | chdir-safer.c still needs unistd.h | Paul Eggert | |
2005-12-25 | Whoops; don't remove the include for unistd.h, since it defines fchdir. | Paul Eggert | |
2005-12-25 | chdir-safer cleanup | Paul 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 | (TESTS): Add p-thru-slink | Jim Meyering | |
2005-12-23 | New file. Test for today's mkdir-p.c fix. | Jim Meyering | |
2005-12-23 | *** empty log message *** | Jim Meyering | |
2005-12-23 | (make_dir_parents): Use chdir_no_follow only | Jim Meyering | |
if we've just created the directory. | |||
2005-12-23 | *** empty log message *** | Jim Meyering | |
2005-12-23 | *** empty log message *** | Jim Meyering | |
2005-12-23 | (chdir_no_follow): Rewrite to use fchdir even | Jim Meyering | |
when O_NOFOLLOW is not defined. Suggested by Eric Blake. | |||
2005-12-23 | *** empty log message *** | Jim Meyering | |
2005-12-23 | (O_NOFOLLOW): Define, if necessary. | Jim Meyering | |
2005-12-23 | (O_NOFOLLOW): Define. | Jim Meyering | |
2005-12-22 | *** empty log message *** | Jim Meyering | |
2005-12-22 | *** empty log message *** | Jim Meyering | |
2005-12-22 | redirect stderr to /dev/full, too (to suppress write error diagnostic) | Jim Meyering | |
2005-12-22 | *** empty log message *** | Jim Meyering | |
2005-12-22 | Include "fcntl--.h" and "unistd--.h", to map open | Jim Meyering | |
and dup to open_safer and dup_safer, respectively. (openat_permissive): Fix typo in comment. | |||
2005-12-21 | . | Jim Meyering | |
2005-12-21 | *** empty log message *** | Jim Meyering | |
2005-12-21 | Require gl_CHDIR_SAFER. | Jim Meyering | |
2005-12-21 | . | Jim Meyering | |
2005-12-21 | *** empty log message *** | Jim Meyering | |
2005-12-21 | like chdir(2), but safer, if possible | Jim Meyering | |
2005-12-20 | *** empty log message *** | Jim Meyering | |
2005-12-20 | (RW_USR): Remove definition. | Jim Meyering | |
(make_dir_parents): Use S_IRWXU, now that read access is also required. Avoid a race condition, on systems where open honors O_NOFOLLOW. (make_dir_parents): Include chdir-safer.h. Use chdir_no_follow in place of chdir. | |||
2005-12-20 | *** empty log message *** | Jim Meyering | |
2005-12-20 | (make_dir_parents): Remove unnecessary casts of alloca, | Jim Meyering | |
since now it's guaranteed to be (void *). |