proxychains{,-ng}: swap priority 4 and 5 in get_config_path

authored by Chuang Zhu and committed by GitHub 8b3ba47a 33bc904d

+57
+2
pkgs/tools/networking/proxychains-ng/default.nix
··· 25 25 url = "https://github.com/rofl0r/proxychains-ng/commit/9b42da71f4df7b783cf07a58ffa095e293c43380.patch"; 26 26 sha256 = "sha256-tYv9XP51WtsjaoklwQk3D/MQceoOvtdMwBraECt6AXQ="; 27 27 }) 28 + # https://github.com/NixOS/nixpkgs/issues/136093 29 + ./swap-priority-4-and-5-in-get_config_path.patch 28 30 ]; 29 31 30 32 installFlags = [
+25
pkgs/tools/networking/proxychains-ng/swap-priority-4-and-5-in-get_config_path.patch
··· 1 + diff --git a/src/common.c b/src/common.c 2 + index 1da1c45..fb68ada 100644 3 + --- a/src/common.c 4 + +++ b/src/common.c 5 + @@ -113,13 +113,13 @@ char *get_config_path(char* default_path, char* pbuf, size_t bufsize) { 6 + if(check_path(path)) 7 + goto have; 8 + 9 + - // priority 4: $SYSCONFDIR/proxychains.conf 10 + - path = SYSCONFDIR "/" PROXYCHAINS_CONF_FILE; 11 + + // priority 4: /etc/proxychains.conf 12 + + path = "/etc/" PROXYCHAINS_CONF_FILE; 13 + if(check_path(path)) 14 + goto have; 15 + 16 + - // priority 5: /etc/proxychains.conf 17 + - path = "/etc/" PROXYCHAINS_CONF_FILE; 18 + + // priority 5: $SYSCONFDIR/proxychains.conf 19 + + path = SYSCONFDIR "/" PROXYCHAINS_CONF_FILE; 20 + if(check_path(path)) 21 + goto have; 22 + 23 + -- 24 + 2.37.2 25 +
+5
pkgs/tools/networking/proxychains/default.nix
··· 14 14 sha256 = "083xdg6fsn8c2ns93lvy794rixxq8va6jdf99w1z0xi4j7f1nyjw"; 15 15 }; 16 16 17 + patches = [ 18 + # https://github.com/NixOS/nixpkgs/issues/136093 19 + ./swap-priority-4-and-5-in-get_config_path.patch 20 + ]; 21 + 17 22 postPatch = '' 18 23 # Suppress compiler warning. Remove it when upstream fix arrives 19 24 substituteInPlace Makefile --replace "-Werror" "-Werror -Wno-stringop-truncation"
+25
pkgs/tools/networking/proxychains/swap-priority-4-and-5-in-get_config_path.patch
··· 1 + diff --git a/src/common.c b/src/common.c 2 + index 1ca612a..7c21377 100644 3 + --- a/src/common.c 4 + +++ b/src/common.c 5 + @@ -37,13 +37,13 @@ char *get_config_path(char* default_path, char* pbuf, size_t bufsize) { 6 + if(check_path(path)) 7 + return path; 8 + 9 + - // priority 4: $SYSCONFDIR/proxychains.conf 10 + - path = SYSCONFDIR "/" PROXYCHAINS_CONF_FILE; 11 + + // priority 4: /etc/proxychains.conf 12 + + path = "/etc/" PROXYCHAINS_CONF_FILE; 13 + if(check_path(path)) 14 + return path; 15 + 16 + - // priority 5: /etc/proxychains.conf 17 + - path = "/etc/" PROXYCHAINS_CONF_FILE; 18 + + // priority 5: $SYSCONFDIR/proxychains.conf 19 + + path = SYSCONFDIR "/" PROXYCHAINS_CONF_FILE; 20 + if(check_path(path)) 21 + return path; 22 + 23 + -- 24 + 2.37.2 25 +