Blame SOURCES/autofs-5.1.4-fix-sublink-option-not-set-from-defaults.patch

306fa1
autofs-5.1.4 - fix sublink option not set from defaults
306fa1
306fa1
From: Ian Kent <raven@themaw.net>
306fa1
306fa1
If the amd entry sublink option is given in a defaults entry
306fa1
it isn't merged into the current entry during parsing.
306fa1
306fa1
Signed-off-by: Ian Kent <raven@themaw.net>
306fa1
---
306fa1
 CHANGELOG           |    1 +
306fa1
 modules/parse_amd.c |   12 ++++++++++++
306fa1
 2 files changed, 13 insertions(+)
306fa1
306fa1
--- autofs-5.0.7.orig/modules/parse_amd.c
306fa1
+++ autofs-5.0.7/modules/parse_amd.c
306fa1
@@ -647,6 +647,18 @@ static void update_with_defaults(struct
306fa1
 		}
306fa1
 	}
306fa1
 
306fa1
+	if (!entry->sublink) {
306fa1
+		if (defaults->sublink) {
306fa1
+			tmp = strdup(defaults->sublink);
306fa1
+			if (tmp)
306fa1
+				entry->sublink = tmp;
306fa1
+		} else {
306fa1
+			v = macro_findvar(sv, "sublink", 2);
306fa1
+			if (v)
306fa1
+				entry->sublink = strdup(v->val);
306fa1
+		}
306fa1
+	}
306fa1
+
306fa1
 	return;
306fa1
 }
306fa1
 
306fa1
--- autofs-5.0.7.orig/CHANGELOG
306fa1
+++ autofs-5.0.7/CHANGELOG
306fa1
@@ -293,6 +293,7 @@
306fa1
 - fix deadlock in dumpmaps.
306fa1
 - dont use array for path when not necessary.
306fa1
 - fix prefix option handling in expand_entry().
306fa1
+- fix sublink option not set from defaults.
306fa1
 
306fa1
 25/07/2012 autofs-5.0.7
306fa1
 =======================