rpms/nfs-utils/devel nfs-utils-1.0.10-v4-umounts.patch, NONE, 1.1 nfs-utils.spec, 1.114, 1.115

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Dec 13 15:10:15 UTC 2006


Author: steved

Update of /cvs/dist/rpms/nfs-utils/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv12480

Modified Files:
	nfs-utils.spec 
Added Files:
	nfs-utils-1.0.10-v4-umounts.patch 
Log Message:
> - Stopped v4 umounts from ping rpc.mountd (bz 215553)


nfs-utils-1.0.10-v4-umounts.patch:
 nfsumount.c |   58 ++++++++++++++++++++++++++--------------------------------
 1 files changed, 26 insertions(+), 32 deletions(-)

--- NEW FILE nfs-utils-1.0.10-v4-umounts.patch ---
--- nfs-utils-1.0.10/utils/mount/nfsumount.c.orig	2006-12-07 10:25:41.000000000 -0500
+++ nfs-utils-1.0.10/utils/mount/nfsumount.c	2006-12-11 15:00:29.000000000 -0500
@@ -333,7 +333,7 @@ void umount_usage()
 
 int nfsumount(int argc, char *argv[])
 {
-	int c, ret;
+	int c, ret, v4=0;
 	char *spec;
 	struct mntentchn *mc;
 
@@ -371,39 +371,33 @@ int nfsumount(int argc, char *argv[])
 	mc = getmntdirbackward(spec, NULL);
 	if (!mc)
 		mc = getmntdevbackward(spec, NULL);
-	if (!mc && verbose)
-		printf(_("Could not find %s in mtab\n"), spec);
-
-	if(mc) {
-		if(contains(mc->m.mnt_opts, "user") && getuid() != 0) {
-			struct passwd *pw = getpwuid(getuid());
-			if(!pw || strcmp(pw->pw_name, get_value(mc->m.mnt_opts, "user="))) {
-				fprintf(stderr, "%s: permission denied to unmount %s\n",
-						progname, spec);
-				exit(1);
-			}
-		} else {
-			if(!contains(mc->m.mnt_opts, "users") && getuid() != 0) {
-				fprintf(stderr, "%s: only root can unmount %s from %s\n",
-						progname, mc->m.mnt_fsname, mc->m.mnt_dir);
-				exit(1);
-			}
-		}
-
-		ret = 0;
-		if(!force && !lazy)
-			ret = _nfsumount(mc->m.mnt_fsname, mc->m.mnt_opts);
-		if(!ret)
-			ret = add_mtab2(mc->m.mnt_fsname, mc->m.mnt_dir,
-				mc->m.mnt_type, mc->m.mnt_opts, mc);
+	if (mc == NULL) {
+		fprintf(stderr, "%s: Unable to find '%s' in mount table\n",
+				progname, spec);
+		exit(1);
 	}
-	else {
-		ret = 0;
-		if(!force && !lazy)
-			ret = _nfsumount(spec, NULL);
-		if(!ret)
-			ret = add_mtab2(spec, spec, spec, spec, NULL);
+	if(contains(mc->m.mnt_opts, "user") && getuid() != 0) {
+		struct passwd *pw = getpwuid(getuid());
+		if(!pw || strcmp(pw->pw_name, get_value(mc->m.mnt_opts, "user="))) {
+			fprintf(stderr, "%s: permission denied to unmount %s\n",
+					progname, spec);
+			exit(1);
+		}
+	} else {
+		if(!contains(mc->m.mnt_opts, "users") && getuid() != 0) {
+			fprintf(stderr, "%s: only root can unmount %s from %s\n",
+					progname, mc->m.mnt_fsname, mc->m.mnt_dir);
+			exit(1);
+		}
 	}
+	v4 = contains(mc->m.mnt_type, "nfs4");
+
+	ret = 0;
+	if(!force && !lazy && !v4)
+		ret = _nfsumount(mc->m.mnt_fsname, mc->m.mnt_opts);
+	if(!ret)
+		ret = add_mtab2(mc->m.mnt_fsname, mc->m.mnt_dir,
+			mc->m.mnt_type, mc->m.mnt_opts, mc);
 
 	return(ret);
 }


Index: nfs-utils.spec
===================================================================
RCS file: /cvs/dist/rpms/nfs-utils/devel/nfs-utils.spec,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -r1.114 -r1.115
--- nfs-utils.spec	28 Nov 2006 14:18:52 -0000	1.114
+++ nfs-utils.spec	13 Dec 2006 15:10:07 -0000	1.115
@@ -1,7 +1,7 @@
 Summary: NFS utlilities and supporting clients and daemons for the kernel NFS server.
 Name: nfs-utils
 Version: 1.0.10
-Release: 4%{?dist}
+Release: 5%{?dist}
 Epoch: 1
 
 # group all 32bit related archs
@@ -45,6 +45,7 @@
 Patch77: nfs-utils-1.0.10-export-nosubtree.patch
 Patch78: nfs-utils-1.0.10-mount-nfsvers.patch
 Patch79: nfs-utils-1.0.10-udp-no-connect.patch
+Patch80: nfs-utils-1.0.10-v4-umounts.patch
 
 %if %{enablefscache}
 Patch90: nfs-utils-1.0.9-mount-fsc.patch
@@ -111,6 +112,7 @@
 %patch77 -p1
 %patch78 -p1
 %patch79 -p1
+%patch80 -p1
 %if %{enablefscache}
 %patch90 -p1
 %endif
@@ -288,6 +290,9 @@
 %endif
 
 %changelog
+* Wed Dec 13 2006 Steve Dickson <steved at redhat.com> 1.0.10-5
+- Stopped v4 umounts from ping rpc.mountd (bz 215553)
+
 * Wed Nov 28 2006 Steve Dickson <steved at redhat.com> 1.0.10-4
 - Doing a connect on UDP sockets causes the linux network
   stack to reject UDP patches from multi-home server with




More information about the fedora-cvs-commits mailing list