diff options
author | 2015-10-07 14:06:20 +0000 | |
---|---|---|
committer | 2015-10-08 12:11:17 +0000 | |
commit | 1940933a4191846f9349ecd45976dff3cab976d6 (patch) | |
tree | 1d3ac628ffe66bd963e75d2e1ace23f1b6dc67e8 /src/main/tools/BUILD | |
parent | fdc46c9d1c731b76a8b61393d36cf3ee9edad46d (diff) |
Introduce two new options to Linux sandbox wrapper:
* -n: Create a new network namespace with only loopback interface.
* -r: set the uid/gid inside the sandbox to be root (instead of nobody)
so that setuid programs like ping can still run when needed.
--
Change-Id: I8ab434e47e0f6933ee9de02e135c8daec39fe73f
Reviewed-on: https://bazel-review.googlesource.com/#/c/2101/
MOS_MIGRATED_REVID=104858163
Diffstat (limited to 'src/main/tools/BUILD')
-rw-r--r-- | src/main/tools/BUILD | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/main/tools/BUILD b/src/main/tools/BUILD index 67b3888d15..4a87f650a2 100644 --- a/src/main/tools/BUILD +++ b/src/main/tools/BUILD @@ -1,6 +1,14 @@ package(default_visibility = ["//src:__subpackages__"]) cc_library( + name = "network-tools", + srcs = ["network-tools.c"], + hdrs = ["network-tools.h"], + copts = ["-std=c99"], + deps = [":process-tools"], +) + +cc_library( name = "process-tools", srcs = ["process-tools.c"], hdrs = ["process-tools.h"], @@ -29,7 +37,14 @@ cc_binary( }), copts = ["-std=c99"], linkopts = ["-lm"], - deps = [":process-tools"], + deps = select({ + "//src:darwin": [], + "//src:freebsd": [], + "//conditions:default": [ + ":process-tools", + ":network-tools", + ], + }), ) filegroup( |