From: Paul Eggert Date: Fri, 22 Apr 2005 23:53:13 +0000 (+0000) Subject: (main): Compile mode with MODE_MASK_ALL and initial umask. X-Git-Tag: CPPI-1_12~948 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=18f6ab02284158e6d1c3b4d6cbffb91a9ba2f855;p=thirdparty%2Fcoreutils.git (main): Compile mode with MODE_MASK_ALL and initial umask. --- diff --git a/src/mkfifo.c b/src/mkfifo.c index c11ab60feb..a579dbe33a 100644 --- a/src/mkfifo.c +++ b/src/mkfifo.c @@ -1,5 +1,5 @@ /* mkfifo -- make fifo's (named pipes) - 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 @@ -116,13 +116,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); } for (; optind < argc; ++optind)