aboutsummaryrefslogtreecommitdiff
path: root/src/lib/sandbox
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-27 10:11:27 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-27 10:11:27 -0400
commitad24ccd47201e885e838ac5d579d2443032b997e (patch)
treeada4e060b1c639840acc85dc2a925f167a64a84e /src/lib/sandbox
parent55b793936725aba0c615c748838187a589c5d6d4 (diff)
downloadtor-ad24ccd47201e885e838ac5d579d2443032b997e.tar.gz
tor-ad24ccd47201e885e838ac5d579d2443032b997e.zip
Minimize includes from sandbox.c
Diffstat (limited to 'src/lib/sandbox')
-rw-r--r--src/lib/sandbox/.may_include4
-rw-r--r--src/lib/sandbox/sandbox.c10
2 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/sandbox/.may_include b/src/lib/sandbox/.may_include
index 5c22b0e509..84906dfb3d 100644
--- a/src/lib/sandbox/.may_include
+++ b/src/lib/sandbox/.may_include
@@ -4,7 +4,11 @@ lib/cc/*.h
lib/container/*.h
lib/err/*.h
lib/log/*.h
+lib/malloc/*.h
+lib/net/*.h
lib/sandbox/*.h
+lib/sandbox/*.inc
+lib/string/*.h
ht.h
siphash.h
diff --git a/src/lib/sandbox/sandbox.c b/src/lib/sandbox/sandbox.c
index f6f445df02..e49cbd863a 100644
--- a/src/lib/sandbox/sandbox.c
+++ b/src/lib/sandbox/sandbox.c
@@ -31,6 +31,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <errno.h>
#include "lib/sandbox/sandbox.h"
#include "lib/container/map.h"
@@ -38,11 +39,11 @@
#include "lib/log/torlog.h"
#include "lib/cc/torint.h"
#include "lib/net/resolve.h"
-#include "common/util.h"
-#include "tor_queue.h"
+#include "lib/malloc/util_malloc.h"
+#include "lib/string/scanf.h"
+#include "tor_queue.h"
#include "ht.h"
-
#include "siphash.h"
#define DEBUGGING_CLOSE
@@ -1558,7 +1559,8 @@ install_syscall_filter(sandbox_cfg_t* cfg)
return (rc < 0 ? -rc : rc);
}
-#include "linux_syscalls.inc"
+#include "lib/sandbox/linux_syscalls.inc"
+
static const char *
get_syscall_name(int syscall_num)
{