summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2005-10-01 05:49:29 +0000
committertjr <tjr@FreeBSD.org>2005-10-01 05:49:29 +0000
commite4ec2f34dbebfdaa2c085ac1a3c26bf0a2b8db90 (patch)
tree3f8f2db5fd945ea8573e36479209738f14126d36 /contrib
parent6b16a660d3089ee16c46212092cd7c6c1e592924 (diff)
downloadFreeBSD-src-e4ec2f34dbebfdaa2c085ac1a3c26bf0a2b8db90.zip
FreeBSD-src-e4ec2f34dbebfdaa2c085ac1a3c26bf0a2b8db90.tar.gz
Merge from old main.c rev 1.2: Don't set the umask until after we have
processed the arguments and opened the archive file.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/cpio/src/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/cpio/src/main.c b/contrib/cpio/src/main.c
index cd96e58..de59074 100644
--- a/contrib/cpio/src/main.c
+++ b/contrib/cpio/src/main.c
@@ -1,3 +1,5 @@
+/* $FreeBSD$ */
+
/* main.c - main program and argument processing for cpio.
Copyright (C) 1990, 1991, 1992, 2001, 2003, 2004 Free Software Foundation, Inc.
@@ -740,8 +742,7 @@ main (int argc, char *argv[])
textdomain (PACKAGE);
program_name = argv[0];
- umask (0);
-
+
#ifdef __TURBOC__
_fmode = O_BINARY; /* Put stdin and stdout in binary mode. */
#endif
@@ -751,6 +752,7 @@ main (int argc, char *argv[])
#endif
process_args (argc, argv);
+ umask (0);
initialize_buffers ();
OpenPOWER on IntegriCloud