mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
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. Closed PR# 1391 Add setlocale LC_ALL (from ache).
This commit is contained in:
parent
adfc6bdf06
commit
88fd8e23ef
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=24414
@ -23,6 +23,12 @@
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#if (defined(BSD) && (BSD >= 199306))
|
||||
#include <locale.h>
|
||||
#endif
|
||||
#include "filetypes.h"
|
||||
#include "system.h"
|
||||
#include "cpiohdr.h"
|
||||
@ -498,7 +504,10 @@ main (argc, argv)
|
||||
char *argv[];
|
||||
{
|
||||
program_name = argv[0];
|
||||
umask (0);
|
||||
|
||||
#if (defined(BSD) && (BSD >= 199306))
|
||||
(void) setlocale (LC_ALL, "");
|
||||
#endif
|
||||
|
||||
#ifdef __TURBOC__
|
||||
_fmode = O_BINARY; /* Put stdin and stdout in binary mode. */
|
||||
@ -509,6 +518,7 @@ main (argc, argv)
|
||||
#endif
|
||||
|
||||
process_args (argc, argv);
|
||||
umask (0);
|
||||
|
||||
initialize_buffers ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user