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

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