39 lines
1.1 KiB
Diff
39 lines
1.1 KiB
Diff
diff -up sudo-1.7.2p2/toke.c.empty sudo-1.7.2p2/toke.c
|
|
--- sudo-1.7.2p2/toke.c.empty 2010-02-16 23:13:23.000000000 +0100
|
|
+++ sudo-1.7.2p2/toke.c 2010-02-16 23:17:57.000000000 +0100
|
|
@@ -1421,6 +1421,7 @@ __unused static const char rcsid[] = "$S
|
|
#endif /* lint */
|
|
|
|
extern YYSTYPE yylval;
|
|
+extern int parse_error;
|
|
int sudolineno = 1;
|
|
char *sudoers;
|
|
static int sawspace = 0;
|
|
@@ -1880,7 +1881,7 @@ YY_RULE_SETUP
|
|
LEXTRACE("INCLUDEDIR\n");
|
|
|
|
/* Push current buffer and switch to include file */
|
|
- if (!push_includedir(path))
|
|
+ if (!push_includedir(path) && parse_error)
|
|
yyterminate();
|
|
}
|
|
YY_BREAK
|
|
@@ -3369,7 +3370,7 @@ switch_dir(stack, dirpath)
|
|
|
|
if (!(dir = opendir(dirpath))) {
|
|
yyerror(dirpath);
|
|
- return(FALSE);
|
|
+ return(NULL);
|
|
}
|
|
while ((dent = readdir(dir))) {
|
|
/* Ignore files that end in '~' or have a '.' in them. */
|
|
@@ -3494,7 +3495,7 @@ _push_include(path, isdir)
|
|
}
|
|
if (isdir) {
|
|
if (!(path = switch_dir(&istack[idepth], path))) {
|
|
- yyerror(path);
|
|
+ /* yyerror(path); */
|
|
return(FALSE);
|
|
}
|
|
if ((fp = open_sudoers(path, FALSE, &keepopen)) == NULL) {
|