autofs/SOURCES/autofs-5.1.4-fix-amd-parser-opts-option-handling.patch
2021-10-08 09:50:49 +00:00

67 lines
2.1 KiB
Diff

autofs-5.1.4 - fix amd parser opts option handling
From: Ian Kent <raven@themaw.net>
The recent implementation of the amd map program mount feature
introduced a regression in the amd parser where only the first
option of a comma separated list of is applied to a mount entry.
Signed-off-by: Ian Kent <raven@themaw.net>
---
CHANGELOG | 1 +
modules/amd_parse.y | 4 ++--
modules/parse_amd.c | 4 +++-
3 files changed, 6 insertions(+), 3 deletions(-)
--- autofs-5.1.4.orig/CHANGELOG
+++ autofs-5.1.4/CHANGELOG
@@ -35,6 +35,7 @@ xx/xx/2018 autofs-5.1.5
- fix age setting at startup.
- fix use after free in parse_ldap_config().
- fix incorrect locking in sss lookup.
+- fix amd parser opts option handling.
19/12/2017 autofs-5.1.4
- fix spec file url.
--- autofs-5.1.4.orig/modules/amd_parse.y
+++ autofs-5.1.4/modules/amd_parse.y
@@ -401,7 +401,7 @@ option_assignment: MAP_OPTION OPTION_ASS
}
| MNT_OPTION OPTION_ASSIGN options
{
- if (!match_mnt_option_options($1, $3)) {
+ if (!match_mnt_option_options($1, opts)) {
amd_notify($1);
YYABORT;
}
@@ -409,7 +409,7 @@ option_assignment: MAP_OPTION OPTION_ASS
}
| MNT_OPTION OPTION_ASSIGN QUOTE options QUOTE
{
- if (!match_mnt_option_options($1, $4)) {
+ if (!match_mnt_option_options($1, opts)) {
amd_notify($1);
YYABORT;
}
--- autofs-5.1.4.orig/modules/parse_amd.c
+++ autofs-5.1.4/modules/parse_amd.c
@@ -2136,6 +2136,7 @@ int parse_mount(struct autofs_point *ap,
list_del_init(&this->list);
cur_defaults = this;
update_with_defaults(defaults_entry, cur_defaults, sv);
+ debug(ap->logopt, "merged /defaults entry with defaults");
continue;
} else if (this->flags & AMD_DEFAULTS_RESET) {
struct amd_entry *nd, *new;
@@ -2174,8 +2175,9 @@ int parse_mount(struct autofs_point *ap,
at_least_one = 1;
- debug(ap->logopt, "expand mount entry");
+ debug(ap->logopt, "update mount entry with defaults");
update_with_defaults(cur_defaults, this, sv);
+ debug(ap->logopt, "expand mount entry");
sv = expand_entry(ap, this, flags, sv);
sv = merge_entry_options(ap, this, sv);
normalize_sublink(ap->logopt, this, sv);