]> git.pld-linux.org Git - packages/cpio.git/commitdiff
- fix CAN-1999-1572 (cpio uses a 0 umask when creating files using
authorPaweł Sikora <pluto@pld-linux.org>
Mon, 26 Sep 2005 23:29:46 +0000 (23:29 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
                     the -O (archive) or -F options, which creates
                     the files with mode 0666 and allows local users
                     to read or overwrite those files).

Changed files:
    cpio-CAN_1999_1572.patch -> 1.1
    cpio.spec -> 1.62

cpio-CAN_1999_1572.patch [new file with mode: 0644]
cpio.spec

diff --git a/cpio-CAN_1999_1572.patch b/cpio-CAN_1999_1572.patch
new file mode 100644 (file)
index 0000000..aa9d8dc
--- /dev/null
@@ -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) ();
\f
+--- 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 ();
index 28104aa0792cfdcbb7edbb724feec8053f8212ec..6eb355f540afee237f3788076ba36d9ea1d57b09 100644 (file)
--- a/cpio.spec
+++ b/cpio.spec
@@ -25,6 +25,7 @@ Patch3:               %{name}-pl.po-update.patch
 Patch4:                %{name}-locale.patch
 Patch5:                %{name}-CAN_2005_111.patch
 Patch6:                %{name}-lstat.patch
+Patch7:                %{name}-CAN_1999_1572.patch
 URL:           http://www.gnu.org/software/cpio/
 BuildRequires: autoconf >= 2.54
 BuildRequires: automake
@@ -116,6 +117,7 @@ cpio 
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 
 rm -f po/stamp-po
 
This page took 0.043038 seconds and 4 git commands to generate.