aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-07-12 17:12:43 -0400
committerNick Mathewson <nickm@torproject.org>2013-07-12 17:12:43 -0400
commitaac732322ae132a1659ecbd4039c7d017ddc3d20 (patch)
treec3d31d970fb2ce4ffd458e4d415c9f6ce44a29ec /src/or/main.c
parent14d5e7f85e343a48e27c3b8f2b560c4d1aff5315 (diff)
parentf9c1ba6493478d227c202e4d3444283b2c840a6a (diff)
downloadtor-aac732322ae132a1659ecbd4039c7d017ddc3d20.tar
tor-aac732322ae132a1659ecbd4039c7d017ddc3d20.tar.gz
Merge remote-tracking branch 'public/gsoc-ctoader-cap-phase1-squashed'
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 85aa97f5a..618ee6e13 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -57,6 +57,7 @@
#include <openssl/crypto.h>
#endif
#include "memarea.h"
+#include "../common/sandbox.h"
#ifdef HAVE_EVENT2_EVENT_H
#include <event2/event.h>
@@ -2704,6 +2705,14 @@ tor_main(int argc, char *argv[])
#endif
if (tor_init(argc, argv)<0)
return -1;
+
+ if (get_options()->Sandbox) {
+ if (tor_global_sandbox()) {
+ log_err(LD_BUG,"Failed to create syscall sandbox filter");
+ return -1;
+ }
+ }
+
switch (get_options()->command) {
case CMD_RUN_TOR:
#ifdef NT_SERVICE