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

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