Blob Blame History Raw
autofs-5.1.4 - fix sublink option not set from defaults

From: Ian Kent <raven@themaw.net>

If the amd entry sublink option is given in a defaults entry
it isn't merged into the current entry during parsing.

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

--- autofs-5.0.7.orig/modules/parse_amd.c
+++ autofs-5.0.7/modules/parse_amd.c
@@ -647,6 +647,18 @@ static void update_with_defaults(struct
 		}
 	}
 
+	if (!entry->sublink) {
+		if (defaults->sublink) {
+			tmp = strdup(defaults->sublink);
+			if (tmp)
+				entry->sublink = tmp;
+		} else {
+			v = macro_findvar(sv, "sublink", 2);
+			if (v)
+				entry->sublink = strdup(v->val);
+		}
+	}
+
 	return;
 }
 
--- autofs-5.0.7.orig/CHANGELOG
+++ autofs-5.0.7/CHANGELOG
@@ -293,6 +293,7 @@
 - fix deadlock in dumpmaps.
 - dont use array for path when not necessary.
 - fix prefix option handling in expand_entry().
+- fix sublink option not set from defaults.
 
 25/07/2012 autofs-5.0.7
 =======================