print OKF if an environment variable is successfully loaded - feebdack to this please ...

This commit is contained in:
van Hauser
2020-02-29 20:49:16 +01:00
parent 76ca6adbc5
commit 95322c11d9
11 changed files with 66 additions and 50 deletions

View File

@ -275,7 +275,7 @@ cpuset_destroy(c);
void setup_post(void) {
void* dh;
u8* fn = getenv("AFL_POST_LIBRARY");
u8* fn = get_afl_env("AFL_POST_LIBRARY");
u32 tlen = 6;
if (!fn) return;
@ -476,7 +476,7 @@ void perform_dry_run(char** argv) {
struct queue_entry* q = queue;
u32 cal_failures = 0;
u8* skip_crashes = getenv("AFL_SKIP_CRASHES");
u8* skip_crashes = get_afl_env("AFL_SKIP_CRASHES");
while (q) {
@ -1499,7 +1499,7 @@ void check_crash_handling(void) {
" sudo launchctl unload -w ${SL}/LaunchDaemons/${PL}.Root.plist\n");
#endif
if (!getenv("AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES"))
if (!get_afl_env("AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES"))
FATAL("Crash reporter detected");
#else
@ -1551,7 +1551,7 @@ void check_cpu_governor(void) {
u8 tmp[128];
u64 min = 0, max = 0;
if (getenv("AFL_SKIP_CPUFREQ")) return;
if (get_afl_env("AFL_SKIP_CPUFREQ")) return;
if (cpu_aff > 0)
snprintf(tmp, sizeof(tmp), "%s%d%s", "/sys/devices/system/cpu/cpu", cpu_aff,
@ -1632,7 +1632,7 @@ void check_cpu_governor(void) {
#elif defined __APPLE__
u64 min = 0, max = 0;
size_t mlen = sizeof(min);
if (getenv("AFL_SKIP_CPUFREQ")) return;
if (get_afl_env("AFL_SKIP_CPUFREQ")) return;
ACTF("Checking CPU scaling governor...");
@ -1805,7 +1805,7 @@ static void handle_resize(int sig) {
void check_asan_opts(void) {
u8* x = getenv("ASAN_OPTIONS");
u8* x = get_afl_env("ASAN_OPTIONS");
if (x) {
@ -1817,7 +1817,7 @@ void check_asan_opts(void) {
}
x = getenv("MSAN_OPTIONS");
x = get_afl_env("MSAN_OPTIONS");
if (x) {
@ -1913,7 +1913,7 @@ void check_binary(u8* fname) {
}
if (getenv("AFL_SKIP_BIN_CHECK") || use_wine) return;
if (get_afl_env("AFL_SKIP_BIN_CHECK") || use_wine) return;
/* Check for blatant user errors. */
@ -2082,7 +2082,7 @@ void check_if_tty(void) {
struct winsize ws;
if (getenv("AFL_NO_UI")) {
if (get_afl_env("AFL_NO_UI")) {
OKF("Disabling the UI because AFL_NO_UI is set.");
not_on_tty = 1;