1 --- cpio-2.6/src/extern.h 2004-09-08 10:49:57.000000000 +0000
2 +++ cpio-2.6-fix/src/extern.h 2005-03-10 14:45:20.000000000 +0000
3 @@ -91,6 +91,7 @@ extern char output_is_special;
4 extern char input_is_seekable;
5 extern char output_is_seekable;
6 extern char *program_name;
7 +extern mode_t sys_umask;
8 extern int (*xstat) ();
9 extern void (*copy_function) ();
11 --- cpio-2.6/src/global.c 2004-09-08 10:23:44.000000000 +0000
12 +++ cpio-2.6-fix/src/global.c 2005-03-10 14:47:11.000000000 +0000
13 @@ -195,6 +195,9 @@ bool to_stdout_option = false;
14 /* The name this program was run with. */
17 +/* Debian hack to make the -O option honor the umask. */
20 /* A pointer to either lstat or stat, depending on whether
21 dereferencing of symlinks is done for input files. */
23 --- cpio-2.6/src/main.c 2004-11-23 00:42:18.000000000 +0000
24 +++ cpio-2.6-fix/src/main.c 2005-03-10 14:37:06.000000000 +0000
25 @@ -740,7 +740,6 @@ main (int argc, char *argv[])
28 program_name = argv[0];
32 _fmode = O_BINARY; /* Put stdin and stdout in binary mode. */
33 @@ -751,6 +750,7 @@ main (int argc, char *argv[])
36 process_args (argc, argv);
37 + sys_umask = umask (0);
39 initialize_buffers ();