aboutsummaryrefslogtreecommitdiff
path: root/coreutils/mkdir.c
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2002-11-24 22:48:20 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2002-11-24 22:48:20 +0000
commit822e7fd587d603b3a47e09d9be5305ccd9cc4c43 (patch)
treeede36c0fb879eabac998523f7a44a828cacbc159 /coreutils/mkdir.c
parenteda4f53f2ebf3d9565c3d7aa500a2e1d9cfd9774 (diff)
downloadbusybox-w32-822e7fd587d603b3a47e09d9be5305ccd9cc4c43.tar.gz
busybox-w32-822e7fd587d603b3a47e09d9be5305ccd9cc4c43.tar.bz2
busybox-w32-822e7fd587d603b3a47e09d9be5305ccd9cc4c43.zip
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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c
index 6a4ce6e1a..f003db99f 100644
--- a/coreutils/mkdir.c
+++ b/coreutils/mkdir.c
@@ -41,8 +41,10 @@ extern int mkdir_main (int argc, char **argv)
41 switch (opt) { 41 switch (opt) {
42 case 'm': 42 case 'm':
43 mode = 0777; 43 mode = 0777;
44 if (!parse_mode (optarg, &mode)) 44 if (!parse_mode (optarg, &mode)) {
45 error_msg_and_die ("invalid mode `%s'", optarg); 45 error_msg_and_die ("invalid mode `%s'", optarg);
46 }
47 umask(0);
46 break; 48 break;
47 case 'p': 49 case 'p':
48 flags |= FILEUTILS_RECUR; 50 flags |= FILEUTILS_RECUR;