proxychains{,-ng}: swap priority 4 and 5 in get_config_path
This commit is contained in:
parent
33bc904dff
commit
8b3ba47a11
|
@ -25,6 +25,8 @@ stdenv.mkDerivation rec {
|
||||||
url = "https://github.com/rofl0r/proxychains-ng/commit/9b42da71f4df7b783cf07a58ffa095e293c43380.patch";
|
url = "https://github.com/rofl0r/proxychains-ng/commit/9b42da71f4df7b783cf07a58ffa095e293c43380.patch";
|
||||||
sha256 = "sha256-tYv9XP51WtsjaoklwQk3D/MQceoOvtdMwBraECt6AXQ=";
|
sha256 = "sha256-tYv9XP51WtsjaoklwQk3D/MQceoOvtdMwBraECt6AXQ=";
|
||||||
})
|
})
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/136093
|
||||||
|
./swap-priority-4-and-5-in-get_config_path.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
installFlags = [
|
installFlags = [
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
diff --git a/src/common.c b/src/common.c
|
||||||
|
index 1da1c45..fb68ada 100644
|
||||||
|
--- a/src/common.c
|
||||||
|
+++ b/src/common.c
|
||||||
|
@@ -113,13 +113,13 @@ char *get_config_path(char* default_path, char* pbuf, size_t bufsize) {
|
||||||
|
if(check_path(path))
|
||||||
|
goto have;
|
||||||
|
|
||||||
|
- // priority 4: $SYSCONFDIR/proxychains.conf
|
||||||
|
- path = SYSCONFDIR "/" PROXYCHAINS_CONF_FILE;
|
||||||
|
+ // priority 4: /etc/proxychains.conf
|
||||||
|
+ path = "/etc/" PROXYCHAINS_CONF_FILE;
|
||||||
|
if(check_path(path))
|
||||||
|
goto have;
|
||||||
|
|
||||||
|
- // priority 5: /etc/proxychains.conf
|
||||||
|
- path = "/etc/" PROXYCHAINS_CONF_FILE;
|
||||||
|
+ // priority 5: $SYSCONFDIR/proxychains.conf
|
||||||
|
+ path = SYSCONFDIR "/" PROXYCHAINS_CONF_FILE;
|
||||||
|
if(check_path(path))
|
||||||
|
goto have;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.37.2
|
||||||
|
|
|
@ -14,6 +14,11 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "083xdg6fsn8c2ns93lvy794rixxq8va6jdf99w1z0xi4j7f1nyjw";
|
sha256 = "083xdg6fsn8c2ns93lvy794rixxq8va6jdf99w1z0xi4j7f1nyjw";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/136093
|
||||||
|
./swap-priority-4-and-5-in-get_config_path.patch
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# Suppress compiler warning. Remove it when upstream fix arrives
|
# Suppress compiler warning. Remove it when upstream fix arrives
|
||||||
substituteInPlace Makefile --replace "-Werror" "-Werror -Wno-stringop-truncation"
|
substituteInPlace Makefile --replace "-Werror" "-Werror -Wno-stringop-truncation"
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
diff --git a/src/common.c b/src/common.c
|
||||||
|
index 1ca612a..7c21377 100644
|
||||||
|
--- a/src/common.c
|
||||||
|
+++ b/src/common.c
|
||||||
|
@@ -37,13 +37,13 @@ char *get_config_path(char* default_path, char* pbuf, size_t bufsize) {
|
||||||
|
if(check_path(path))
|
||||||
|
return path;
|
||||||
|
|
||||||
|
- // priority 4: $SYSCONFDIR/proxychains.conf
|
||||||
|
- path = SYSCONFDIR "/" PROXYCHAINS_CONF_FILE;
|
||||||
|
+ // priority 4: /etc/proxychains.conf
|
||||||
|
+ path = "/etc/" PROXYCHAINS_CONF_FILE;
|
||||||
|
if(check_path(path))
|
||||||
|
return path;
|
||||||
|
|
||||||
|
- // priority 5: /etc/proxychains.conf
|
||||||
|
- path = "/etc/" PROXYCHAINS_CONF_FILE;
|
||||||
|
+ // priority 5: $SYSCONFDIR/proxychains.conf
|
||||||
|
+ path = SYSCONFDIR "/" PROXYCHAINS_CONF_FILE;
|
||||||
|
if(check_path(path))
|
||||||
|
return path;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.37.2
|
||||||
|
|
Loading…
Reference in a new issue