- keepopen = FALSE;
- if ((pl = istack[idepth - 1].more) != NULL) {
- /* Move to next file in the dir. */
- istack[idepth - 1].more = pl->next;
- if ((fp = open_sudoers(pl->path, FALSE, &keepopen)) == NULL) {
- yyerror(pl->path);
- return(FALSE); /* XXX - just to go next one? */
+ /* If we are in an include dir, move to the next file. */
+ while ((pl = istack[idepth - 1].more) != NULL) {
+ fp = open_sudoers(pl->path, FALSE, &keepopen);
+ if (fp != NULL) {
+ istack[idepth - 1].more = pl->next;
+ efree(sudoers);
+ sudoers = pl->path;
+ sudolineno = 1;
+ yy_switch_to_buffer(yy_create_buffer(fp, YY_BUF_SIZE));
+ efree(pl);
+ break;