autofs-5.1.8 - fix amd selector function matching From: Ian Kent The top level lexical analyser matching of 1 and 2 arg selector functions did not have enough context to match correctly. This was causing it to attempt to match the selector function and its parameter(s) against the selector function names which wasn't working. Signed-off-by: Ian Kent --- CHANGELOG | 1 + modules/amd_tok.l | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 8c2f30eb..ca72023b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -73,6 +73,7 @@ - fix unterminated read in handle_cmd_pipe_fifo_message(). - fix memory leak in sasl_do_kinit() - fix fix mount tree startup reconnect. +- fix amd selector function matching. 19/10/2021 autofs-5.1.8 - add xdr_exports(). diff --git a/modules/amd_tok.l b/modules/amd_tok.l index 36fc04b1..ef9f8661 100644 --- a/modules/amd_tok.l +++ b/modules/amd_tok.l @@ -159,15 +159,17 @@ CUTSEP (\|\||\/) return SELECTOR; } - "!"/({SEL1ARG}|{SEL2ARG}) { return NOT; } + "!"/({SEL1ARG})(\([^,]+\)) { return NOT; } - {SEL1ARG} { + "!"/({SEL2ARG})(\(([^,]+)(,([^,]+))?\)) { return NOT; } + + ({SEL1ARG})/(\([^,]+\)) { BEGIN(SELARGVAL); amd_copy_buffer(); return SELECTOR; } - {SEL2ARG} { + ({SEL2ARG})/(\([^,]+)(,([^,]+))?\) { BEGIN(SELARGVAL); amd_copy_buffer(); return SELECTOR;