Blame SOURCES/autofs-5.0.8-get_nfs_info-should-query-portmapper-if-port-is-not-given.patch

304803
autofs-5.0.8 - get_nfs_info() should query portmapper if port is not given
304803
304803
From: Scott Mayhew <smayhew@redhat.com>
304803
304803
It shouldn't just assume it can use port 2049.
304803
304803
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
304803
---
304803
 CHANGELOG            |    1 +
304803
 modules/replicated.c |    9 ++++++---
304803
 2 files changed, 7 insertions(+), 3 deletions(-)
304803
304803
--- autofs-5.0.7.orig/CHANGELOG
304803
+++ autofs-5.0.7/CHANGELOG
304803
@@ -67,6 +67,7 @@
304803
 - fix ipv6 libtirpc getport.
304803
 - improve timeout option description.
304803
 - fix fix ipv6 libtirpc getport.
304803
+- get_nfs_info() should query portmapper if port is not given.
304803
 
304803
 25/07/2012 autofs-5.0.7
304803
 =======================
304803
--- autofs-5.0.7.orig/modules/replicated.c
304803
+++ autofs-5.0.7/modules/replicated.c
304803
@@ -444,9 +444,12 @@ static unsigned int get_nfs_info(unsigne
304803
 		      host->name, proto, version);
304803
 
304803
 	rpc_info->proto = proto;
304803
-	if (port < 0)
304803
-		rpc_info->port = NFS_PORT;
304803
-	else if (port > 0)
304803
+	if (port < 0) {
304803
+		if (version & NFS4_REQUESTED)
304803
+			rpc_info->port = NFS_PORT;
304803
+		else
304803
+			port = 0;
304803
+	} else if (port > 0)
304803
 		rpc_info->port = port;
304803
 
304803
 	memset(&parms, 0, sizeof(struct pmap));