rpms/xfsdump/devel fix-open-O_CREAT-perms.patch, NONE, 1.1 xfsdump.spec, 1.4, 1.5

Eric Sandeen (sandeen) fedora-extras-commits at redhat.com
Sat Aug 25 00:05:01 UTC 2007


Author: sandeen

Update of /cvs/pkgs/rpms/xfsdump/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28916

Modified Files:
	xfsdump.spec 
Added Files:
	fix-open-O_CREAT-perms.patch 
Log Message:
* Fri Aug 24 2007 Eric Sandeen <sandeen at redhat.com> - 2.2.45-3
- Update license tag
- Fix up O_CREAT opens with no mode
- Add gawk to buildrequires


fix-open-O_CREAT-perms.patch:

--- NEW FILE fix-open-O_CREAT-perms.patch ---
Index: xfsdump/inventory/inv_fstab.c
===================================================================
RCS file: /cvs/xfs-cmds/xfsdump/inventory/inv_fstab.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- xfsdump/inventory/inv_fstab.c	24 May 2006 06:08:55 -0000	1.8
+++ xfsdump/inventory/inv_fstab.c	24 Aug 2007 19:36:15 -0000	1.9
@@ -96,7 +96,7 @@
 		if ( errno != ENOENT ) {
 			return -1;
 		}
