[autofs/f17] - fix nfs4 mount contacts portmap.
Ian Kent
iankent at fedoraproject.org
Fri Aug 3 02:26:14 UTC 2012
commit 0d03739bf5165cd557b8968c8ef23f60ac427a2b
Author: Ian Kent <ikent at redhat.com>
Date: Fri Aug 3 10:25:36 2012 +0800
- fix nfs4 mount contacts portmap.
autofs-5.0.6-fix-nfs4-contacts-portmap.patch | 52 ++++++++++++++++++++++++++
autofs.spec | 7 +++-
2 files changed, 58 insertions(+), 1 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..452ab49
--- /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
+@@ -44,6 +44,7 @@
+ - fix libtirpc name clash.
+ - fix systemd argument passing.
+ - fix get_nfs_info() can incorrectly fail.
++- 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
+@@ -589,6 +589,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,
+@@ -600,9 +603,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 c1bba16..264b78e 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.6
-Release: 21%{?dist}
+Release: 22%{?dist}
Epoch: 1
License: GPLv2+
Group: System Environment/Daemons
@@ -61,6 +61,7 @@ Patch45: autofs-5.0.6-fix-initialization-in-rpc-create_client.patch
Patch46: autofs-5.0.6-fix-libtirpc-name-clash.patch
Patch47: autofs-5.0.6-fix-systemd-argument-passing.patch
Patch48: autofs-5.0.6-fix-get_nfs_info-incorrectly-fails.patch
+Patch49: autofs-5.0.6-fix-nfs4-contacts-portmap.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if %{with_systemd}
BuildRequires: systemd-units
@@ -165,6 +166,7 @@ echo %{version}-%{release} > .version
%patch46 -p1
%patch47 -p1
%patch48 -p1
+%patch49 -p1
%build
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@@ -267,6 +269,9 @@ fi
%dir /etc/auto.master.d
%changelog
+* Mon Aug 3 2012 Ian Kent <kent at redhat.com> - 1:5.0.6-22
+- fix nfs4 mount contacts portmap (bz845313).
+
* Mon Jul 16 2012 Ian Kent <kent at redhat.com> - 1:5.0.6-21
- fix systemd argument passing (bz836524).
- fix get_nfs_info() can incorrectly fail.
More information about the scm-commits
mailing list