diff options
author | Glenn L McGrath | 2002-11-24 22:48:20 +0000 |
---|---|---|
committer | Glenn L McGrath | 2002-11-24 22:48:20 +0000 |
commit | 822e7fd587d603b3a47e09d9be5305ccd9cc4c43 (patch) | |
tree | ede36c0fb879eabac998523f7a44a828cacbc159 /coreutils/mkdir.c | |
parent | eda4f53f2ebf3d9565c3d7aa500a2e1d9cfd9774 (diff) | |
download | busybox-822e7fd587d603b3a47e09d9be5305ccd9cc4c43.zip busybox-822e7fd587d603b3a47e09d9be5305ccd9cc4c43.tar.gz |
When making parent directories set permissions based on the base parent tree rather than the new directory to be created.
Diffstat (limited to 'coreutils/mkdir.c')
-rw-r--r-- | coreutils/mkdir.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c index 6a4ce6e..f003db9 100644 --- a/coreutils/mkdir.c +++ b/coreutils/mkdir.c @@ -41,8 +41,10 @@ extern int mkdir_main (int argc, char **argv) switch (opt) { case 'm': mode = 0777; - if (!parse_mode (optarg, &mode)) + if (!parse_mode (optarg, &mode)) { error_msg_and_die ("invalid mode `%s'", optarg); + } + umask(0); break; case 'p': flags |= FILEUTILS_RECUR; |