-		if ((fd = open( INV_FSTAB, INV_OFLAG(forwhat) | O_CREAT ))
+		if ((fd = open( INV_FSTAB, INV_OFLAG(forwhat) | O_CREAT, S_IRUSR|S_IWUSR ))
 		    < 0 ) {
 			INV_PERROR ( INV_FSTAB );
 			return -1;
Index: xfsdump/inventory/inv_idx.c
===================================================================
RCS file: /cvs/xfs-cmds/xfsdump/inventory/inv_idx.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- xfsdump/inventory/inv_idx.c	24 May 2006 06:08:55 -0000	1.8
+++ xfsdump/inventory/inv_idx.c	24 Aug 2007 19:36:15 -0000	1.9
@@ -257,7 +257,7 @@
 	   the db for SEARCH_ONLY. */
 	ASSERT( forwhat != INV_SEARCH_ONLY );
 
-	if ((fd = open ( fname , INV_OFLAG(forwhat) | O_CREAT ) ) < 0 ) {
+	if ((fd = open ( fname , INV_OFLAG(forwhat) | O_CREAT, S_IRUSR|S_IWUSR ) ) < 0 ) {
 		INV_PERROR ( fname );
 		return INV_TOKEN_NULL;
 	}
Index: xfsdump/inventory/inv_mgr.c
===================================================================
RCS file: /cvs/xfs-cmds/xfsdump/inventory/inv_mgr.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- xfsdump/inventory/inv_mgr.c	24 May 2006 06:08:55 -0000	1.10
+++ xfsdump/inventory/inv_mgr.c	24 Aug 2007 19:36:15 -0000	1.11
@@ -692,7 +692,7 @@
 {
 	if ( invlock_fd == -1 ) {
 		if (( invlock_fd = open( INV_LOCKFILE, 
-					O_RDONLY | O_CREAT )) < 0 ) {
+					O_RDONLY | O_CREAT, S_IRUSR|S_IWUSR )) < 0 ) {
 			INV_PERROR( INV_LOCKFILE );
 			return BOOL_FALSE;
 		}
Index: xfsdump/inventory/inv_oref.c
===================================================================
RCS file: /cvs/xfs-cmds/xfsdump/inventory/inv_oref.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- xfsdump/inventory/inv_oref.c	24 May 2006 06:08:55 -0000	1.8
+++ xfsdump/inventory/inv_oref.c	24 Aug 2007 19:36:15 -0000	1.9
@@ -429,7 +429,7 @@
 	int stobjfd, fd;
 	inv_idbtoken_t tok;
 
-	if ((fd = open ( fname , O_RDWR | O_CREAT ) ) < 0 ) {
+	if ((fd = open ( fname , O_RDWR | O_CREAT, S_IRUSR|S_IWUSR ) ) < 0 ) {
 		INV_PERROR ( fname );
 		return INV_ERR;
 	}
Index: xfsdump/inventory/inv_stobj.c
===================================================================
RCS file: /cvs/xfs-cmds/xfsdump/inventory/inv_stobj.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- xfsdump/inventory/inv_stobj.c	24 May 2006 06:08:55 -0000	1.12
+++ xfsdump/inventory/inv_stobj.c	24 Aug 2007 19:36:15 -0000	1.13
@@ -527,7 +527,7 @@
 #endif	
 
 	/* create the new storage object */
-	if (( fd = open( fname, INV_OFLAG(forwhat) | O_EXCL | O_CREAT )) < 0 ) {
+	if (( fd = open( fname, INV_OFLAG(forwhat) | O_EXCL | O_CREAT, S_IRUSR|S_IWUSR )) < 0 ) {
 		INV_PERROR ( fname );
 		memset( fname, 0, INV_STRLEN );
 		return -1;
@@ -1083,7 +1083,7 @@
 
 #ifdef INVT_DELETION
 	{
-		int tmpfd = open( "moids", O_RDWR | O_CREAT );	
+		int tmpfd = open( "moids", O_RDWR | O_CREAT, S_IRUSR|S_IWUSR );
 		u_int j;
 		invt_mediafile_t *mmf = s->mfiles;
 		for (i=0; i< s->ses->s_cur_nstreams; i++ ) {
Index: xfsdump/invutil/invidx.c
===================================================================
RCS file: /cvs/xfs-cmds/xfsdump/invutil/invidx.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- xfsdump/invutil/invidx.c	24 May 2006 06:08:55 -0000	1.7
+++ xfsdump/invutil/invidx.c	24 Aug 2007 19:36:15 -0000	1.8
@@ -275,7 +275,7 @@
 		return 0;
 	    }
 
-	    new_fd = open(dst_idxfile, O_CREAT|O_RDWR);
+	    new_fd = open(dst_idxfile, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR);
 	    if(new_fd < 0) {
 		put_error("Error: unable to open inventory index file");
 		return 0;
@@ -616,7 +616,7 @@
     invt_sescounter_t sescnt;
 
     /* create the new storage object */
-    if (( fd = open( fname, O_RDWR | O_EXCL | O_CREAT )) < 0 ) {
+    if (( fd = open( fname, O_RDWR | O_EXCL | O_CREAT, S_IRUSR|S_IWUSR )) < 0 ) {
 	return -1;
     }
     


Index: xfsdump.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xfsdump/devel/xfsdump.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- xfsdump.spec	16 Aug 2007 18:59:15 -0000	1.4
+++ xfsdump.spec	25 Aug 2007 00:04:28 -0000	1.5
@@ -9,10 +9,11 @@
 URL: http://oss.sgi.com/projects/xfs/
 Source0: ftp://oss.sgi.com/projects/xfs/download/cmd_tars/%{name}_%{version}-1.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: autoconf, libtool, gettext
+BuildRequires: autoconf, libtool, gettext, gawk
 BuildRequires: xfsprogs-devel, e2fsprogs-devel, libattr-devel ncurses-devel
 Requires: xfsprogs >= 2.6.30, attr >= 2.0.0
 
+Patch1: fix-open-O_CREAT-perms.patch
 
 %description
 The xfsdump package contains xfsdump, xfsrestore and a number of
@@ -33,6 +34,7 @@
 
 %prep
 %setup -q
+%patch1 -p1
 
 %build
 autoconf
@@ -62,8 +64,10 @@
 /sbin/*
 
 %changelog
-* Thu Aug 16 2007 Eric Sandeen <sandeen at redhat.com> - 2.2.45-3
+* Fri Aug 24 2007 Eric Sandeen <sandeen at redhat.com> - 2.2.45-3
 - Update license tag
+- Fix up O_CREAT opens with no mode
+- Add gawk to buildrequires
 
 * Tue Jun 19 2007 Eric Sandeen <sandeen at redhat.com> - 2.2.45-2
 - Remove readline-devel & libtermcap-devel BuildRequires




More information about the fedora-extras-commits mailing list