From: Todd C. Miller Date: Wed, 5 Mar 2014 13:06:26 +0000 (-0700) Subject: Only warn once when we are unable to open the sudoers file. X-Git-Tag: SUDO_1_7_10p8~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7264a00048ab63b24b51709a62b782e5b321d1b9;p=sudo Only warn once when we are unable to open the sudoers file. --HG-- branch : 1.7 --- diff --git a/visudo.c b/visudo.c index 62ed9880e..2a334a3c3 100644 --- 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);