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

d5dcad
autofs-5.1.4 - fix sublink option not set from defaults
d5dcad
d5dcad
From: Ian Kent <raven@themaw.net>
d5dcad
d5dcad
If the amd entry sublink option is given in a defaults entry
d5dcad
it isn't merged into the current entry during parsing.
d5dcad
d5dcad
Signed-off-by: Ian Kent <raven@themaw.net>
d5dcad
---
d5dcad
 CHANGELOG           |    1 +
d5dcad
 modules/parse_amd.c |   12 ++++++++++++
d5dcad
 2 files changed, 13 insertions(+)
d5dcad
d5dcad
diff --git a/CHANGELOG b/CHANGELOG
d5dcad
index 19aec2ae..756ef927 100644
d5dcad
--- a/CHANGELOG
d5dcad
+++ b/CHANGELOG
d5dcad
@@ -5,6 +5,7 @@ xx/xx/2018 autofs-5.1.5
d5dcad
 - fix deadlock in dumpmaps.
d5dcad
 - dont use array for path when not necessary.
d5dcad
 - fix prefix option handling in expand_entry().
d5dcad
+- fix sublink option not set from defaults.
d5dcad
 
d5dcad
 19/12/2017 autofs-5.1.4
d5dcad
 - fix spec file url.
d5dcad
diff --git a/modules/parse_amd.c b/modules/parse_amd.c
d5dcad
index 1a5a2960..1c962fff 100644
d5dcad
--- a/modules/parse_amd.c
d5dcad
+++ b/modules/parse_amd.c
d5dcad
@@ -645,6 +645,18 @@ static void update_with_defaults(struct amd_entry *defaults,
d5dcad
 		}
d5dcad
 	}
d5dcad
 
d5dcad
+	if (!entry->sublink) {
d5dcad
+		if (defaults->sublink) {
d5dcad
+			tmp = strdup(defaults->sublink);
d5dcad
+			if (tmp)
d5dcad
+				entry->sublink = tmp;
d5dcad
+		} else {
d5dcad
+			v = macro_findvar(sv, "sublink", 2);
d5dcad
+			if (v)
d5dcad
+				entry->sublink = strdup(v->val);
d5dcad
+		}
d5dcad
+	}
d5dcad
+
d5dcad
 	return;
d5dcad
 }
d5dcad