2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-30 13:58:05 +00:00

Recover from a syntax error after the ':' in a privilege spec.

For compound privilege specs, don't throw away the entire thing if
we have a syntax error, only the part after the error is encountered.
This commit is contained in:
Todd C. Miller
2020-08-16 15:19:53 -06:00
parent 11803027c6
commit c7bc24d40b
2 changed files with 314 additions and 300 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -316,6 +316,10 @@ privileges : privilege
HLTQ_CONCAT($1, $3, entries); HLTQ_CONCAT($1, $3, entries);
$$ = $1; $$ = $1;
} }
| privileges ':' error eol {
yyerrok;
$$ = $1;
}
; ;
privilege : hostlist '=' cmndspeclist { privilege : hostlist '=' cmndspeclist {