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.
This commit is contained in:
parent
25242c970a
commit
aaefaad330
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=23104
@ -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 ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user