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

@@ -256,11 +256,10 @@ main(int argc, char *argv[])
/* Register fatal/fatalx callback. */
sudo_fatal_callback_register(sudoreplay_cleanup);
/* Read sudo.conf. */
sudo_conf_read(NULL);
/* Set debug instance to use (if configured). */
sudoreplay_debug_instance = sudo_debug_get_instance(getprogname());
/* Read sudo.conf and initialize the debug subsystem. */
sudo_conf_read(NULL, SUDO_CONF_DEBUG);
sudoreplay_debug_instance = sudo_debug_register(getprogname(),
NULL, NULL, sudo_conf_debug_files(getprogname()));
while ((ch = getopt_long(argc, argv, short_opts, long_opts, NULL)) != -1) {
switch (ch) {