Blame SOURCES/autofs-5.0.7-fix-probe-each-nfs-version-in-turn-for-singleton-mounts.patch

306fa1
autofs-5.0.7 - fix probe each nfs version in turn for singleton mounts
306fa1
306fa1
From: Ian Kent <raven@themaw.net>
306fa1
306fa1
If there aren't any hosts in the list returned from parse_location() make sure
306fa1
the probe checks are skipped.
306fa1
---
306fa1
 CHANGELOG           |    1 +
306fa1
 modules/mount_nfs.c |    2 +-
306fa1
 2 files changed, 2 insertions(+), 1 deletion(-)
306fa1
306fa1
diff --git a/CHANGELOG b/CHANGELOG
306fa1
index 25179b1..0242c11 100644
306fa1
--- a/CHANGELOG
306fa1
+++ b/CHANGELOG
306fa1
@@ -50,6 +50,7 @@
306fa1
 - fix fix map entry duplicate offset detection.
306fa1
 - probe each nfs version in turn for singleton mounts.
306fa1
 - add changlog entry for coverity fixes.
306fa1
+- fix probe each nfs version in turn for singleton mounts.
306fa1
 
306fa1
 25/07/2012 autofs-5.0.7
306fa1
 =======================
306fa1
diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c
306fa1
index 81ba3ca..9de8a73 100644
306fa1
--- a/modules/mount_nfs.c
306fa1
+++ b/modules/mount_nfs.c
306fa1
@@ -190,7 +190,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
306fa1
 	 * to NFSv3 (if it can). If the NFSv4 probe fails then probe as
306fa1
 	 * normal.
306fa1
 	 */
306fa1
-	if (!hosts->next &&
306fa1
+	if ((hosts && !hosts->next) &&
306fa1
 	    mount_default_proto == 4 &&
306fa1
 	    vers & NFS_VERS_MASK != 0 &&
306fa1
 	    vers & NFS4_VERS_MASK != 0) {