From 6c3c03ea26ed7ef1e426eaa84fcc66b42daea430 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 31 May 2016 13:50:38 -0600 Subject: [PATCH] Allow double-quoted groups and netgroups to be part of a Defaults spec. From Daniel Kopecek. --- plugins/sudoers/toke.c | 2 +- plugins/sudoers/toke.l | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/sudoers/toke.c b/plugins/sudoers/toke.c index 4cd0393e4..7b9ff9e70 100644 --- a/plugins/sudoers/toke.c +++ b/plugins/sudoers/toke.c @@ -2385,7 +2385,7 @@ YY_RULE_SETUP LEXTRACE("ERROR "); /* empty string */ LEXRETURN(ERROR); } - if (prev_state == INITIAL) { + if (prev_state == INITIAL || prev_state == GOTDEFS) { switch (sudoerslval.string[0]) { case '%': if (sudoerslval.string[1] == '\0' || diff --git a/plugins/sudoers/toke.l b/plugins/sudoers/toke.l index ca910f245..4aac66a4e 100644 --- a/plugins/sudoers/toke.l +++ b/plugins/sudoers/toke.l @@ -185,7 +185,7 @@ DEFVAR [a-z_]+ LEXTRACE("ERROR "); /* empty string */ LEXRETURN(ERROR); } - if (prev_state == INITIAL) { + if (prev_state == INITIAL || prev_state == GOTDEFS) { switch (sudoerslval.string[0]) { case '%': if (sudoerslval.string[1] == '\0' || -- 2.40.0