rpms/cpio/devel cpio-2.9-sys_umask.patch, NONE, 1.1 cpio.spec, 1.62, 1.63
Ondrej Vasik
ovasik at fedoraproject.org
Wed Feb 11 09:23:19 UTC 2009
- Previous message (by thread): rpms/eclipse-moreunit/devel eclipse-moreunit.spec, NONE, 1.1 eclipse-moreunit-fetch-src.sh, NONE, 1.1 sources, 1.1, 1.2 .cvsignore, 1.1, 1.2
- Next message (by thread): rpms/mingw32-gtk-vnc/devel import.log, NONE, 1.1 mingw32-gtk-vnc.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ovasik
Update of /cvs/extras/rpms/cpio/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18474
Modified Files:
cpio.spec
Added Files:
cpio-2.9-sys_umask.patch
Log Message:
make -d honor system umask(#484997)
cpio-2.9-sys_umask.patch:
--- NEW FILE cpio-2.9-sys_umask.patch ---
diff -urp cpio-2.9.90-orig/src/extern.h cpio-2.9.90/src/extern.h
--- cpio-2.9.90-orig/src/extern.h 2008-08-25 16:42:48.000000000 +0200
+++ cpio-2.9.90/src/extern.h 2009-02-10 16:29:34.000000000 +0100
@@ -96,6 +96,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) ();
diff -urp cpio-2.9.90-orig/src/global.c cpio-2.9.90/src/global.c
--- cpio-2.9.90-orig/src/global.c 2007-06-28 12:54:11.000000000 +0200
+++ cpio-2.9.90/src/global.c 2009-02-10 16:34:41.000000000 +0100
@@ -187,6 +187,9 @@ bool to_stdout_option = false;
/* The name this program was run with. */
char *program_name;
+/* Make the -d 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) ();
diff -urp cpio-2.9.90-orig/src/main.c cpio-2.9.90/src/main.c
--- cpio-2.9.90-orig/src/main.c 2008-08-25 16:42:48.000000000 +0200
+++ cpio-2.9.90/src/main.c 2009-02-10 17:44:47.000000000 +0100
@@ -790,6 +790,7 @@ main (int argc, char *argv[])
program_name = argv[0];
process_args (argc, argv);
+ sys_umask = umask(0);
initialize_buffers ();
diff -urp cpio-2.9.90-orig/src/util.c cpio-2.9.90/src/util.c
--- cpio-2.9.90-orig/src/util.c 2008-08-25 16:42:48.000000000 +0200
+++ cpio-2.9.90/src/util.c 2009-02-10 17:46:35.000000000 +0100
@@ -605,7 +605,7 @@ create_all_directories (char *name)
#endif
dir = dir_name (name);
- mode = 0700;
+ mode = 0777 & ~ (sys_umask);
#ifdef HPUX_CDF
cdf = islastparentcdf (name);
if (cdf)
@@ -620,7 +620,7 @@ create_all_directories (char *name)
error (2, 0, _("virtual memory exhausted"));
if (dir[0] != '.' || dir[1] != '\0')
- make_path (dir, mode, 0700, -1, -1, (char *) NULL);
+ make_path (dir, mode, 0777 & ~(sys_umask), -1, -1, (char *) NULL);
free (dir);
}
Index: cpio.spec
===================================================================
RCS file: /cvs/extras/rpms/cpio/devel/cpio.spec,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- cpio.spec 18 Jul 2008 10:22:40 -0000 1.62
+++ cpio.spec 11 Feb 2009 09:22:49 -0000 1.63
@@ -3,7 +3,7 @@
Summary: A GNU archiving program
Name: cpio
Version: 2.9.90
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv3+
Group: Applications/Archiving
URL: http://www.gnu.org/software/cpio/
@@ -16,6 +16,7 @@
Patch4: cpio-2.9-exitCode.patch
Patch5: cpio-2.9-dir_perm.patch
Patch6: cpio-2.9-dev_number.patch
+Patch7: cpio-2.9-sys_umask.patch
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
BuildRequires: texinfo, autoconf, gettext
@@ -43,6 +44,7 @@
%patch4 -p1 -b .exitCode
%patch5 -p1 -b .dir_perm
%patch6 -p1 -b .dev_number
+%patch7 -p1 -b .sys_umask
autoheader
@@ -83,6 +85,9 @@
%{_infodir}/*.info*
%changelog
+* Wed Feb 11 2009 Ondrej Vasik <ovasik at redhat.com> 2.9.90-3
+- make -d honor system umask(#484997)
+
* Fri Jul 18 2008 Kamil Dudka <kdudka at redhat.com> 2.9.90-2
- Support major/minor device numbers over 127 (bz#450109)
- Previous message (by thread): rpms/eclipse-moreunit/devel eclipse-moreunit.spec, NONE, 1.1 eclipse-moreunit-fetch-src.sh, NONE, 1.1 sources, 1.1, 1.2 .cvsignore, 1.1, 1.2
- Next message (by thread): rpms/mingw32-gtk-vnc/devel import.log, NONE, 1.1 mingw32-gtk-vnc.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list