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

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