diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-04-22 23:53:33 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-04-22 23:53:33 +0000 |
commit | fde1a93ab835e9f454ce6b2eb41c8439fc4bb573 (patch) | |
tree | ce55d64e6ebe0b57b5a95d6d99fc6df9bf525069 | |
parent | 18f6ab02284158e6d1c3b4d6cbffb91a9ba2f855 (diff) | |
download | coreutils-fde1a93ab835e9f454ce6b2eb41c8439fc4bb573.tar.xz |
(main): Compile mode with MODE_MASK_ALL and initial umask.
-rw-r--r-- | src/mknod.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mknod.c b/src/mknod.c index e64352385..4eacefb25 100644 --- a/src/mknod.c +++ b/src/mknod.c @@ -1,5 +1,5 @@ /* mknod -- make special files - Copyright (C) 90, 91, 1995-2004 Free Software Foundation, Inc. + Copyright (C) 90, 91, 1995-2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -121,13 +121,13 @@ main (int argc, char **argv) newmode = (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); if (specified_mode) { - newmode &= ~ umask (0); - change = mode_compile (specified_mode, 0); + change = mode_compile (specified_mode, MODE_MASK_ALL); if (change == MODE_INVALID) error (EXIT_FAILURE, 0, _("invalid mode")); else if (change == MODE_MEMORY_EXHAUSTED) xalloc_die (); newmode = mode_adjust (newmode, change); + umask (0); } /* If the number of arguments is 0 or 1, |