2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Better fix for sudoers files w/o a newline before EOF. It looks

like the issue is that yyrestart() does not reset the start condition
to INITIAL which is an issue since we parse sudoers multiple times.
This commit is contained in:
Todd C. Miller
2003-01-07 00:02:33 +00:00
parent cce84a1811
commit 8b3c38d20c

View File

@@ -339,17 +339,20 @@ PASSWD[[:blank:]]*: {
return(COMMENT);
} /* return comments */
<GOTRUNAS,GOTDEFS,GOTCMND,STARTDEFS,INDEFS><<EOF>> {
BEGIN INITIAL;
LEXTRACE("EOF ");
return(ERROR);
} /* premature EOF */
<*>. {
LEXTRACE("ERROR ");
return(ERROR);
} /* parse error */
<*><<EOF>> {
if (YY_START != INITIAL) {
BEGIN INITIAL;
LEXTRACE("ERROR ");
return(ERROR);
}
yyterminate();
}
%%
static void
fill(s, len)