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

make per-command defaults work with sudoedit

This commit is contained in:
Todd C. Miller
2004-11-19 23:04:14 +00:00
parent e605070143
commit 77cd81f41d
2 changed files with 562 additions and 552 deletions

1098
toke.c

File diff suppressed because it is too large Load Diff

16
toke.l
View File

@@ -333,14 +333,7 @@ MONITOR[[:blank:]]*: {
BEGIN INITIAL;
}
sudoedit {
BEGIN GOTCMND;
LEXTRACE("COMMAND ");
if (!fill_cmnd(yytext, yyleng))
yyterminate();
} /* sudo -e */
<GOTDEFS>{PATH} {
<GOTDEFS>({PATH}|sudoedit) {
/* no command args allowed for Defaults!/path */
if (!fill_cmnd(yytext, yyleng))
yyterminate();
@@ -348,6 +341,13 @@ sudoedit {
return(COMMAND);
}
sudoedit {
BEGIN GOTCMND;
LEXTRACE("COMMAND ");
if (!fill_cmnd(yytext, yyleng))
yyterminate();
} /* sudo -e */
{PATH} {
/* directories can't have args... */
if (yytext[yyleng - 1] == '/') {