Add SUDO_DEBUG_INSTANCE_ERROR return value for sudo_debug_register()

and check for it in places where we check the return value of
sudo_debug_register().
This commit is contained in:
Todd C. Miller
2016-11-21 06:37:23 -10:00
parent de0c5c48aa
commit 6c5936296f
8 changed files with 26 additions and 12 deletions

View File

@@ -179,6 +179,8 @@ main(int argc, char *argv[], char *envp[])
exit(EXIT_FAILURE);
sudo_debug_instance = sudo_debug_register(getprogname(),
NULL, NULL, sudo_conf_debug_files(getprogname()));
if (sudo_debug_instance == SUDO_DEBUG_INSTANCE_ERROR)
exit(EXIT_FAILURE);
/* Make sure we are setuid root. */
sudo_check_suid(argc > 0 ? argv[0] : "sudo");