diff --git a/src/daemon.c b/src/daemon.c index ff84d97..84163b6 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -160,7 +160,7 @@ static void dcc_warn_masquerade_whitelist(void) { " --enable-tcp-insecure. To set up masquerade automatically" \ " run update-distcc-symlinks."; - e = opendir("/usr/lib/distcc"); + e = opendir("/usr/local/lib/distcc"); d = opendir(LIBDIR "/distcc"); if (!e && !d) { rs_log_crit(LIBDIR "/distcc not found. %s", warn); diff --git a/src/serve.c b/src/serve.c index 7dd4647..f17db85 100644 --- a/src/serve.c +++ b/src/serve.c @@ -398,11 +398,11 @@ static int dcc_check_compiler_whitelist(char *_compiler_name) if (dirfd < 0 || faccessat(dirfd, compiler_name, X_OK, 0) < 0) { char *compiler_path = NULL; - if (asprintf(&compiler_path, "/usr/lib/distcc/%s", compiler_name) >= 0) { + if (asprintf(&compiler_path, "/usr/local/lib/distcc/%s", compiler_name) >= 0) { if (access(compiler_path, X_OK) < 0) { free(compiler_path); close(dirfd); - rs_log_crit("%s not in %s or %s whitelist.", compiler_name, LIBDIR "/distcc", "/usr/lib/distcc"); + rs_log_crit("%s not in %s or %s whitelist.", compiler_name, LIBDIR "/distcc", "/usr/local/lib/distcc"); return EXIT_BAD_ARGUMENTS; /* ENOENT, EACCESS, etc */ } free(compiler_path); @@ -420,10 +420,10 @@ static int dcc_check_compiler_whitelist(char *_compiler_name) if (asprintf(&compiler_path, "%s/distcc/%s", LIBDIR, compiler_name) >= 0) { if (access(compiler_path, X_OK) < 0) { free(compiler_path); - /* check /usr/lib/distcc too */ - if (asprintf(&compiler_path, "/usr/lib/distcc/%s", compiler_name) >= 0) { + /* check /usr/local/lib/distcc too */ + if (asprintf(&compiler_path, "/usr/local/lib/distcc/%s", compiler_name) >= 0) { if (access(compiler_path, X_OK) < 0) { - rs_log_crit("%s not in %s or %s whitelist.", compiler_name, LIBDIR "/distcc", "/usr/lib/distcc"); + rs_log_crit("%s not in %s or %s whitelist.", compiler_name, LIBDIR "/distcc", "/usr/local/lib/distcc"); ret = EXIT_BAD_ARGUMENTS; /* ENOENT, EACCESS, etc */ } free(compiler_path);