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

Diff for /src/usr.bin/sudo/Attic/visudo.c between version 1.11 and 1.12

version 1.11, 2002/01/03 03:49:16 version 1.12, 2002/01/17 16:48:01
Line 73 
Line 73 
 #include "version.h"  #include "version.h"
   
 #ifndef lint  #ifndef lint
 static const char rcsid[] = "$Sudo: visudo.c,v 1.145 2001/12/14 19:52:48 millert Exp $";  static const char rcsid[] = "$Sudo: visudo.c,v 1.146 2002/01/17 15:35:54 millert Exp $";
 #endif /* lint */  #endif /* lint */
   
 /*  /*
Line 277 
Line 277 
      * See if we can use the user's choice of editors either because       * See if we can use the user's choice of editors either because
      * we allow any $EDITOR or because $EDITOR is in the allowable list.       * we allow any $EDITOR or because $EDITOR is in the allowable list.
      */       */
     Editor = NULL;      Editor = EditorPath = NULL;
     if (def_flag(I_ENV_EDITOR) && UserEditor)      if (def_flag(I_ENV_EDITOR) && UserEditor)
         Editor = UserEditor;          Editor = UserEditor;
     else if (UserEditor) {      else if (UserEditor) {
Line 318 
Line 318 
                     break;                      break;
             }              }
         } while ((Editor = strtok(NULL, ":")));          } while ((Editor = strtok(NULL, ":")));
         free(EditorPath);  
     }      }
   
     /*      /*
Line 326 
Line 325 
      * find one that exists, is regular, and is executable.       * find one that exists, is regular, and is executable.
      */       */
     if (Editor == NULL || *Editor == '\0') {      if (Editor == NULL || *Editor == '\0') {
           if (EditorPath != NULL)
               free(EditorPath);
         EditorPath = estrdup(def_str(I_EDITOR));          EditorPath = estrdup(def_str(I_EDITOR));
         Editor = strtok(EditorPath, ":");          Editor = strtok(EditorPath, ":");
         do {          do {

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12