]> granicus.if.org Git - sudo/commitdiff
Only warn once when we are unable to open the sudoers file.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 1 Apr 2013 15:23:29 +0000 (11:23 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 1 Apr 2013 15:23:29 +0000 (11:23 -0400)
plugins/sudoers/visudo.c

index 1e33d178132cd800e2d42c68e3f5fa0ae52f1cc8..832e97f72dd6cfc580dad4d470ffc069872158da 100644 (file)
@@ -221,12 +221,11 @@ main(int argc, char *argv[])
     }
 
     /*
-     * Parse the existing sudoers file(s) in quiet mode to highlight any
-     * existing errors and to pull in editor and env_editor conf values.
+     * Parse the existing sudoers file(s) to highlight any existing
+     * errors and to pull in editor and env_editor conf values.
      */
-    if ((sudoersin = open_sudoers(sudoers_path, true, NULL)) == NULL) {
-       error(1, "%s", sudoers_path);
-    }
+    if ((sudoersin = open_sudoers(sudoers_path, true, NULL)) == NULL)
+       exit(1);
     init_parser(sudoers_path, false);
     sudoersparse();
     (void) update_defaults(SETDEF_GENERIC|SETDEF_HOST|SETDEF_USER);