From 19c1f861382f64a9d42dc4cbedf5cf1b91536846 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 11 2020 22:13:17 +0000 Subject: Apply patch autofs-5.1.4-fix-amd-parser-opts-option-handling.patch patch_name: autofs-5.1.4-fix-amd-parser-opts-option-handling.patch present_in_specfile: true --- diff --git a/CHANGELOG b/CHANGELOG index 08634e7..4014d4a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -35,6 +35,7 @@ xx/xx/2018 autofs-5.1.5 - fix age setting at startup. - fix use after free in parse_ldap_config(). - fix incorrect locking in sss lookup. +- fix amd parser opts option handling. 19/12/2017 autofs-5.1.4 - fix spec file url. diff --git a/modules/amd_parse.y b/modules/amd_parse.y index 5bd688d..be923c2 100644 --- a/modules/amd_parse.y +++ b/modules/amd_parse.y @@ -401,7 +401,7 @@ option_assignment: MAP_OPTION OPTION_ASSIGN FS_TYPE } | MNT_OPTION OPTION_ASSIGN options { - if (!match_mnt_option_options($1, $3)) { + if (!match_mnt_option_options($1, opts)) { amd_notify($1); YYABORT; } @@ -409,7 +409,7 @@ option_assignment: MAP_OPTION OPTION_ASSIGN FS_TYPE } | MNT_OPTION OPTION_ASSIGN QUOTE options QUOTE { - if (!match_mnt_option_options($1, $4)) { + if (!match_mnt_option_options($1, opts)) { amd_notify($1); YYABORT; } diff --git a/modules/parse_amd.c b/modules/parse_amd.c index ea57270..627c3c0 100644 --- a/modules/parse_amd.c +++ b/modules/parse_amd.c @@ -2136,6 +2136,7 @@ int parse_mount(struct autofs_point *ap, const char *name, list_del_init(&this->list); cur_defaults = this; update_with_defaults(defaults_entry, cur_defaults, sv); + debug(ap->logopt, "merged /defaults entry with defaults"); continue; } else if (this->flags & AMD_DEFAULTS_RESET) { struct amd_entry *nd, *new; @@ -2174,8 +2175,9 @@ int parse_mount(struct autofs_point *ap, const char *name, at_least_one = 1; - debug(ap->logopt, "expand mount entry"); + debug(ap->logopt, "update mount entry with defaults"); update_with_defaults(cur_defaults, this, sv); + debug(ap->logopt, "expand mount entry"); sv = expand_entry(ap, this, flags, sv); sv = merge_entry_options(ap, this, sv); normalize_sublink(ap->logopt, this, sv);