summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Landden <shawn@git.icu>2018-06-14 10:36:47 -0700
committerShawn Landden <shawn@git.icu>2018-06-14 10:36:47 -0700
commit04a933b4e4a735b052923ce2e28338e6d2e33561 (patch)
tree14046fe3bbe1b983a23f456cb8de38d5d8a778c2
parentf10264edd88c1fb114fabf4cab9ec85db1c22961 (diff)
downloaddistcc-git-04a933b4e4a735b052923ce2e28338e6d2e33561.tar.gz
compiler_masq: allow /usr/lib/distcc hardcoded
sometimes we install to /usr/local/lib, but these symlinks could be in /usr/lib
-rw-r--r--src/daemon.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/daemon.c b/src/daemon.c
index 1114aef..6c5dfe4 100644
--- a/src/daemon.c
+++ b/src/daemon.c
@@ -154,18 +154,19 @@ static int dcc_setup_daemon_path(void)
}
static void dcc_warn_masquerade_whitelist(void) {
- DIR *d;
+ DIR *d, *e;
const char *warn = "You must see up masquerade" \
" (see distcc(1)) to list whitelisted compilers or pass" \
" --make-me-a-botnet. To set up masquerade automatically" \
" run update-distcc-symlinks.";
+ e = opendir("/usr/lib/distcc");
d = opendir(LIBDIR "/distcc");
- if (!d) {
+ if (!e && !d) {
rs_log_crit(LIBDIR "/distcc not found. %s", warn);
dcc_exit(EXIT_COMPILER_MISSING);
}
- if (!readdir(d)) {
+ if (!readdir(e) && !readdir(d)) {
rs_log_crit(LIBDIR "/distcc empty. %s", warn);
dcc_exit(EXIT_COMPILER_MISSING);
}