From cd333c7cf8b83d0755048c3c795c7d4fb08e78e9 Mon Sep 17 00:00:00 2001 From: Ian Kent Date: Feb 19 2014 02:18:32 +0000 Subject: - fix portmap not trying proto v2. --- diff --git a/autofs-5.0.8-fix-portmap-not-trying-proto-v2.patch b/autofs-5.0.8-fix-portmap-not-trying-proto-v2.patch new file mode 100644 index 0000000..73b7b6b --- /dev/null +++ b/autofs-5.0.8-fix-portmap-not-trying-proto-v2.patch @@ -0,0 +1,59 @@ +autofs-5.0.8 - fix portmap not trying proto v2 + +From: Ian Kent + +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. +--- + CHANGELOG | 1 + + lib/rpc_subs.c | 17 ++++++++++++++++- + 2 files changed, 17 insertions(+), 1 deletion(-) + +--- autofs-5.0.8.orig/CHANGELOG ++++ autofs-5.0.8/CHANGELOG +@@ -6,6 +6,7 @@ + - allow --with-systemd to take a path arg. + - fix WITH_LIBTIRPC function name. + - fix ipv6 libtirpc getport. ++- fix protmap not trying proto v2. + + 17/10/2013 autofs-5.0.8 + ======================= +--- autofs-5.0.8.orig/lib/rpc_subs.c ++++ autofs-5.0.8/lib/rpc_subs.c +@@ -524,10 +524,15 @@ static enum clnt_stat rpc_rpcb_getport(C + 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,16 @@ static enum clnt_stat rpc_getport(struct + free(netid); + free(raddr); + ++ 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); ++ } ++ + return status; + } + #endif diff --git a/autofs.spec b/autofs.spec index dae3c38..14b5a33 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.8 -Release: 5%{?dist} +Release: 6%{?dist} Epoch: 1 License: GPLv2+ Group: System Environment/Daemons @@ -24,6 +24,7 @@ Patch8: autofs-5.0.8-fix-ipv6-link-local-address-handling.patch Patch9: autofs-5.0.8-fix-fix-ipv6-libtirpc-getport.patch Patch10: autofs-5.0.8-get_nfs_info-should-query-portmapper-if-port-is-not-given.patch Patch11: autofs-5.0.8-fix-ipv6-libtirpc-getport-proto-not-set.patch +Patch12: autofs-5.0.8-fix-portmap-not-trying-proto-v2.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if %{with_systemd} BuildRequires: systemd-units @@ -92,6 +93,7 @@ echo %{version}-%{release} > .version %patch9 -p1 %patch10 -p1 %patch11 -p1 +%patch12 -p1 %build LDFLAGS=-Wl,-z,now @@ -183,6 +185,9 @@ fi %dir /etc/auto.master.d %changelog +* Wed Feb 19 2013 Ian Kent - 1:5.0.8-6 +- fix portmap not trying proto v2. + * Tue Dec 24 2013 Ian Kent - 1:5.0.8-5 - fix ipv6 link local address handling. - fix fix ipv6 libtirpc getport.