cpio used a 0 umask when creating files using the -O (archive) or -F options, which created the files with mode 0666 and allowed local users to read or overwrite those files. (CAN-1999-1572)
20 lines
450 B
Plaintext
20 lines
450 B
Plaintext
$OpenBSD: patch-main_c,v 1.3 2005/02/11 23:28:34 naddy Exp $
|
|
--- main.c.orig Sat Feb 12 00:13:59 2005
|
|
+++ main.c Sat Feb 12 00:15:20 2005
|
|
@@ -512,7 +512,6 @@ main (argc, argv)
|
|
char *argv[];
|
|
{
|
|
program_name = argv[0];
|
|
- umask (0);
|
|
|
|
#ifdef __TURBOC__
|
|
_fmode = O_BINARY; /* Put stdin and stdout in binary mode. */
|
|
@@ -523,6 +522,7 @@ main (argc, argv)
|
|
#endif
|
|
|
|
process_args (argc, argv);
|
|
+ umask (0);
|
|
|
|
initialize_buffers ();
|
|
|