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

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