[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Remove dependency on lib/net from lib/sandbox.



commit c0a7527eb8590b39f11dd8b0ae18794dfc63a934
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Nov 6 18:14:16 2018 -0500

    Remove dependency on lib/net from lib/sandbox.
    
    This was trivial, and the easiest way to remove the remaining
    .may_include circularities.
---
 src/app/main/main.c          | 1 +
 src/lib/sandbox/.may_include | 1 -
 src/lib/sandbox/sandbox.c    | 2 --
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/app/main/main.c b/src/app/main/main.c
index 653a393fe..ec86c4639 100644
--- a/src/app/main/main.c
+++ b/src/app/main/main.c
@@ -1402,6 +1402,7 @@ tor_run_main(const tor_main_configuration_t *tor_cfg)
       tor_free_all(0);
       return -1;
     }
+    tor_make_getaddrinfo_cache_active();
 
     // registering libevent rng
 #ifdef HAVE_EVUTIL_SECURE_RNG_SET_URANDOM_DEVICE_FILE
diff --git a/src/lib/sandbox/.may_include b/src/lib/sandbox/.may_include
index 84906dfb3..e8ba5bb73 100644
--- a/src/lib/sandbox/.may_include
+++ b/src/lib/sandbox/.may_include
@@ -5,7 +5,6 @@ lib/container/*.h
 lib/err/*.h
 lib/log/*.h
 lib/malloc/*.h
-lib/net/*.h
 lib/sandbox/*.h
 lib/sandbox/*.inc
 lib/string/*.h
diff --git a/src/lib/sandbox/sandbox.c b/src/lib/sandbox/sandbox.c
index 6f074bb4e..4d832f106 100644
--- a/src/lib/sandbox/sandbox.c
+++ b/src/lib/sandbox/sandbox.c
@@ -38,7 +38,6 @@
 #include "lib/err/torerr.h"
 #include "lib/log/log.h"
 #include "lib/cc/torint.h"
-#include "lib/net/resolve.h"
 #include "lib/malloc/malloc.h"
 #include "lib/string/scanf.h"
 
@@ -1553,7 +1552,6 @@ install_syscall_filter(sandbox_cfg_t* cfg)
 
   // marking the sandbox as active
   sandbox_active = 1;
-  tor_make_getaddrinfo_cache_active();
 
  end:
   seccomp_release(ctx);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits