49 lines
1.2 KiB
Diff
49 lines
1.2 KiB
Diff
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(+)
|
|
|
|
diff --git a/CHANGELOG b/CHANGELOG
|
|
index 19aec2ae..756ef927 100644
|
|
--- a/CHANGELOG
|
|
+++ b/CHANGELOG
|
|
@@ -5,6 +5,7 @@ xx/xx/2018 autofs-5.1.5
|
|
- 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.
|
|
|
|
19/12/2017 autofs-5.1.4
|
|
- fix spec file url.
|
|
diff --git a/modules/parse_amd.c b/modules/parse_amd.c
|
|
index 1a5a2960..1c962fff 100644
|
|
--- a/modules/parse_amd.c
|
|
+++ b/modules/parse_amd.c
|
|
@@ -645,6 +645,18 @@ static void update_with_defaults(struct amd_entry *defaults,
|
|
}
|
|
}
|
|
|
|
+ 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;
|
|
}
|
|
|