[autofs/f20] - fix protmap not trying proto v2 (bz1038356).
Ian Kent
iankent at fedoraproject.org
Thu Dec 26 13:08:24 UTC 2013
commit ce88562a3a8718d1e48ae365961d5a484ef1ee6b
Author: Ian Kent <raven at themaw.net>
Date: Thu Dec 26 21:08:04 2013 +0800
- fix protmap not trying proto v2 (bz1038356).
autofs-5.0.8-fix-fix-ipv6-libtirpc-getport.patch | 10 ++--
...8-fix-ipv6-libtirpc-getport-proto-not-set.patch | 8 +--
autofs-5.0.8-fix-protmap-not-trying-proto-v2.patch | 52 ++++++++++++++++++++
...uld-query-portmapper-if-port-is-not-given.patch | 8 +--
autofs.spec | 8 +++-
5 files changed, 69 insertions(+), 17 deletions(-)
---
diff --git a/autofs-5.0.8-fix-fix-ipv6-libtirpc-getport.patch b/autofs-5.0.8-fix-fix-ipv6-libtirpc-getport.patch
index 70877ca..27278ea 100644
--- a/autofs-5.0.8-fix-fix-ipv6-libtirpc-getport.patch
+++ b/autofs-5.0.8-fix-fix-ipv6-libtirpc-getport.patch
@@ -8,11 +8,9 @@ can never be reached, in rpc_rpcb_getport().
lib/rpc_subs.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
-diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c
-index 9d5b2f5..cfb63d2 100644
---- a/lib/rpc_subs.c
-+++ b/lib/rpc_subs.c
-@@ -524,7 +524,6 @@ static enum clnt_stat rpc_rpcb_getport(CLIENT *client,
+--- autofs-5.0.7.orig/lib/rpc_subs.c
++++ autofs-5.0.7/lib/rpc_subs.c
+@@ -524,7 +524,6 @@ static enum clnt_stat rpc_rpcb_getport(C
if (rpcerr.re_vers.low > RPCBVERS4)
return status;
continue;
@@ -20,7 +18,7 @@ index 9d5b2f5..cfb63d2 100644
case RPC_PROGUNAVAIL:
continue;
default:
-@@ -533,10 +532,7 @@ static enum clnt_stat rpc_rpcb_getport(CLIENT *client,
+@@ -533,10 +532,7 @@ static enum clnt_stat rpc_rpcb_getport(C
}
}
diff --git a/autofs-5.0.8-fix-ipv6-libtirpc-getport-proto-not-set.patch b/autofs-5.0.8-fix-ipv6-libtirpc-getport-proto-not-set.patch
index f335fa5..68c78d1 100644
--- a/autofs-5.0.8-fix-ipv6-libtirpc-getport-proto-not-set.patch
+++ b/autofs-5.0.8-fix-ipv6-libtirpc-getport-proto-not-set.patch
@@ -17,11 +17,9 @@ in oder to function.
lib/rpc_subs.c | 2 ++
1 file changed, 2 insertions(+)
-diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c
-index cfb63d2..7c99ea8 100644
---- a/lib/rpc_subs.c
-+++ b/lib/rpc_subs.c
-@@ -877,6 +877,8 @@ int rpc_portmap_getport(struct conn_info *info,
+--- autofs-5.0.7.orig/lib/rpc_subs.c
++++ autofs-5.0.7/lib/rpc_subs.c
+@@ -877,6 +877,8 @@ int rpc_portmap_getport(struct conn_info
memset(&pmap_info, 0, sizeof(struct conn_info));
diff --git a/autofs-5.0.8-fix-protmap-not-trying-proto-v2.patch b/autofs-5.0.8-fix-protmap-not-trying-proto-v2.patch
new file mode 100644
index 0000000..2a66e52
--- /dev/null
+++ b/autofs-5.0.8-fix-protmap-not-trying-proto-v2.patch
@@ -0,0 +1,52 @@
+autofs-5.0.8 - fix protmap not trying proto v2
+
+From: Ian Kent <raven at themaw.net>
+
+The latest change to fix a problem with getting an exports list
+from a server doesn't try portmap version 2 when trying to get
+a service port number. This causes servers that offer only
+version 2 to not be able to provide a service port number.
+---
+ lib/rpc_subs.c | 19 ++++++++++++++++++-
+ 1 file changed, 18 insertions(+), 1 deletion(-)
+
+diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c
+index 7c99ea8..aeece1e 100644
+--- a/lib/rpc_subs.c
++++ b/lib/rpc_subs.c
+@@ -524,10 +524,15 @@ static enum clnt_stat rpc_rpcb_getport(CLIENT *client,
+ if (rpcerr.re_vers.low > RPCBVERS4)
+ return status;
+ continue;
++
+ case RPC_PROGUNAVAIL:
+ continue;
++
++ case RPC_PROGNOTREGISTERED:
++ continue;
++
+ default:
+- /* Most likely RPC_TIMEDOUT or RPC_CANTRECV */
++ /* Most likely RPC_TIMEDOUT or RPC_CANTRECV */
+ return status;
+ }
+ }
+@@ -575,6 +580,18 @@ static enum clnt_stat rpc_getport(struct conn_info *info,
+ free(netid);
+ free(raddr);
+
++ error(LOGOPT_ANY, "status %d", status);
++ if (status == RPC_PROGNOTREGISTERED) {
++ /* Last chance, version 2 uses a different procedure */
++ rpcvers_t rpcb_version = PMAPVERS;
++ CLNT_CONTROL(client, CLSET_VERS, (void *) &rpcb_version);
++ status = clnt_call(client, PMAPPROC_GETPORT,
++ (xdrproc_t) xdr_pmap, (caddr_t) parms,
++ (xdrproc_t) xdr_u_short, (caddr_t) port,
++ info->timeout);
++ error(LOGOPT_ANY, "v2 %d %d", status, *port);
++ }
++
+ return status;
+ }
+ #endif
diff --git a/autofs-5.0.8-get_nfs_info-should-query-portmapper-if-port-is-not-given.patch b/autofs-5.0.8-get_nfs_info-should-query-portmapper-if-port-is-not-given.patch
index 8b8a7f2..f796db6 100644
--- a/autofs-5.0.8-get_nfs_info-should-query-portmapper-if-port-is-not-given.patch
+++ b/autofs-5.0.8-get_nfs_info-should-query-portmapper-if-port-is-not-given.patch
@@ -9,11 +9,9 @@ Signed-off-by: Scott Mayhew <smayhew at redhat.com>
modules/replicated.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
-diff --git a/modules/replicated.c b/modules/replicated.c
-index 5fdd9d9..2463235 100644
---- a/modules/replicated.c
-+++ b/modules/replicated.c
-@@ -444,9 +444,12 @@ static unsigned int get_nfs_info(unsigned logopt, struct host *host,
+--- autofs-5.0.7.orig/modules/replicated.c
++++ autofs-5.0.7/modules/replicated.c
+@@ -444,9 +444,12 @@ static unsigned int get_nfs_info(unsigne
host->name, proto, version);
rpc_info->proto = proto;
diff --git a/autofs.spec b/autofs.spec
index 475c6a6..9cbdef6 100644
--- a/autofs.spec
+++ b/autofs.spec
@@ -8,7 +8,7 @@
Summary: A tool for automatically mounting and unmounting filesystems
Name: autofs
Version: 5.0.7
-Release: 38%{?dist}
+Release: 39%{?dist}
Epoch: 1
License: GPLv2+
Group: System Environment/Daemons
@@ -108,6 +108,7 @@ Patch92: autofs-5.0.8-fix-ipv6-link-local-address-handling.patch
Patch93: autofs-5.0.8-fix-fix-ipv6-libtirpc-getport.patch
Patch94: autofs-5.0.8-get_nfs_info-should-query-portmapper-if-port-is-not-given.patch
Patch95: autofs-5.0.8-fix-ipv6-libtirpc-getport-proto-not-set.patch
+Patch96: autofs-5.0.8-fix-protmap-not-trying-proto-v2.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if %{with_systemd}
BuildRequires: systemd-units
@@ -260,6 +261,7 @@ echo %{version}-%{release} > .version
%patch93 -p1
%patch94 -p1
%patch95 -p1
+%patch96 -p1
%build
LDFLAGS=-Wl,-z,now
@@ -351,6 +353,10 @@ fi
%dir /etc/auto.master.d
%changelog
+* Tue Dec 24 2013 Ian Kent <ikent at redhat.com> - 1:5.0.7-39
+- fix protmap not trying proto v2 (bz1038356).
+- update changelog.
+
* Tue Dec 24 2013 Ian Kent <ikent at redhat.com> - 1:5.0.7-38
- fix ipv6 link local address handling (bz1038356).
- fix fix ipv6 libtirpc getport (bz1038356).
More information about the scm-commits
mailing list