diff options
author | Shawn Landden <shawn@git.icu> | 2018-07-22 10:17:39 -0700 |
---|---|---|
committer | Shawn Landden <shawn@git.icu> | 2018-07-22 10:17:39 -0700 |
commit | ed49f9d6436fb150259c0cb67e56254027899efd (patch) | |
tree | a6e69e73136aa8512fce4c6952d5bdbdb5374685 | |
parent | 04a933b4e4a735b052923ce2e28338e6d2e33561 (diff) | |
download | distcc-git-ed49f9d6436fb150259c0cb67e56254027899efd.tar.gz |
compiler_masq: allow /usr/lib/distcc hardcoded
actually do this
-rw-r--r-- | src/serve.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/serve.c b/src/serve.c index 9546ba5..3aa86ef 100644 --- a/src/serve.c +++ b/src/serve.c @@ -414,8 +414,13 @@ static int dcc_check_compiler_whitelist(char *_compiler_name) int ret = 0; if (asprintf(&compiler_path, "%s/distcc/%s", LIBDIR, compiler_name) && compiler_path) { if (access(compiler_path, X_OK) < 0) { - rs_log_crit("%s not in %s whitelist.", compiler_name, LIBDIR "/distcc"); - ret = EXIT_BAD_ARGUMENTS; /* ENOENT, EACCESS, etc */ + /* check /usr/lib/distcc too */ + if (asprintf(&compiler_path, "/usr/lib/distcc/%s", compiler_name) && compiler_path) { + if (access(compiler_path, X_OK) < 0) { + rs_log_crit("%s not in %s whitelist.", compiler_name, LIBDIR "/distcc"); + ret = EXIT_BAD_ARGUMENTS; /* ENOENT, EACCESS, etc */ + } + } } rs_trace("%s in" LIBDIR "/distcc whitelist", compiler_name); } else { |