Commit Graph
24019 Commits
Author SHA1 Message Date
Jim Meyering d789e78a75 (chdir_no_follow): Remove unnecessary test of S_ISDIR (sb_init.st_mode). 2005-12-25 17:33:57 +00:00
Jim Meyering f9f6078432 (TESTS): Add p-thru-slink 2005-12-23 18:17:39 +00:00
Jim Meyering dc217ce9c2 New file. Test for today's mkdir-p.c fix. 2005-12-23 18:16:40 +00:00
Jim Meyering 7916560259 *** empty log message *** 2005-12-23 18:15:38 +00:00
Jim Meyering 5d3118175f (make_dir_parents): Use chdir_no_follow only
if we've just created the directory.
2005-12-23 18:15:33 +00:00
Jim Meyering bdf801ef29 *** empty log message *** 2005-12-23 17:14:37 +00:00
Jim Meyering 7616f9171a *** empty log message *** 2005-12-23 12:00:37 +00:00
Jim Meyering 2eab9d93fc (chdir_no_follow): Rewrite to use fchdir even
when O_NOFOLLOW is not defined.  Suggested by Eric Blake.
2005-12-23 12:00:26 +00:00
Jim Meyering 867dbd1591 *** empty log message *** 2005-12-23 08:28:19 +00:00
Jim Meyering bd80c2e5a7 (O_NOFOLLOW): Define, if necessary. 2005-12-23 08:28:14 +00:00
Jim Meyering 6ed15904b1 (O_NOFOLLOW): Define. 2005-12-23 08:27:44 +00:00
Jim Meyering bda1fc0aa4 *** empty log message *** 2005-12-22 15:43:25 +00:00
Jim Meyering 23490f81f8 *** empty log message *** 2005-12-22 15:42:17 +00:00
Jim Meyering b5bfbe2385 redirect stderr to /dev/full, too (to suppress write error diagnostic) 2005-12-22 15:40:00 +00:00
Jim Meyering 2bd65173c2 *** empty log message *** 2005-12-22 14:36:22 +00:00
Jim Meyering b6c621211b Include "fcntl--.h" and "unistd--.h", to map open
and dup to open_safer and dup_safer, respectively.
(openat_permissive): Fix typo in comment.
2005-12-22 14:34:20 +00:00
Jim Meyering 1e1938032b . 2005-12-21 10:23:51 +00:00
Jim Meyering 3114855498 *** empty log message *** 2005-12-21 10:21:20 +00:00
Jim Meyering 9eb2e69d62 Require gl_CHDIR_SAFER. 2005-12-21 10:21:04 +00:00
Jim Meyering 05eb4556c8 . 2005-12-21 09:48:41 +00:00
Jim Meyering a7c7b483f1 *** empty log message *** 2005-12-21 09:43:44 +00:00
Jim Meyering 2956eb272c like chdir(2), but safer, if possible 2005-12-21 09:42:36 +00:00
Jim Meyering 3108671902 *** empty log message *** 2005-12-20 14:23:25 +00:00
Jim Meyering d0344cfc55 (RW_USR): Remove definition.
(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 14:23:20 +00:00
Jim Meyering 0b7757fac4 *** empty log message *** 2005-12-20 10:28:58 +00:00
Jim Meyering cf02d3c6f6 (make_dir_parents): Remove unnecessary casts of alloca,
since now it's guaranteed to be (void *).
2005-12-20 10:28:53 +00:00
Jim Meyering ddb24aa9fb *** empty log message *** 2005-12-20 10:24:43 +00:00
Jim Meyering 7be64dd68f (fchmod_new): Don't try to close fd if it's < 0. 2005-12-20 10:24:37 +00:00
Jim Meyering 07d7677196 . 2005-12-19 18:21:11 +00:00
Jim Meyering 3d49eb721b . 2005-12-19 18:19:38 +00:00
Jim Meyering a8b913cfdd (TESTS): Add mknod. 2005-12-19 18:18:57 +00:00
Jim Meyering fa6cfcb9ce (main) Avoid a minor race condition when `-m MODE' is specified, by using
open, fchown, and close rather than just chown.  To do that reliably
(even with an overly restrictive umask), ensure that each
mknod call uses a mode including at least owner-read access.

(main): When `-m MODE' is specified, exit nonzero if
the subsequent chown (or equivalent open,fchown,close) fails.
2005-12-19 18:18:03 +00:00
Jim Meyering 52893ffd2a (main) Avoid a minor race condition when `-m MODE' is specified, by using
open, fchown, and close rather than just chown.  To do that reliably
(even with an overly restrictive umask), ensure that each
mkdir call uses a mode including at least owner-read access.
2005-12-19 18:17:16 +00:00
Jim Meyering 17f521adfd (main) Avoid a minor race condition when `-m MODE' is specified, by using
open, fchown, and close rather than just chown.  To do that reliably
(even with an overly restrictive umask), ensure that each mknod/mkfifo
call uses a mode including at least owner-read access.
2005-12-19 18:16:07 +00:00
Jim Meyering e0029290b8 . 2005-12-19 18:13:00 +00:00
Jim Meyering 89276658f2 . 2005-12-19 18:12:30 +00:00
Jim Meyering 457167610f . 2005-12-19 18:05:55 +00:00
Jim Meyering 1e4cd701dc Require gl_CHMOD_SAFER. 2005-12-19 18:05:11 +00:00
Jim Meyering 5df3b1a078 *** empty log message *** 2005-12-17 13:46:34 +00:00
Jim Meyering 46f3108c99 (is_empty_dir): Open with O_NDELAY, so we don't hang, e.g., on a named pipe.
(OPEN_NO_FOLLOW_SYMLINK): Remove definition.  Use O_NOFOLLOW in
place of all uses, since it is guaranteed (system.h) to be defined.
2005-12-17 13:46:27 +00:00
Jim Meyering eb931cda05 *** empty log message *** 2005-12-17 10:56:25 +00:00
Jim Meyering 88d381bada Add lib/acl.c. 2005-12-17 10:56:22 +00:00
Jim Meyering 26f5a6e03e *** empty log message *** 2005-12-17 10:50:04 +00:00
Jim Meyering 88c3a9be50 (stat invocation) [--printf]: Describe new option.
[--format]: Add example.  Distinguish from --printf.
Sort option descriptions.
2005-12-17 10:50:00 +00:00
Jim Meyering c99e1d2cb6 . 2005-12-17 10:48:30 +00:00
Jim Meyering c4a1355047 *** empty log message *** 2005-12-17 10:48:12 +00:00
Jim Meyering 2862dc7af9 *** empty log message *** 2005-12-17 10:47:37 +00:00
Jim Meyering 01a5f3830f (ls): Clarify the Alternate Access Method description.
(cp): Clarify that --preserve=mode also preserves acls.
2005-12-17 10:46:57 +00:00
Jim Meyering 7b08fdb1eb (cp_option_init): Don't set umask_kill member. 2005-12-17 10:46:23 +00:00
Jim Meyering eee9e3d072 (cp_option_init): Don't set umask_kill member. 2005-12-17 10:45:54 +00:00