From e4ec2f34dbebfdaa2c085ac1a3c26bf0a2b8db90 Mon Sep 17 00:00:00 2001 From: tjr Date: Sat, 1 Oct 2005 05:49:29 +0000 Subject: 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. --- contrib/cpio/src/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'contrib/cpio') 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 (); -- cgit v1.1