Blob Blame History Raw
autofs-5.1.3 - fix incorrect check in validate_program_options()

From: Ian Kent <raven@themaw.net>

Fix incorrectly checking *entry->fs when entry->fs is NULL in
validate_program_options().

Signed-off-by: Ian Kent <raven@themaw.net>
---
 CHANGELOG           |    1 +
 modules/parse_amd.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

--- autofs-5.0.7.orig/CHANGELOG
+++ autofs-5.0.7/CHANGELOG
@@ -284,6 +284,7 @@
 - add amd mount type program mount support.
 - fix memory leak in umount_amd_ext_mount().
 - fix strerror_r() parameter declaration in do program_mount().
+- fix incorrect check in validate_program_options().
 
 25/07/2012 autofs-5.0.7
 =======================
--- autofs-5.0.7.orig/modules/parse_amd.c
+++ autofs-5.0.7/modules/parse_amd.c
@@ -1477,7 +1477,7 @@ static unsigned int validate_program_opt
 		return 0;
 	}
 
-	if (!entry->fs && !*entry->fs) {
+	if (!entry->fs || !*entry->fs) {
 		error(logopt, MODPREFIX
 		    "%s: ${fs} must be used as the mount point but is not set",
 		    entry->type);