2017-11-10 17:10:17 +01:00
|
|
|
diff -uNr tor-0.3.1.8/src/or/dns.c tor-0.3.1.8.mod/src/or/dns.c
|
|
|
|
--- tor-0.3.1.8/src/or/dns.c 2017-06-19 18:56:51.000000000 +0300
|
|
|
|
+++ tor-0.3.1.8.mod/src/or/dns.c 2017-11-10 18:05:46.220054396 +0200
|
|
|
|
@@ -1349,7 +1349,7 @@
|
|
|
|
conf_fname = options->ServerDNSResolvConfFile;
|
|
|
|
#ifndef _WIN32
|
|
|
|
if (!conf_fname)
|
|
|
|
- conf_fname = "/etc/resolv.conf";
|
2017-11-12 22:21:07 +01:00
|
|
|
+ conf_fname = "@TERMUX_PREFIX@/etc/resolv.conf";
|
2017-11-10 17:10:17 +01:00
|
|
|
#endif
|
|
|
|
flags = DNS_OPTIONS_ALL;
|
|
|
|
|
|
|
|
diff -uNr tor-0.3.1.8/src/or/main.c tor-0.3.1.8.mod/src/or/main.c
|
|
|
|
--- tor-0.3.1.8/src/or/main.c 2017-09-29 01:52:51.000000000 +0300
|
|
|
|
+++ tor-0.3.1.8.mod/src/or/main.c 2017-11-10 18:02:56.257471811 +0200
|
|
|
|
@@ -3472,7 +3472,7 @@
|
|
|
|
OPEN("/dev/srandom");
|
|
|
|
OPEN("/dev/urandom");
|
|
|
|
OPEN("/dev/random");
|
|
|
|
- OPEN("/etc/hosts");
|
2017-11-12 22:21:07 +01:00
|
|
|
+ OPEN("@TERMUX_PREFIX@/etc/hosts");
|
2017-11-10 17:10:17 +01:00
|
|
|
OPEN("/proc/meminfo");
|
|
|
|
|
|
|
|
if (options->BridgeAuthoritativeDir)
|
|
|
|
@@ -3485,7 +3485,7 @@
|
|
|
|
sandbox_cfg_allow_open_filename(&cfg,
|
|
|
|
tor_strdup(options->ServerDNSResolvConfFile));
|
|
|
|
else
|
|
|
|
- sandbox_cfg_allow_open_filename(&cfg, tor_strdup("/etc/resolv.conf"));
|
2017-11-12 22:21:07 +01:00
|
|
|
+ sandbox_cfg_allow_open_filename(&cfg, tor_strdup("@TERMUX_PREFIX@/etc/resolv.conf"));
|
2017-11-10 17:10:17 +01:00
|
|
|
|
|
|
|
for (i = 0; i < 2; ++i) {
|
|
|
|
if (get_torrc_fname(i)) {
|
|
|
|
@@ -3631,7 +3631,7 @@
|
|
|
|
OPEN_DATADIR_SUFFIX("hashed-fingerprint", ".tmp");
|
|
|
|
OPEN_DATADIR_SUFFIX("router-stability", ".tmp");
|
|
|
|
|
|
|
|
- OPEN("/etc/resolv.conf");
|
2017-11-12 22:21:07 +01:00
|
|
|
+ OPEN("@TERMUX_PREFIX@/etc/resolv.conf");
|
2017-11-10 17:10:17 +01:00
|
|
|
|
|
|
|
RENAME_SUFFIX("fingerprint", ".tmp");
|
|
|
|
RENAME_SUFFIX2("keys", "secret_onion_key_ntor", ".tmp");
|