Add a flag argument to sudo_conf_read() so we can decide which

bits get parsed.  This lets us parse Debug statements first and
init the debug subsystem early.
This commit is contained in:
Todd C. Miller
2014-10-26 08:33:08 -06:00
parent f8bd2af4da
commit 6b1b734ffa
11 changed files with 102 additions and 103 deletions

View File

@@ -138,11 +138,9 @@ main(int argc, char *argv[])
bindtextdomain("sudoers", LOCALEDIR); /* XXX - should have own domain */
textdomain("sudoers");
/* Read sudo.conf. */
sudo_conf_read(NULL);
/* Set debug instance to use (if configured). */
sudoers_debug_instance = sudo_debug_get_instance(getprogname());
/* Initialize the debug subsystem. */
sudo_conf_read(NULL, SUDO_CONF_DEBUG);
sudoers_debug_register(sudo_conf_debug_files(getprogname()), getprogname());
dflag = 0;
grfile = pwfile = NULL;