summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authormpp <mpp@FreeBSD.org>1997-02-25 06:11:19 +0000
committermpp <mpp@FreeBSD.org>1997-02-25 06:11:19 +0000
commit136fab770c9417f1188479a53addd6d72aec7a76 (patch)
tree037a8def3af5db3b6e0ab141593383998fdc7775 /gnu
parentb93535330ded729e2ecd801c59f0b90019e13388 (diff)
downloadFreeBSD-src-136fab770c9417f1188479a53addd6d72aec7a76.zip
FreeBSD-src-136fab770c9417f1188479a53addd6d72aec7a76.tar.gz
Don't set the umask until after we have processed the arguments
and opened the archive file. This allows "cpio -o -O output_file" to create the output file with the callers proper umask. Closes PR# 1391.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/cpio/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/usr.bin/cpio/main.c b/gnu/usr.bin/cpio/main.c
index 9346b78..0a3643f 100644
--- a/gnu/usr.bin/cpio/main.c
+++ b/gnu/usr.bin/cpio/main.c
@@ -459,7 +459,6 @@ main (argc, argv)
char *argv[];
{
program_name = argv[0];
- umask (0);
#ifdef __FreeBSD__
(void) setlocale (LC_ALL, "");
@@ -473,6 +472,7 @@ main (argc, argv)
#endif
process_args (argc, argv);
+ umask (0);
initialize_buffers ();
OpenPOWER on IntegriCloud