pass install prefix to proxychains app, to find /etc

This commit is contained in:
rofl0r 2012-01-27 19:28:00 +01:00
parent 3bb03892fa
commit 2acdcd9707
2 changed files with 8 additions and 2 deletions

View File

@ -33,7 +33,7 @@ ALL_TOOLS = $(PXCHAINS)
-include config.mak -include config.mak
CFLAGS+=$(USER_CFLAGS) CFLAGS+=$(USER_CFLAGS)
CFLAGS_MAIN=-DLIB_DIR=\"$(libdir)\" CFLAGS_MAIN=-DLIB_DIR=\"$(libdir)\" -DINSTALL_PREFIX=\"$(prefix)\"
all: $(ALL_LIBS) $(ALL_TOOLS) all: $(ALL_LIBS) $(ALL_TOOLS)

View File

@ -121,7 +121,13 @@ int main(int argc, char *argv[]) {
if(check_path(path)) if(check_path(path))
goto have; goto have;
// priority 4: /etc/proxychains.conf // priority 4: $INSTALL_PREFIX/etc/proxychains.conf
snprintf(pbuf, sizeof(pbuf), "%s/%s", INSTALL_PREFIX, PROXYCHAINS_CONF_FILE);
path = pbuf;
if(check_path(path))
goto have;
// priority 5: /etc/proxychains.conf
path = "/etc/proxychains.conf"; path = "/etc/proxychains.conf";
if(check_path(path)) if(check_path(path))
goto have; goto have;