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

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