2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-28 12:57:50 +00:00

Restore old behavior of setting sawspace = TRUE for command line

args when a line continuation character is hit to avoid causing
problems for existing sudoers files.
This commit is contained in:
Todd C. Miller 2011-03-21 17:46:50 -04:00
parent 0a4c000854
commit a2297743aa
2 changed files with 8 additions and 6 deletions

View File

@ -2333,13 +2333,14 @@ case 52:
YY_RULE_SETUP YY_RULE_SETUP
#line 553 "toke.l" #line 553 "toke.l"
{ {
sawspace = TRUE; /* remember for fill_args */
++sudolineno; ++sudolineno;
continued = TRUE; continued = TRUE;
} /* throw away EOL after \ */ } /* throw away EOL after \ */
YY_BREAK YY_BREAK
case 53: case 53:
YY_RULE_SETUP YY_RULE_SETUP
#line 558 "toke.l" #line 559 "toke.l"
{ {
BEGIN INITIAL; BEGIN INITIAL;
++sudolineno; ++sudolineno;
@ -2350,7 +2351,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 54: case 54:
YY_RULE_SETUP YY_RULE_SETUP
#line 566 "toke.l" #line 567 "toke.l"
{ {
LEXTRACE("ERROR "); LEXTRACE("ERROR ");
return ERROR; return ERROR;
@ -2362,7 +2363,7 @@ case YY_STATE_EOF(GOTCMND):
case YY_STATE_EOF(STARTDEFS): case YY_STATE_EOF(STARTDEFS):
case YY_STATE_EOF(INDEFS): case YY_STATE_EOF(INDEFS):
case YY_STATE_EOF(INSTR): case YY_STATE_EOF(INSTR):
#line 571 "toke.l" #line 572 "toke.l"
{ {
if (YY_START != INITIAL) { if (YY_START != INITIAL) {
BEGIN INITIAL; BEGIN INITIAL;
@ -2375,10 +2376,10 @@ case YY_STATE_EOF(INSTR):
YY_BREAK YY_BREAK
case 55: case 55:
YY_RULE_SETUP YY_RULE_SETUP
#line 581 "toke.l" #line 582 "toke.l"
ECHO; ECHO;
YY_BREAK YY_BREAK
#line 2381 "lex.yy.c" #line 2382 "lex.yy.c"
case YY_END_OF_BUFFER: case YY_END_OF_BUFFER:
{ {
@ -3269,7 +3270,7 @@ int main()
return 0; return 0;
} }
#endif #endif
#line 581 "toke.l" #line 582 "toke.l"
struct path_list { struct path_list {
char *path; char *path;

View File

@ -551,6 +551,7 @@ sudoedit {
} }
<*>\\[[:blank:]]*\n { <*>\\[[:blank:]]*\n {
sawspace = TRUE; /* remember for fill_args */
++sudolineno; ++sudolineno;
continued = TRUE; continued = TRUE;
} /* throw away EOL after \ */ } /* throw away EOL after \ */