Comments that begin with #- should not be parsed as uids.

This commit is contained in:
Todd C. Miller
2009-01-17 22:36:09 +00:00
parent 77794f27aa
commit 2d4aebed6e
2 changed files with 818 additions and 812 deletions

1626
toke.c

File diff suppressed because it is too large Load Diff

4
toke.l
View File

@@ -467,12 +467,12 @@ sudoedit {
LEXTRACE("\n\t"); LEXTRACE("\n\t");
} /* throw away EOL after \ */ } /* throw away EOL after \ */
<INITIAL,STARTDEFS,INDEFS>#([^\n0-9-].*)?\n { <INITIAL,STARTDEFS,INDEFS>#(-[^\n0-9].*|[^\n0-9-].*)?\n {
BEGIN INITIAL; BEGIN INITIAL;
++sudolineno; ++sudolineno;
LEXTRACE("\n"); LEXTRACE("\n");
return(COMMENT); return(COMMENT);
} /* return comments */ } /* comment, not uid/gid */
<*>. { <*>. {
LEXTRACE("ERROR "); LEXTRACE("ERROR ");