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

Allow '@', '(', ')', ':' in arguments to a defaults variable

w/o requiring that they be quoted.
This commit is contained in:
Todd C. Miller
2001-12-30 22:12:06 +00:00
parent 412819b40a
commit 5d5c6783d9

View File

@@ -101,6 +101,7 @@ OCTET (1?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5])
DOTTEDQUAD {OCTET}(\.{OCTET}){3}
HOSTNAME [[:alnum:]_-]+
WORD ([^#@!=:,\(\) \t\n\\]|\\[^\n])+
ENVAR ([^#!=, \t\n\\]|\\[^\n])([^#=, \t\n\\]|\\[^\n])*
DEFVAR [a-z_]+
/* XXX - convert GOTRUNAS to exclusive state (GOTDEFS cannot be) */
@@ -147,6 +148,12 @@ DEFVAR [a-z_]+
fill(yytext + 1, yyleng - 2);
return(WORD);
}
{ENVAR} {
LEXTRACE("WORD(2) ");
fill(yytext, yyleng);
return(WORD);
}
}
<GOTCMND>{
@@ -261,7 +268,7 @@ PASSWD[[:blank:]]*: {
<GOTRUNAS>(#[0-9-]+|{WORD}) {
/* username/uid that user can run command as */
fill(yytext, yyleng);
LEXTRACE("WORD(2) ");
LEXTRACE("WORD(3) ");
return(WORD);
}
@@ -282,10 +289,10 @@ PASSWD[[:blank:]]*: {
}
} /* a pathname */
<INITIAL,GOTDEFS,INDEFS>{WORD} {
<INITIAL,GOTDEFS>{WORD} {
/* a word */
fill(yytext, yyleng);
LEXTRACE("WORD(3) ");
LEXTRACE("WORD(4) ");
return(WORD);
}