autofs-5.0.6 - fix sss wildcard match From: Ian Kent Check for a wildcard map entry on sss map read and convert to the usual '*' befone adding to the map entry cache. --- CHANGELOG | 1 + modules/lookup_sss.c | 9 +++++++++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index ed4aa70..adb46ab 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -41,6 +41,7 @@ - allow MOUNT_WAIT to override probe. - improve UDP RPC timeout handling. - use strtok_r() in linux_version_code(). +- fix sss wildcard match. 28/06/2011 autofs-5.0.6 ----------------------- diff --git a/modules/lookup_sss.c b/modules/lookup_sss.c index 02a4be9..549edc2 100644 --- a/modules/lookup_sss.c +++ b/modules/lookup_sss.c @@ -325,6 +325,15 @@ int lookup_read_map(struct autofs_point *ap, time_t age, void *context) continue; } + if (*key == '/' && strlen(key) == 1) { + if (ap->type == LKP_DIRECT) { + free(key); + free(value); + continue; + } + *key = '*'; + } + /* * TODO: implement sun % hack for key translation for * mixed case keys in schema that are single case only.