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