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

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