From: Todd C. Miller Date: Mon, 21 Mar 2011 21:46:50 +0000 (-0400) Subject: Restore old behavior of setting sawspace = TRUE for command line X-Git-Tag: SUDO_1_8_1~61^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a2297743aaccd3470f4a3553f049ea84cf7ad66d;p=sudo 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. --- diff --git a/plugins/sudoers/toke.c b/plugins/sudoers/toke.c index 27c54cbcf..e33303739 100644 --- a/plugins/sudoers/toke.c +++ b/plugins/sudoers/toke.c @@ -2333,13 +2333,14 @@ case 52: YY_RULE_SETUP #line 553 "toke.l" { + sawspace = TRUE; /* remember for fill_args */ ++sudolineno; continued = TRUE; } /* throw away EOL after \ */ YY_BREAK case 53: YY_RULE_SETUP -#line 558 "toke.l" +#line 559 "toke.l" { BEGIN INITIAL; ++sudolineno; @@ -2350,7 +2351,7 @@ YY_RULE_SETUP YY_BREAK case 54: YY_RULE_SETUP -#line 566 "toke.l" +#line 567 "toke.l" { LEXTRACE("ERROR "); return ERROR; @@ -2362,7 +2363,7 @@ case YY_STATE_EOF(GOTCMND): case YY_STATE_EOF(STARTDEFS): case YY_STATE_EOF(INDEFS): case YY_STATE_EOF(INSTR): -#line 571 "toke.l" +#line 572 "toke.l" { if (YY_START != INITIAL) { BEGIN INITIAL; @@ -2375,10 +2376,10 @@ case YY_STATE_EOF(INSTR): YY_BREAK case 55: YY_RULE_SETUP -#line 581 "toke.l" +#line 582 "toke.l" ECHO; YY_BREAK -#line 2381 "lex.yy.c" +#line 2382 "lex.yy.c" case YY_END_OF_BUFFER: { @@ -3269,7 +3270,7 @@ int main() return 0; } #endif -#line 581 "toke.l" +#line 582 "toke.l" struct path_list { char *path; diff --git a/plugins/sudoers/toke.l b/plugins/sudoers/toke.l index 7044e1eb5..cbb0b1038 100644 --- a/plugins/sudoers/toke.l +++ b/plugins/sudoers/toke.l @@ -551,6 +551,7 @@ sudoedit { } <*>\\[[:blank:]]*\n { + sawspace = TRUE; /* remember for fill_args */ ++sudolineno; continued = TRUE; } /* throw away EOL after \ */