rpms/nfs-utils/devel nfs-utils-1.1.0-exportfs-open.patch, NONE, 1.1 nfs-utils.spec, 1.151, 1.152

Steve Dickson (steved) fedora-extras-commits at redhat.com
Thu Aug 16 02:45:25 UTC 2007


Author: steved

Update of /cvs/pkgs/rpms/nfs-utils/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9595

Modified Files:
	nfs-utils.spec 
Added Files:
	nfs-utils-1.1.0-exportfs-open.patch 
Log Message:
Make sure the open() system calling in exportfs uses
mode bits when creating the etab file.


nfs-utils-1.1.0-exportfs-open.patch:

--- NEW FILE nfs-utils-1.1.0-exportfs-open.patch ---
diff -up nfs-utils-1.1.0/support/nfs/xio.c.orig nfs-utils-1.1.0/support/nfs/xio.c
--- nfs-utils-1.1.0/support/nfs/xio.c.orig	2007-05-10 23:40:57.000000000 -0400
+++ nfs-utils-1.1.0/support/nfs/xio.c	2007-08-15 22:23:13.000000000 -0400
@@ -54,13 +54,20 @@ xflock(char *fname, char *type)
 {
 	struct sigaction sa, oldsa;
 	int		readonly = !strcmp(type, "r");
+	mode_t  mode = (S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
 	struct flock	fl = { readonly? F_RDLCK : F_WRLCK, SEEK_SET, 0, 0, 0 };
 	int		fd;
 
-	if ((fd = open(fname, readonly? O_RDONLY : (O_RDWR|O_CREAT))) < 0) {
-		xlog(L_WARNING, "could not open %s for locking", fname);
+	if (readonly) 
+		fd = open(fname, O_RDONLY);
+	else
+		fd = open(fname, (O_RDWR|O_CREAT), mode);
+	if (fd < 0) {
+		xlog(L_WARNING, "could not %s %s for locking", 
+			(readonly ? "open" : "create"), fname);
 		return -1;
 	}
+
 	sa.sa_handler = doalarm;
 	sa.sa_flags = 0;
 	sigemptyset(&sa.sa_mask);


Index: nfs-utils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/nfs-utils/devel/nfs-utils.spec,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -r1.151 -r1.152
--- nfs-utils.spec	13 Aug 2007 15:26:16 -0000	1.151
+++ nfs-utils.spec	16 Aug 2007 02:44:53 -0000	1.152
@@ -32,6 +32,7 @@
 Patch07: nfs-utils-1.1.0-showmount-rpcerror.patch
 Patch08: nfs-utils-1.1.0-mount-v4-errors.patch
 Patch09: nfs-utils-1.1.0-mount-nosharecache.patch
+Patch10: nfs-utils-1.1.0-exportfs-open.patch
 
 %if %{enablefscache}
 Patch90: nfs-utils-1.1.0-mount-fsc.patch
@@ -94,6 +95,7 @@
 %patch07 -p1
 %patch08 -p1
 %patch09 -p1
+%patch10 -p1
 
 %if %{enablefscache}
 %patch90 -p1
@@ -264,6 +266,10 @@
 %attr(4755,root,root)   /sbin/umount.nfs4
 
 %changelog
+* Wed Aug 15 2007 Steve Dickson <steved at redhat.com>  1.1.0-4
+- Make sure the open() system calling in exportfs uses
+  mode bits when creating the etab file.
+
 * Mon Aug 13 2007 Steve Dickson <steved at redhat.com>  1.1.0-3
 - Added nosharecache mount option which re-enables
   rw/ro mounts to the same server (bz 243913).




More information about the fedora-extras-commits mailing list