Blame SOURCES/autofs-5.1.4-fix-amd-parser-opts-option-handling.patch

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