From 2672a83582fe57f5db206c3fc3eb8404624b541a Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 08:03:55 +0000 Subject: Apply patch autofs-5.1.4-fix-prefix-option-handling-in-expand_entry.patch patch_name: autofs-5.1.4-fix-prefix-option-handling-in-expand_entry.patch present_in_specfile: true --- diff --git a/CHANGELOG b/CHANGELOG index 13f0139..19aec2a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ xx/xx/2018 autofs-5.1.5 - fix use after free in do_master_list_reset(). - fix deadlock in dumpmaps. - dont use array for path when not necessary. +- fix prefix option handling in expand_entry(). 19/12/2017 autofs-5.1.4 - fix spec file url. diff --git a/modules/parse_amd.c b/modules/parse_amd.c index 2cce541..1a5a296 100644 --- a/modules/parse_amd.c +++ b/modules/parse_amd.c @@ -725,6 +725,17 @@ static struct substvar *expand_entry(struct autofs_point *ap, entry->rhost = host; } next: + if (entry->pref) { + if (expand_selectors(ap, entry->pref, &expand, sv)) { + debug(logopt, MODPREFIX + "pref expand(\"%s\") -> %s", + entry->pref, expand); + free(entry->pref); + entry->pref = expand; + } + sv = macro_addvar(sv, "pref", 4, entry->pref); + } + if (entry->sublink) { if (expand_selectors(ap, entry->sublink, &expand, sv)) { debug(logopt, MODPREFIX