[autofs/f16] - also add nfs4 contacts portmap fix.
Ian Kent
iankent at fedoraproject.org
Thu Aug 9 05:56:48 UTC 2012
commit 16d3282ce4ed55c7e1a67c219de9608edf5b3510
Author: Ian Kent <ikent at redhat.com>
Date: Thu Aug 9 13:56:02 2012 +0800
- also add nfs4 contacts portmap fix.
autofs-5.0.6-fix-nfs4-contacts-portmap.patch | 52 ++++++++++++++++++++++++++
autofs.spec | 3 +
2 files changed, 55 insertions(+), 0 deletions(-)
---
diff --git a/autofs-5.0.6-fix-nfs4-contacts-portmap.patch b/autofs-5.0.6-fix-nfs4-contacts-portmap.patch
new file mode 100644
index 0000000..126551d
--- /dev/null
+++ b/autofs-5.0.6-fix-nfs4-contacts-portmap.patch
@@ -0,0 +1,52 @@
+autofs-5.0.6 - fix nfs4 contacts portmap
+
+From: Ian Kent <ikent at redhat.com>
+
+When an fstype of nfs4 is specified probing the server for availability
+should not need to contact the portmapper, it should use either the port
+specified by the port= option or use port 2049.
+
+However, in function modules/replicated.c:get_nfs_info() a check for the
+port= option, and subsequent portmap lookup when not it's not present, is
+done before the check for whether nfsv3 is to be checked at all.
+
+Oops!
+---
+
+ CHANGELOG | 1 +
+ modules/replicated.c | 6 +++---
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+
+--- autofs-5.0.6.orig/CHANGELOG
++++ autofs-5.0.6/CHANGELOG
+@@ -17,6 +17,7 @@
+ - fix ipv6 name lookup check.
+ - fix ipv6 rpc calls.
+ - fix ipv6 configure check.
++- fix nfs4 contacts portmap.
+
+ 28/06/2011 autofs-5.0.6
+ -----------------------
+--- autofs-5.0.6.orig/modules/replicated.c
++++ autofs-5.0.6/modules/replicated.c
+@@ -585,6 +585,9 @@ static unsigned int get_nfs_info(unsigne
+ }
+
+ v3_ver:
++ if (!(version & NFS3_REQUESTED))
++ goto v2_ver;
++
+ if (!have_port_opt) {
+ status = rpc_portmap_getclient(pm_info,
+ host->name, host->addr, host->addr_len,
+@@ -593,9 +596,6 @@ v3_ver:
+ goto done_ver;
+ }
+
+- if (!(version & NFS3_REQUESTED))
+- goto v2_ver;
+-
+ if (have_port_opt) {
+ if (!(rpc_info->port = get_port_option(options)))
+ goto done_ver;
diff --git a/autofs.spec b/autofs.spec
index 402bfad..b6bb095 100644
--- a/autofs.spec
+++ b/autofs.spec
@@ -28,6 +28,7 @@ Patch16: autofs-5.0.6-fix-improve-mount-location-error-reporting.patch
Patch17: autofs-5.0.6-fix-ipv6-name-lookup-check.patch
Patch18: autofs-5.0.6-fix-ipv6-rpc-calls.patch
Patch19: autofs-5.0.6-fix-ipv6-configure-check.patch
+Patch20: autofs-5.0.6-fix-nfs4-contacts-portmap.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel module-init-tools util-linux nfs-utils e2fsprogs libtirpc-devel
Conflicts: cyrus-sasl-lib < 2.1.23-9
@@ -89,6 +90,7 @@ echo %{version}-%{release} > .version
%patch17 -p1
%patch18 -p1
%patch19 -p1
+%patch20 -p1
%build
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@@ -147,6 +149,7 @@ fi
- fix ipv6 name lookup check (bz711844).
- fix ipv6 rpc calls (bz711844).
- fix ipv6 configure check (bz711844).
+- fix nfs4 contacts portmap (bz711844).
* Mon Jan 23 2012 Ian Kent <ikent at redhat.com> - 1:5.0.6-5
- fix fix wait for master source mutex.
More information about the scm-commits
mailing list