mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-02 15:25:58 +00:00
make per-command defaults work with sudoedit
This commit is contained in:
16
toke.l
16
toke.l
@@ -333,14 +333,7 @@ MONITOR[[:blank:]]*: {
|
|||||||
BEGIN INITIAL;
|
BEGIN INITIAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
sudoedit {
|
<GOTDEFS>({PATH}|sudoedit) {
|
||||||
BEGIN GOTCMND;
|
|
||||||
LEXTRACE("COMMAND ");
|
|
||||||
if (!fill_cmnd(yytext, yyleng))
|
|
||||||
yyterminate();
|
|
||||||
} /* sudo -e */
|
|
||||||
|
|
||||||
<GOTDEFS>{PATH} {
|
|
||||||
/* no command args allowed for Defaults!/path */
|
/* no command args allowed for Defaults!/path */
|
||||||
if (!fill_cmnd(yytext, yyleng))
|
if (!fill_cmnd(yytext, yyleng))
|
||||||
yyterminate();
|
yyterminate();
|
||||||
@@ -348,6 +341,13 @@ sudoedit {
|
|||||||
return(COMMAND);
|
return(COMMAND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sudoedit {
|
||||||
|
BEGIN GOTCMND;
|
||||||
|
LEXTRACE("COMMAND ");
|
||||||
|
if (!fill_cmnd(yytext, yyleng))
|
||||||
|
yyterminate();
|
||||||
|
} /* sudo -e */
|
||||||
|
|
||||||
{PATH} {
|
{PATH} {
|
||||||
/* directories can't have args... */
|
/* directories can't have args... */
|
||||||
if (yytext[yyleng - 1] == '/') {
|
if (yytext[yyleng - 1] == '/') {
|
||||||
|
Reference in New Issue
Block a user