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

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