]> 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>
Wed, 5 Mar 2014 13:06:26 +0000 (06:06 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 5 Mar 2014 13:06:26 +0000 (06:06 -0700)
--HG--
branch : 1.7

visudo.c

index 62ed9880eed8da822c8e2f01f7367a09391487a6..2a334a3c31ea534963db0772063839b419af2291 100644 (file)
--- a/visudo.c
+++ b/visudo.c
@@ -205,12 +205,11 @@ main(argc, argv)
        exit(check_syntax(sudoers_path, quiet, strict));
 
     /*
-     * 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 ((yyin = open_sudoers(sudoers_path, TRUE, NULL)) == NULL) {
-       error(1, "%s", sudoers_path);
-    }
+    if ((yyin = open_sudoers(sudoers_path, TRUE, NULL)) == NULL)
+       exit(1);
     init_parser(sudoers_path, 0);
     yyparse();
     (void) update_defaults(SETDEF_GENERIC|SETDEF_HOST|SETDEF_USER);