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

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