Check sudo_conf_read() return value and exit on fatal error (a

warning was already printed by sudo_conf_read()).
This commit is contained in:
Todd C. Miller
2015-07-07 13:17:50 -06:00
parent 4620bc31c8
commit 445e6f2e9a
6 changed files with 14 additions and 8 deletions

View File

@@ -77,7 +77,8 @@ main(int argc, char *argv[], char *envp[])
sudo_fatalx(U_("requires at least one argument"));
/* Read sudo.conf and initialize the debug subsystem. */
sudo_conf_read(NULL, SUDO_CONF_DEBUG);
if (sudo_conf_read(NULL, SUDO_CONF_DEBUG) == -1)
exit(EXIT_FAILURE);
sudo_debug_register(getprogname(), NULL, NULL,
sudo_conf_debug_files(getprogname()));