rpms/util-linux/devel util-linux-2.12p-nfsmount-rollback.patch, NONE, 1.1 util-linux-2.12a-nfsmount-reservp.patch, 1.1, 1.2 util-linux.spec, 1.65, 1.66

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Mar 31 21:02:31 UTC 2005


Update of /cvs/dist/rpms/util-linux/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv6971

Modified Files:
	util-linux-2.12a-nfsmount-reservp.patch util-linux.spec 
Added Files:
	util-linux-2.12p-nfsmount-rollback.patch 
Log Message:
Fixed nfs mount to rollback correctly.


util-linux-2.12p-nfsmount-rollback.patch:
 nfsmount.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

--- NEW FILE util-linux-2.12p-nfsmount-rollback.patch ---
--- util-linux-2.12p/mount/nfsmount.c.orig	2005-03-28 11:26:54.000000000 -0500
+++ util-linux-2.12p/mount/nfsmount.c	2005-03-31 10:18:10.140892480 -0500
@@ -380,6 +380,8 @@ getport(
 		clnt_destroy(clnt);
 		if (stat != RPC_SUCCESS)
 			port = 0;
+		else if (port == 0)
+			rpc_createerr.cf_stat = RPC_PROGNOTREGISTERED;
 	}
 	if (socket != 1)
 		close(socket);
@@ -451,12 +453,11 @@ probe_port(clnt_addr_t *server, 
 {
 	struct sockaddr_in *saddr = &server->saddr;
 	struct pmap *pmap = &server->pmap;
-	const u_long prog = pmap->pm_prog,
-		vers = pmap->pm_vers,
-		*p_vers;
+	const u_long prog = pmap->pm_prog, *p_vers;
 	const u_int prot = (u_int)pmap->pm_prot,
 		*p_prot;
 	const u_short port = (u_short) pmap->pm_port;
+	u_long vers = pmap->pm_vers;
 	u_short p_port;
 	p_prot = prot ? &prot : protos;
 	p_vers = vers ? &vers : versions;
@@ -477,6 +478,10 @@ probe_port(clnt_addr_t *server, 
 				continue;
 			p_prot = protos;
 		}
+		if (vers == pmap->pm_vers) {
+			p_vers = versions;
+			vers = 0;
+		}
 		if (vers || !*++p_vers)
 			break;
 	}
@@ -540,7 +545,7 @@ probe_bothports(clnt_addr_t *mnt_server,
 	for (probe_vers = mnt_probelist(MAX_MNTPROT); *probe_vers; probe_vers++) {
 		nfs_pmap->pm_vers = mntvers_to_nfs(*probe_vers);
 		if ((res = probe_nfsport(nfs_server) != 0)) {
-			mnt_pmap->pm_vers = *probe_vers;
+			mnt_pmap->pm_vers = nfsvers_to_mnt(nfs_pmap->pm_vers);
 			if ((res = probe_mntport(mnt_server)) != 0)
 				return 1;
 			memcpy(mnt_pmap, &save_mnt, sizeof(*mnt_pmap));

util-linux-2.12a-nfsmount-reservp.patch:
 nfsmount.c |  138 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 132 insertions(+), 6 deletions(-)

Index: util-linux-2.12a-nfsmount-reservp.patch
===================================================================
RCS file: /cvs/dist/rpms/util-linux/devel/util-linux-2.12a-nfsmount-reservp.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- util-linux-2.12a-nfsmount-reservp.patch	26 Feb 2005 00:36:30 -0000	1.1
+++ util-linux-2.12a-nfsmount-reservp.patch	31 Mar 2005 21:02:28 -0000	1.2
@@ -10,7 +10,7 @@
 + * RPC_ANYSOCK is returned which will cause 
 + * the RPC code to create the socket instead. 
 + */
-+int
++static int
 +get_socket(struct sockaddr_in *saddr, u_int p_prot, int resvp)
 +{
 +	int so, cc, type;
@@ -75,7 +75,7 @@
 + * instead of reserve ports since reserve ports
 + * are not needed for pmap requests.
 + */
-+u_short
++static u_short
 +getport(
 +	struct sockaddr_in *saddr, 
 +	u_long prog, 


Index: util-linux.spec
===================================================================
RCS file: /cvs/dist/rpms/util-linux/devel/util-linux.spec,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- util-linux.spec	25 Mar 2005 12:21:09 -0000	1.65
+++ util-linux.spec	31 Mar 2005 21:02:28 -0000	1.66
@@ -27,7 +27,7 @@
 Summary: A collection of basic system utilities.
 Name: util-linux
 Version: 2.12p
-Release: 4
+Release: 5
 License: distributable
 Group: System Environment/Base
 
@@ -107,6 +107,7 @@
 Patch171: util-linux-2.12a-mount-proto.patch
 Patch172: util-linux-2.12a-nfsmount-overflow.patch
 Patch173: util-linux-2.12a-nfsmount-reservp.patch
+Patch174: util-linux-2.12p-nfsmount-rollback.patch
 
 # Makeing /var/log/lastlog (#151635)
 Patch180: util-linux-2.12p-login-lastlog.patch
@@ -230,6 +231,7 @@
 %patch171 -p1
 %patch172 -p1
 %patch173 -p1
+%patch174 -p1
 
 %patch180 -p1 -b .lastlog
 %patch181 -p1
@@ -625,6 +627,9 @@
 /sbin/losetup
 
 %changelog
+* Thu Mar 31 2005 Steve Dickson <SteveD at RedHat.com> 2.12p-5
+- Fixed nfs mount to rollback correctly.
+
 * Fri Mar 25 2005 Karel Zak <kzak at redhat.com> 2.12p-4
 - added /var/log/lastlog to util-linux (#151635)
 - disabled 'newgrp' in util-linux (enabled in shadow-utils) (#149997, #151613)




More information about the fedora-cvs-commits mailing list