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

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