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

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