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

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