autofs-5.1.8 - fix incorrect matching of cached wildcard key From: Ian Kent During the implementation of amd format map entry support the code to match a cached key was modified. Unfortunately there's a case were the key lookup behaves incorrectly. That case is when there are included maps in the map itself and one of the maps (usually the last) has a wildcard key entry. In this case the wildcard key may be found during lookup but the map it blongs to isn't checked so it can be incorrectly returned instead of a matching entry in a subsequent included map. Signed-off-by: Ian Kent --- CHANGELOG | 1 + lib/parse_subs.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) --- autofs-5.1.4.orig/CHANGELOG +++ autofs-5.1.4/CHANGELOG @@ -148,6 +148,7 @@ - add ioctlfd open helper. - make open files limit configurable. - fix some sss error return cases. +- fix incorrect matching of cached wildcard key. xx/xx/2018 autofs-5.1.5 - fix flag file permission. --- autofs-5.1.4.orig/lib/parse_subs.c +++ autofs-5.1.4/lib/parse_subs.c @@ -532,8 +532,11 @@ struct mapent *match_cached_key(struct a while ((me = cache_lookup_key_next(me))) if (me->source == source) break; - if (!me) + if (!me) { me = cache_lookup_distinct(mc, "*"); + if (me != source) + goto done; + } } if (!me)