[BACK]Return to toke.l CVS log [TXT][DIR] Up to [local] / src / usr.bin / sudo

Diff for /src/usr.bin/sudo/Attic/toke.l between version 1.5 and 1.6

version 1.5, 2009/07/19 23:16:29 version 1.6, 2009/12/07 18:43:11
Line 72 
Line 72 
 #include <gram.h>  #include <gram.h>
   
 #ifndef lint  #ifndef lint
 __unused static const char rcsid[] = "$Sudo: toke.l,v 1.38 2009/07/18 13:55:37 millert Exp $";  __unused static const char rcsid[] = "$Sudo: toke.l,v 1.40 2009/11/22 14:54:04 millert Exp $";
 #endif /* lint */  #endif /* lint */
   
 extern YYSTYPE yylval;  extern YYSTYPE yylval;
   extern int parse_error;
 int sudolineno = 1;  int sudolineno = 1;
 char *sudoers;  char *sudoers;
 static int sawspace = 0;  static int sawspace = 0;
Line 253 
Line 254 
   
                             LEXTRACE("INCLUDEDIR\n");                              LEXTRACE("INCLUDEDIR\n");
   
                             /* Push current buffer and switch to include file */                              /*
                             if (!push_includedir(path))                               * Push current buffer and switch to include file.
                                * We simply ignore empty directories.
                                */
                               if (!push_includedir(path) && parse_error)
                                 yyterminate();                                  yyterminate();
                         }                          }
   
Line 748 
Line 752 
   
     if (!(dir = opendir(dirpath))) {      if (!(dir = opendir(dirpath))) {
         yyerror(dirpath);          yyerror(dirpath);
         return(FALSE);          return(NULL);
     }      }
     while ((dent = readdir(dir))) {      while ((dent = readdir(dir))) {
         /* Ignore files that end in '~' or have a '.' in them. */          /* Ignore files that end in '~' or have a '.' in them. */
Line 873 
Line 877 
     }      }
     if (isdir) {      if (isdir) {
         if (!(path = switch_dir(&istack[idepth], path))) {          if (!(path = switch_dir(&istack[idepth], path))) {
             yyerror(path);              /* switch_dir() called yyerror() for us */
             return(FALSE);              return(FALSE);
         }          }
         if ((fp = open_sudoers(path, FALSE, &keepopen)) == NULL) {          if ((fp = open_sudoers(path, FALSE, &keepopen)) == NULL) {
             yyerror(path);              yyerror(path);
             return(FALSE); /* XXX - just to go next one? */              return(FALSE); /* XXX - just to go next one */
         }          }
     } else {      } else {
         if ((fp = open_sudoers(path, TRUE, &keepopen)) == NULL) {          if ((fp = open_sudoers(path, TRUE, &keepopen)) == NULL) {
Line 918 
Line 922 
         istack[idepth - 1].more = pl->next;          istack[idepth - 1].more = pl->next;
         if ((fp = open_sudoers(pl->path, FALSE, &keepopen)) == NULL) {          if ((fp = open_sudoers(pl->path, FALSE, &keepopen)) == NULL) {
             yyerror(pl->path);              yyerror(pl->path);
             return(FALSE); /* XXX - just to go next one? */              return(FALSE); /* XXX - just to go next one */
         }          }
         efree(sudoers);          efree(sudoers);
         sudoers = pl->path;          sudoers = pl->path;

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6