Blame SOURCES/autofs-5.1.0-fix-macro-usage-in-lookup_program_c.patch

306fa1
autofs-5.1.0 - fix macro usage in lookup_program.c
306fa1
306fa1
From: Ian Kent <raven@themaw.net>
306fa1
306fa1
The macro MAPFMT_DEFAULT is used incorrectly in a comparison in
306fa1
modules/lookup_program.c:lookup_one().
306fa1
306fa1
Signed-off-by: Ian Kent <raven@themaw.net>
306fa1
---
306fa1
 CHANGELOG                |    1 +
306fa1
 modules/lookup_program.c |    2 +-
306fa1
 2 files changed, 2 insertions(+), 1 deletion(-)
306fa1
306fa1
--- autofs-5.0.7.orig/CHANGELOG
306fa1
+++ autofs-5.0.7/CHANGELOG
306fa1
@@ -166,6 +166,7 @@
306fa1
 - add config option to force use of program map stdvars.
306fa1
 - fix incorrect check in parse_mount().
306fa1
 - handle duplicates in multi mounts.
306fa1
+- fix macro usage in lookup_program.c.
306fa1
 
306fa1
 25/07/2012 autofs-5.0.7
306fa1
 =======================
306fa1
--- autofs-5.0.7.orig/modules/lookup_program.c
306fa1
+++ autofs-5.0.7/modules/lookup_program.c
306fa1
@@ -190,7 +190,7 @@ static char *lookup_one(struct autofs_po
306fa1
 		 * MAPFMT_DEFAULT must be "sun" for ->parse_init() to have setup
306fa1
 		 * the macro table.
306fa1
 		 */
306fa1
-		if (ctxt->mapfmt && strcmp(ctxt->mapfmt, "MAPFMT_DEFAULT")) {
306fa1
+		if (ctxt->mapfmt && !strcmp(ctxt->mapfmt, MAPFMT_DEFAULT)) {
306fa1
 			struct parse_context *pctxt = (struct parse_context *) ctxt->parse->context;
306fa1
 			/* Add standard environment as seen by sun map parser */
306fa1
 			pctxt->subst = addstdenv(pctxt->subst, prefix);