SOURCES: cpio-CAN_1999_1572.patch (NEW) - fix CAN-1999-1572 (cpio ...
pluto
pluto at pld-linux.org
Tue Sep 27 01:29:51 CEST 2005
Author: pluto Date: Mon Sep 26 23:29:51 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- fix CAN-1999-1572 (cpio uses a 0 umask when creating files using
the -O (archive) or -F options, which creates
the files with mode 0666 and allows local users
to read or overwrite those files).
---- Files affected:
SOURCES:
cpio-CAN_1999_1572.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/cpio-CAN_1999_1572.patch
diff -u /dev/null SOURCES/cpio-CAN_1999_1572.patch:1.1
--- /dev/null Tue Sep 27 01:29:51 2005
+++ SOURCES/cpio-CAN_1999_1572.patch Tue Sep 27 01:29:46 2005
@@ -0,0 +1,40 @@
+--- cpio-2.6/src/extern.h 2004-09-08 10:49:57.000000000 +0000
++++ cpio-2.6-fix/src/extern.h 2005-03-10 14:45:20.000000000 +0000
+@@ -91,6 +91,7 @@ extern char output_is_special;
+ extern char input_is_seekable;
+ extern char output_is_seekable;
+ extern char *program_name;
++extern mode_t sys_umask;
+ extern int (*xstat) ();
+ extern void (*copy_function) ();
+
+--- cpio-2.6/src/global.c 2004-09-08 10:23:44.000000000 +0000
++++ cpio-2.6-fix/src/global.c 2005-03-10 14:47:11.000000000 +0000
+@@ -195,6 +195,9 @@ bool to_stdout_option = false;
+ /* The name this program was run with. */
+ char *program_name;
+
++/* Debian hack to make the -O option honor the umask. */
++mode_t sys_umask;
++
+ /* A pointer to either lstat or stat, depending on whether
+ dereferencing of symlinks is done for input files. */
+ int (*xstat) ();
+--- cpio-2.6/src/main.c 2004-11-23 00:42:18.000000000 +0000
++++ cpio-2.6-fix/src/main.c 2005-03-10 14:37:06.000000000 +0000
+@@ -740,7 +740,6 @@ 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. */
+@@ -751,6 +750,7 @@ main (int argc, char *argv[])
+ #endif
+
+ process_args (argc, argv);
++ sys_umask = umask (0);
+
+ initialize_buffers ();
+
================================================================
More information about the pld-cvs-commit
mailing list