Do not disable fuzzer output if SUDO_FUZZ_VERBOSE env variable is set.
This commit is contained in:
@@ -95,7 +95,8 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
FILE *fp;
|
||||
|
||||
setprogname("fuzz_iolog_json");
|
||||
sudo_warn_set_conversation(fuzz_conversation);
|
||||
if (getenv("SUDO_FUZZ_VERBOSE") == NULL)
|
||||
sudo_warn_set_conversation(fuzz_conversation);
|
||||
|
||||
fp = open_data(data, size);
|
||||
if (fp == NULL)
|
||||
|
@@ -93,7 +93,8 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
FILE *fp;
|
||||
|
||||
setprogname("fuzz_iolog_legacy");
|
||||
sudo_warn_set_conversation(fuzz_conversation);
|
||||
if (getenv("SUDO_FUZZ_VERBOSE") == NULL)
|
||||
sudo_warn_set_conversation(fuzz_conversation);
|
||||
|
||||
fp = open_data(data, size);
|
||||
if (fp == NULL)
|
||||
|
@@ -76,7 +76,8 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
int dfd = -1, fd = -1;
|
||||
|
||||
setprogname("fuzz_iolog_timing");
|
||||
sudo_warn_set_conversation(fuzz_conversation);
|
||||
if (getenv("SUDO_FUZZ_VERBOSE") == NULL)
|
||||
sudo_warn_set_conversation(fuzz_conversation);
|
||||
|
||||
/* I/O logs consist of multiple files in a directory. */
|
||||
if (mkdtemp(logdir) == NULL)
|
||||
|
@@ -67,7 +67,8 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
int fd;
|
||||
|
||||
setprogname("fuzz_sudo_conf");
|
||||
sudo_warn_set_conversation(fuzz_conversation);
|
||||
if (getenv("SUDO_FUZZ_VERBOSE") == NULL)
|
||||
sudo_warn_set_conversation(fuzz_conversation);
|
||||
|
||||
/* sudo_conf_read() uses a conf file path, not an open file. */
|
||||
fd = mkstemp(tempfile);
|
||||
|
@@ -76,7 +76,8 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
int fd;
|
||||
|
||||
setprogname("fuzz_logsrvd_conf");
|
||||
sudo_warn_set_conversation(fuzz_conversation);
|
||||
if (getenv("SUDO_FUZZ_VERBOSE") == NULL)
|
||||
sudo_warn_set_conversation(fuzz_conversation);
|
||||
|
||||
/* logsrvd_conf_read() uses a conf file path, not an open file. */
|
||||
fd = mkstemp(tempfile);
|
||||
|
@@ -264,7 +264,8 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
|
||||
setprogname("fuzz_policy");
|
||||
sudoers_debug_register(getprogname(), NULL);
|
||||
sudo_warn_set_conversation(fuzz_conversation);
|
||||
if (getenv("SUDO_FUZZ_VERBOSE") == NULL)
|
||||
sudo_warn_set_conversation(fuzz_conversation);
|
||||
|
||||
/* user_info and settings must be non-NULL (even if empty). */
|
||||
push(&user_info, NULL);
|
||||
|
@@ -188,7 +188,8 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
|
||||
setprogname("fuzz_sudoers");
|
||||
sudoers_debug_register(getprogname(), NULL);
|
||||
sudo_warn_set_conversation(fuzz_conversation);
|
||||
if (getenv("SUDO_FUZZ_VERBOSE") == NULL)
|
||||
sudo_warn_set_conversation(fuzz_conversation);
|
||||
|
||||
/* Sudoers locale setup. */
|
||||
sudoers_initlocale(setlocale(LC_ALL, ""), "C");
|
||||
|
@@ -133,7 +133,8 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
|
||||
setprogname("fuzz_sudoers_ldif");
|
||||
sudoers_debug_register(getprogname(), NULL);
|
||||
sudo_warn_set_conversation(fuzz_conversation);
|
||||
if (getenv("SUDO_FUZZ_VERBOSE") == NULL)
|
||||
sudo_warn_set_conversation(fuzz_conversation);
|
||||
|
||||
/* Initialize defaults and parse LDIF-format sudoers. */
|
||||
init_defaults();
|
||||
|
Reference in New Issue
Block a user