[autofs/f19] - fix probe each nfs version in turn for singleton mounts (bz973537).

Ian Kent iankent at fedoraproject.org
Thu Jun 13 07:02:00 UTC 2013


commit 7f0c6f8d8bc3361b0ccd37fdb0122f615bdc2405
Author: Ian Kent <raven at themaw.net>
Date:   Thu Jun 13 15:01:24 2013 +0800

    - fix probe each nfs version in turn for singleton mounts (bz973537).

 ...-nfs-version-in-turn-for-singleton-mounts.patch |   36 ++++++++++++++++++++
 autofs.spec                                        |    7 +++-
 2 files changed, 42 insertions(+), 1 deletions(-)
---
diff --git a/autofs-5.0.7-fix-probe-each-nfs-version-in-turn-for-singleton-mounts.patch b/autofs-5.0.7-fix-probe-each-nfs-version-in-turn-for-singleton-mounts.patch
new file mode 100644
index 0000000..1801878
--- /dev/null
+++ b/autofs-5.0.7-fix-probe-each-nfs-version-in-turn-for-singleton-mounts.patch
@@ -0,0 +1,36 @@
+autofs-5.0.7 - fix probe each nfs version in turn for singleton mounts
+
+From: Ian Kent <raven at themaw.net>
+
+If there aren't any hosts in the list returned from parse_location() make sure
+the probe checks are skipped.
+---
+ CHANGELOG           |    1 +
+ modules/mount_nfs.c |    2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/CHANGELOG b/CHANGELOG
+index 25179b1..0242c11 100644
+--- a/CHANGELOG
++++ b/CHANGELOG
+@@ -50,6 +50,7 @@
+ - fix fix map entry duplicate offset detection.
+ - probe each nfs version in turn for singleton mounts.
+ - add changlog entry for coverity fixes.
++- fix probe each nfs version in turn for singleton mounts.
+ 
+ 25/07/2012 autofs-5.0.7
+ =======================
+diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c
+index 81ba3ca..9de8a73 100644
+--- a/modules/mount_nfs.c
++++ b/modules/mount_nfs.c
+@@ -190,7 +190,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
+ 	 * to NFSv3 (if it can). If the NFSv4 probe fails then probe as
+ 	 * normal.
+ 	 */
+-	if (!hosts->next &&
++	if ((hosts && !hosts->next) &&
+ 	    mount_default_proto == 4 &&
+ 	    vers & NFS_VERS_MASK != 0 &&
+ 	    vers & NFS4_VERS_MASK != 0) {
diff --git a/autofs.spec b/autofs.spec
index f7765ae..eb00286 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: 20%{?dist}
+Release: 21%{?dist}
 Epoch: 1
 License: GPLv2+
 Group: System Environment/Daemons
@@ -91,6 +91,7 @@ Patch75: autofs-5.0.7-add-initialization-of-bind_result-in.patch-do_sasl_bind.pa
 Patch76: autofs-5.0.7-fix-incorrect-check-in-flag_is_owned.patch
 Patch77: autofs-5.0.7-fix-possible-use-after-free-in-lookup_dir-lookup_init.patch
 Patch78: autofs-5.0.7-add-changlog-entry-for-coverity-fixes.patch
+Patch79: autofs-5.0.7-fix-probe-each-nfs-version-in-turn-for-singleton-mounts.patch
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 %if %{with_systemd}
 BuildRequires: systemd-units
@@ -226,6 +227,7 @@ echo %{version}-%{release} > .version
 %patch76 -p1
 %patch77 -p1
 %patch78 -p1
+%patch79 -p1
 
 %build
 #CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@@ -317,6 +319,9 @@ fi
 %dir /etc/auto.master.d
 
 %changelog
+* Wed Jun 12 2013 Ian Kent <ikent at redhat.com> - 1:5.0.7-21
+- fix probe each nfs version in turn for singleton mounts (bz973537).
+
 * Tue Jun 11 2013 Ian Kent <ikent at redhat.com> - 1:5.0.7-20
 - fix master map mount options matching.
 - fix master map bogus keywork match.


More information about the scm-commits mailing list