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

304803
autofs-5.1.4 - fix amd parser opts option handling
304803
304803
From: Ian Kent <raven@themaw.net>
304803
304803
The recent implementation of the amd map program mount feature
304803
introduced a regression in the amd parser where only the first
304803
option of a comma separated list of is applied to a mount entry.
304803
304803
Signed-off-by: Ian Kent <raven@themaw.net>
304803
---
304803
 CHANGELOG           |    1 +
304803
 modules/amd_parse.y |    4 ++--
304803
 modules/parse_amd.c |    4 +++-
304803
 3 files changed, 6 insertions(+), 3 deletions(-)
304803
304803
--- autofs-5.0.7.orig/CHANGELOG
304803
+++ autofs-5.0.7/CHANGELOG
304803
@@ -309,6 +309,7 @@
304803
 - add version parameter to rpc_ping().
304803
 - set bind mount as propagation slave.
304803
 - add master map pseudo options for mount propagation.
304803
+- fix amd parser opts option handling.
304803
 
304803
 25/07/2012 autofs-5.0.7
304803
 =======================
304803
--- autofs-5.0.7.orig/modules/amd_parse.y
304803
+++ autofs-5.0.7/modules/amd_parse.y
304803
@@ -401,7 +401,7 @@ option_assignment: MAP_OPTION OPTION_ASS
304803
 	}
304803
 	| MNT_OPTION OPTION_ASSIGN options
304803
 	{
304803
-		if (!match_mnt_option_options($1, $3)) {
304803
+		if (!match_mnt_option_options($1, opts)) {
304803
 			amd_notify($1);
304803
 			YYABORT;
304803
 		}
304803
@@ -409,7 +409,7 @@ option_assignment: MAP_OPTION OPTION_ASS
304803
 	}
304803
 	| MNT_OPTION OPTION_ASSIGN QUOTE options QUOTE
304803
 	{
304803
-		if (!match_mnt_option_options($1, $4)) {
304803
+		if (!match_mnt_option_options($1, opts)) {
304803
 			amd_notify($1);
304803
 			YYABORT;
304803
 		}
304803
--- autofs-5.0.7.orig/modules/parse_amd.c
304803
+++ autofs-5.0.7/modules/parse_amd.c
304803
@@ -2117,6 +2117,7 @@ int parse_mount(struct autofs_point *ap,
304803
 			list_del_init(&this->list);
304803
 			cur_defaults = this;
304803
 			update_with_defaults(defaults_entry, cur_defaults, sv);
304803
+			debug(ap->logopt, "merged /defaults entry with defaults");
304803
 			continue;
304803
 		} else if (this->flags & AMD_DEFAULTS_RESET) {
304803
 			struct amd_entry *nd, *new;
304803
@@ -2155,8 +2156,9 @@ int parse_mount(struct autofs_point *ap,
304803
 
304803
 		at_least_one = 1;
304803
 
304803
-		debug(ap->logopt, "expand mount entry");
304803
+		debug(ap->logopt, "update mount entry with defaults");
304803
 		update_with_defaults(cur_defaults, this, sv);
304803
+		debug(ap->logopt, "expand mount entry");
304803
 		sv = expand_entry(ap, this, flags, sv);
304803
 		sv = merge_entry_options(ap, this, sv);
304803
 		normalize_sublink(ap->logopt, this, sv);