blob: f8c6dbae40855a0d2588f8109e2bb8c26b6f9ca2 [file] [log] [blame]
[email protected]75cd8f02014-05-29 20:56:021# Copyright 2014 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("//build/config/features.gni")
phosek636bceb32015-10-27 03:36:486import("//build/config/nacl/config.gni")
rsesek7b1273af02016-12-06 20:55:477import("//sandbox/features.gni")
qsrfb5251d12015-01-21 15:57:228import("//testing/test.gni")
[email protected]75cd8f02014-05-29 20:56:029
pkotwiczbbe8d902015-10-29 17:10:0710if (is_android) {
11 import("//build/config/android/rules.gni")
12}
13
[email protected]75cd8f02014-05-29 20:56:0214declare_args() {
15 compile_suid_client = is_linux
16
17 compile_credentials = is_linux
18
jln01954fd2015-05-15 06:19:3319 # On Android, use plain GTest.
20 use_base_test_suite = is_linux
[email protected]75cd8f02014-05-29 20:56:0221}
22
phosek636bceb32015-10-27 03:36:4823if (is_nacl_nonsfi) {
24 config("nacl_nonsfi_warnings") {
25 # There are number of platform specific functions in
26 # seccomp-bpf syscall helpers, which are not being used.
27 cflags = [ "-Wno-unused-function" ]
28 }
29}
30
[email protected]75cd8f02014-05-29 20:56:0231# We have two principal targets: sandbox and sandbox_linux_unittests
32# All other targets are listed as dependencies.
33# There is one notable exception: for historical reasons, chrome_sandbox is
34# the setuid sandbox and is its own target.
35
36group("sandbox") {
brettw00709df2015-12-02 01:40:5037 public_deps = [
[email protected]75cd8f02014-05-29 20:56:0238 ":sandbox_services",
39 ]
40
phosek636bceb32015-10-27 03:36:4841 if (compile_suid_client || is_nacl_nonsfi) {
brettw00709df2015-12-02 01:40:5042 public_deps += [ ":suid_sandbox_client" ]
[email protected]75cd8f02014-05-29 20:56:0243 }
phosek636bceb32015-10-27 03:36:4844 if (use_seccomp_bpf || is_nacl_nonsfi) {
ejcarusob7865802016-08-30 06:14:3045 public_deps += [ ":seccomp_bpf" ]
[email protected]75cd8f02014-05-29 20:56:0246 }
Robert Sesek5fb31972017-07-12 00:21:4047 if (is_android) {
48 public_deps += [ ":seccomp_starter_android" ]
49 }
[email protected]75cd8f02014-05-29 20:56:0250}
51
52source_set("sandbox_linux_test_utils") {
Brett Wilson0c8745a2014-09-08 22:59:4953 testonly = true
[email protected]75cd8f02014-05-29 20:56:0254 sources = [
55 "tests/sandbox_test_runner.cc",
56 "tests/sandbox_test_runner.h",
57 "tests/sandbox_test_runner_function_pointer.cc",
58 "tests/sandbox_test_runner_function_pointer.h",
[email protected]75cd8f02014-05-29 20:56:0259 "tests/unit_tests.cc",
60 "tests/unit_tests.h",
61 ]
62
63 deps = [
64 "//testing/gtest",
65 ]
66
phosekca8571a92015-12-17 16:35:4267 if (!is_nacl_nonsfi) {
68 sources += [
69 "tests/test_utils.cc",
70 "tests/test_utils.h",
71 ]
72 }
73
74 if (use_seccomp_bpf || is_nacl_nonsfi) {
[email protected]75cd8f02014-05-29 20:56:0275 sources += [
76 "seccomp-bpf/bpf_tester_compatibility_delegate.h",
77 "seccomp-bpf/bpf_tests.h",
78 "seccomp-bpf/sandbox_bpf_test_runner.cc",
79 "seccomp-bpf/sandbox_bpf_test_runner.h",
80 ]
scottmg34fb7e52014-12-03 23:27:2481 deps += [ ":seccomp_bpf" ]
[email protected]75cd8f02014-05-29 20:56:0282 }
jln01954fd2015-05-15 06:19:3383
84 if (use_base_test_suite) {
85 deps += [ "//base/test:test_support" ]
86 defines = [ "SANDBOX_USES_BASE_TEST_SUITE" ]
87 }
[email protected]75cd8f02014-05-29 20:56:0288}
89
pkotwicz41889e32015-10-28 22:17:4890# Sources for sandbox_linux_unittests.
rockot86da06c7f2015-02-21 00:40:5891source_set("sandbox_linux_unittests_sources") {
92 testonly = true
93
[email protected]75cd8f02014-05-29 20:56:0294 sources = [
jlnb14fc802015-02-12 05:32:1195 "services/proc_util_unittest.cc",
jln977185982015-02-13 20:58:4196 "services/resource_limits_unittests.cc",
[email protected]75cd8f02014-05-29 20:56:0297 "services/scoped_process_unittest.cc",
jlnc420f0d2014-11-22 01:12:0998 "services/syscall_wrappers_unittest.cc",
[email protected]75cd8f02014-05-29 20:56:0299 "services/thread_helpers_unittests.cc",
100 "services/yama_unittests.cc",
leecamad78f422014-11-26 22:08:45101 "syscall_broker/broker_file_permission_unittest.cc",
jln70c42c202014-11-01 00:59:57102 "syscall_broker/broker_process_unittest.cc",
[email protected]232f6e112014-06-27 07:51:38103 "tests/main.cc",
104 "tests/scoped_temporary_file.cc",
105 "tests/scoped_temporary_file.h",
106 "tests/scoped_temporary_file_unittest.cc",
jlnc420f0d2014-11-22 01:12:09107 "tests/test_utils_unittest.cc",
[email protected]232f6e112014-06-27 07:51:38108 "tests/unit_tests_unittest.cc",
[email protected]75cd8f02014-05-29 20:56:02109 ]
110
111 deps = [
112 ":sandbox",
113 ":sandbox_linux_test_utils",
114 "//base",
[email protected]75cd8f02014-05-29 20:56:02115 "//testing/gtest",
116 ]
117
jln01954fd2015-05-15 06:19:33118 if (use_base_test_suite) {
119 deps += [ "//base/test:test_support" ]
120 defines = [ "SANDBOX_USES_BASE_TEST_SUITE" ]
121 }
122
[email protected]75cd8f02014-05-29 20:56:02123 if (compile_suid_client) {
mdempsky3cc942a2015-02-05 03:29:25124 sources += [
125 "suid/client/setuid_sandbox_client_unittest.cc",
126 "suid/client/setuid_sandbox_host_unittest.cc",
127 ]
[email protected]75cd8f02014-05-29 20:56:02128 }
129 if (use_seccomp_bpf) {
130 sources += [
[email protected]fb75e2a2014-07-17 07:24:58131 "bpf_dsl/bpf_dsl_unittest.cc",
mdempskyb80b1f52015-02-05 00:54:35132 "bpf_dsl/codegen_unittest.cc",
[email protected]fb75e2a2014-07-17 07:24:58133 "bpf_dsl/cons_unittest.cc",
mdempsky937389d2015-08-31 22:27:23134 "bpf_dsl/dump_bpf.cc",
135 "bpf_dsl/dump_bpf.h",
mdempskyce4c9f12015-02-05 06:23:05136 "bpf_dsl/syscall_set_unittest.cc",
mdempsky3909ebf2015-08-20 23:18:18137 "bpf_dsl/test_trap_registry.cc",
138 "bpf_dsl/test_trap_registry.h",
139 "bpf_dsl/test_trap_registry_unittest.cc",
mdempsky937389d2015-08-31 22:27:23140 "bpf_dsl/verifier.cc",
141 "bpf_dsl/verifier.h",
jlnaedcc3e2015-02-12 03:18:10142 "integration_tests/bpf_dsl_seccomp_unittest.cc",
143 "integration_tests/seccomp_broker_process_unittest.cc",
[email protected]75cd8f02014-05-29 20:56:02144 "seccomp-bpf-helpers/baseline_policy_unittest.cc",
jlnfcdfb102014-09-12 02:47:44145 "seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc",
[email protected]75cd8f02014-05-29 20:56:02146 "seccomp-bpf/bpf_tests_unittest.cc",
jlna29d0a32014-11-26 22:38:35147 "seccomp-bpf/sandbox_bpf_unittest.cc",
[email protected]75cd8f02014-05-29 20:56:02148 "seccomp-bpf/syscall_unittest.cc",
hidehikoa926d0b2015-04-24 21:55:21149 "seccomp-bpf/trap_unittest.cc",
[email protected]75cd8f02014-05-29 20:56:02150 ]
mdempskya3fd0ec2015-08-26 00:45:52151 deps += [ ":bpf_dsl_golden" ]
[email protected]75cd8f02014-05-29 20:56:02152 }
153 if (compile_credentials) {
154 sources += [
jlnaedcc3e2015-02-12 03:18:10155 "integration_tests/namespace_unix_domain_socket_unittest.cc",
[email protected]75cd8f02014-05-29 20:56:02156 "services/credentials_unittest.cc",
rickyz41fb1452015-01-27 03:57:58157 "services/namespace_utils_unittest.cc",
[email protected]75cd8f02014-05-29 20:56:02158 ]
rickyz966f039d2015-03-17 07:23:43159
jln01954fd2015-05-15 06:19:33160 if (use_base_test_suite) {
161 # Tests that use advanced features not available in stock GTest.
162 sources += [ "services/namespace_sandbox_unittest.cc" ]
163 }
164
rickyz966f039d2015-03-17 07:23:43165 # For credentials_unittest.cc
166 configs += [ "//build/config/linux:libcap" ]
[email protected]75cd8f02014-05-29 20:56:02167 }
168}
169
mdempskya3fd0ec2015-08-26 00:45:52170action("bpf_dsl_golden") {
171 script = "bpf_dsl/golden/generate.py"
172 inputs = [
173 "bpf_dsl/golden/i386/ArgSizePolicy.txt",
174 "bpf_dsl/golden/i386/BasicPolicy.txt",
175 "bpf_dsl/golden/i386/ElseIfPolicy.txt",
176 "bpf_dsl/golden/i386/MaskingPolicy.txt",
177 "bpf_dsl/golden/i386/MoreBooleanLogicPolicy.txt",
178 "bpf_dsl/golden/i386/NegativeConstantsPolicy.txt",
179 "bpf_dsl/golden/i386/SwitchPolicy.txt",
180 "bpf_dsl/golden/x86-64/ArgSizePolicy.txt",
181 "bpf_dsl/golden/x86-64/BasicPolicy.txt",
182 "bpf_dsl/golden/x86-64/BooleanLogicPolicy.txt",
183 "bpf_dsl/golden/x86-64/ElseIfPolicy.txt",
184 "bpf_dsl/golden/x86-64/MaskingPolicy.txt",
185 "bpf_dsl/golden/x86-64/MoreBooleanLogicPolicy.txt",
186 "bpf_dsl/golden/x86-64/NegativeConstantsPolicy.txt",
187 "bpf_dsl/golden/x86-64/SwitchPolicy.txt",
188 ]
189 outputs = [
190 "$target_gen_dir/bpf_dsl/golden/golden_files.h",
191 ]
192 args =
193 rebase_path(outputs, root_build_dir) + rebase_path(inputs, root_build_dir)
194}
195
agrieve62ab00282016-04-05 02:03:45196test("sandbox_linux_unittests") {
rockot86da06c7f2015-02-21 00:40:58197 deps = [
198 ":sandbox_linux_unittests_sources",
thomasanderson84fa8b02017-05-18 23:38:47199 "//build/config:exe_and_shlib_deps",
rockot86da06c7f2015-02-21 00:40:58200 ]
agrieve62ab00282016-04-05 02:03:45201 if (is_android) {
202 use_raw_android_executable = true
203 }
rockot86da06c7f2015-02-21 00:40:58204}
205
[email protected]75cd8f02014-05-29 20:56:02206component("seccomp_bpf") {
207 sources = [
[email protected]fb75e2a2014-07-17 07:24:58208 "bpf_dsl/bpf_dsl.cc",
209 "bpf_dsl/bpf_dsl.h",
mdempskyc60a1c52014-10-24 23:07:10210 "bpf_dsl/bpf_dsl_forward.h",
mdempskyfb10cce2014-10-14 17:56:44211 "bpf_dsl/bpf_dsl_impl.h",
mdempskyb80b1f52015-02-05 00:54:35212 "bpf_dsl/codegen.cc",
213 "bpf_dsl/codegen.h",
[email protected]fb75e2a2014-07-17 07:24:58214 "bpf_dsl/cons.h",
mdempsky3909ebf2015-08-20 23:18:18215 "bpf_dsl/errorcode.h",
jlna65ffca2015-02-13 04:12:43216 "bpf_dsl/linux_syscall_ranges.h",
mdempskyc60a1c52014-10-24 23:07:10217 "bpf_dsl/policy.cc",
218 "bpf_dsl/policy.h",
mdempsky27e78ad72014-10-16 16:49:54219 "bpf_dsl/policy_compiler.cc",
220 "bpf_dsl/policy_compiler.h",
jlna65ffca2015-02-13 04:12:43221 "bpf_dsl/seccomp_macros.h",
mdempskyce4c9f12015-02-05 06:23:05222 "bpf_dsl/syscall_set.cc",
223 "bpf_dsl/syscall_set.h",
mdempsky27e78ad72014-10-16 16:49:54224 "bpf_dsl/trap_registry.h",
ejcarusob7865802016-08-30 06:14:30225 "seccomp-bpf-helpers/baseline_policy.cc",
226 "seccomp-bpf-helpers/baseline_policy.h",
Robert Sesekf2255a22017-07-07 16:02:39227 "seccomp-bpf-helpers/baseline_policy_android.cc",
228 "seccomp-bpf-helpers/baseline_policy_android.h",
ejcarusob7865802016-08-30 06:14:30229 "seccomp-bpf-helpers/sigsys_handlers.cc",
230 "seccomp-bpf-helpers/sigsys_handlers.h",
231 "seccomp-bpf-helpers/syscall_parameters_restrictions.cc",
232 "seccomp-bpf-helpers/syscall_parameters_restrictions.h",
233 "seccomp-bpf-helpers/syscall_sets.cc",
234 "seccomp-bpf-helpers/syscall_sets.h",
[email protected]75cd8f02014-05-29 20:56:02235 "seccomp-bpf/die.cc",
236 "seccomp-bpf/die.h",
[email protected]75cd8f02014-05-29 20:56:02237 "seccomp-bpf/sandbox_bpf.cc",
238 "seccomp-bpf/sandbox_bpf.h",
[email protected]75cd8f02014-05-29 20:56:02239 "seccomp-bpf/syscall.cc",
240 "seccomp-bpf/syscall.h",
[email protected]75cd8f02014-05-29 20:56:02241 "seccomp-bpf/trap.cc",
242 "seccomp-bpf/trap.h",
[email protected]75cd8f02014-05-29 20:56:02243 ]
244 defines = [ "SANDBOX_IMPLEMENTATION" ]
245
brettw63340882016-03-22 17:09:49246 public_deps = [
247 ":sandbox_services_headers",
Thiago Farina10ec8a62017-05-15 20:38:09248 "//sandbox:sandbox_export",
brettw63340882016-03-22 17:09:49249 ]
[email protected]75cd8f02014-05-29 20:56:02250 deps = [
jlnbd4df41c2014-11-25 02:32:30251 ":sandbox_services",
[email protected]75cd8f02014-05-29 20:56:02252 "//base",
253 ]
phosek636bceb32015-10-27 03:36:48254
255 if (is_nacl_nonsfi) {
256 cflags = [ "-fgnu-inline-asm" ]
257 sources -= [
258 "bpf_dsl/bpf_dsl_forward.h",
259 "bpf_dsl/bpf_dsl_impl.h",
260 "bpf_dsl/cons.h",
261 "bpf_dsl/errorcode.h",
262 "bpf_dsl/linux_syscall_ranges.h",
263 "bpf_dsl/seccomp_macros.h",
264 "bpf_dsl/trap_registry.h",
phosek636bceb32015-10-27 03:36:48265 "seccomp-bpf-helpers/baseline_policy.cc",
266 "seccomp-bpf-helpers/baseline_policy.h",
267 "seccomp-bpf-helpers/syscall_sets.cc",
268 "seccomp-bpf-helpers/syscall_sets.h",
269 ]
270 configs += [ ":nacl_nonsfi_warnings" ]
271 }
[email protected]75cd8f02014-05-29 20:56:02272}
273
Robert Sesek5fb31972017-07-12 00:21:40274if (is_android) {
275 # This target is available even if use_seccomp_bpf is disabled, but it also
276 # works when it is enabled.
277 component("seccomp_starter_android") {
278 sources = [
279 "seccomp-bpf-helpers/seccomp_starter_android.cc",
280 "seccomp-bpf-helpers/seccomp_starter_android.h",
281 ]
282
283 defines = [ "SANDBOX_IMPLEMENTATION" ]
284
285 deps = [
286 "//base",
287 ]
288
289 if (use_seccomp_bpf) {
290 deps += [ ":seccomp_bpf" ]
291 }
292
293 visibility = [ ":*" ]
294 }
295}
296
James Robinson060f2e32014-09-10 22:31:37297if (is_linux) {
scottmg34fb7e52014-12-03 23:27:24298 # The setuid sandbox for Linux.
James Robinson060f2e32014-09-10 22:31:37299 executable("chrome_sandbox") {
300 sources = [
301 "suid/common/sandbox.h",
302 "suid/common/suid_unsafe_environment_variables.h",
James Robinson060f2e32014-09-10 22:31:37303 "suid/process_util.h",
304 "suid/process_util_linux.c",
305 "suid/sandbox.c",
306 ]
[email protected]75cd8f02014-05-29 20:56:02307
James Robinson060f2e32014-09-10 22:31:37308 cflags = [
309 # For ULLONG_MAX
310 "-std=gnu99",
scottmg34fb7e52014-12-03 23:27:24311
James Robinson060f2e32014-09-10 22:31:37312 # These files have a suspicious comparison.
313 # TODO fix this and re-enable this warning.
314 "-Wno-sign-compare",
315 ]
brettwba7a73d2015-08-31 22:17:39316
dpranke3ea22b3a2016-06-09 23:39:50317 import("//build/config/compiler/compiler.gni")
318 import("//build/config/sanitizers/sanitizers.gni")
dpranke651705f2016-07-15 03:58:47319 if (is_component_build || using_sanitizer) {
dpranke3ea22b3a2016-06-09 23:39:50320 # WARNING! We remove this config so that we don't accidentally
321 # pick up the //build/config:rpath_for_built_shared_libraries
322 # sub-config. However, this means that we need to duplicate any
323 # other flags that executable_config might have.
324 configs -= [ "//build/config:executable_config" ]
325 if (!use_gold) {
dpranke41d05be2016-06-13 18:59:31326 ldflags = [ "-Wl,--disable-new-dtags" ]
dpranke3ea22b3a2016-06-09 23:39:50327 }
328 }
329
dpranke651705f2016-07-15 03:58:47330 # We also do not want to pick up any of the other sanitizer
331 # flags (i.e. we do not want to build w/ the sanitizers at all).
332 # This is safe to delete unconditionally, because it is part of the
333 # default configs and empty when not using the sanitizers.
334 configs -= [ "//build/config/sanitizers:default_sanitizer_flags" ]
James Robinson060f2e32014-09-10 22:31:37335 }
[email protected]75cd8f02014-05-29 20:56:02336}
337
338component("sandbox_services") {
339 sources = [
[email protected]75cd8f02014-05-29 20:56:02340 "services/init_process_reaper.cc",
341 "services/init_process_reaper.h",
jlnb14fc802015-02-12 05:32:11342 "services/proc_util.cc",
343 "services/proc_util.h",
jln977185982015-02-13 20:58:41344 "services/resource_limits.cc",
345 "services/resource_limits.h",
[email protected]75cd8f02014-05-29 20:56:02346 "services/scoped_process.cc",
347 "services/scoped_process.h",
jln610a4a612014-11-20 18:58:21348 "services/syscall_wrappers.cc",
349 "services/syscall_wrappers.h",
[email protected]75cd8f02014-05-29 20:56:02350 "services/thread_helpers.cc",
351 "services/thread_helpers.h",
[email protected]75cd8f02014-05-29 20:56:02352 "services/yama.cc",
jlnb14fc802015-02-12 05:32:11353 "services/yama.h",
jln878dca32014-11-11 07:43:57354 "syscall_broker/broker_channel.cc",
355 "syscall_broker/broker_channel.h",
jln70c42c202014-11-01 00:59:57356 "syscall_broker/broker_client.cc",
357 "syscall_broker/broker_client.h",
358 "syscall_broker/broker_common.h",
leecamad78f422014-11-26 22:08:45359 "syscall_broker/broker_file_permission.cc",
360 "syscall_broker/broker_file_permission.h",
jln70c42c202014-11-01 00:59:57361 "syscall_broker/broker_host.cc",
362 "syscall_broker/broker_host.h",
363 "syscall_broker/broker_policy.cc",
364 "syscall_broker/broker_policy.h",
365 "syscall_broker/broker_process.cc",
366 "syscall_broker/broker_process.h",
[email protected]75cd8f02014-05-29 20:56:02367 ]
368
369 defines = [ "SANDBOX_IMPLEMENTATION" ]
370
Thiago Farina10ec8a62017-05-15 20:38:09371 public_deps = [
372 "//sandbox:sandbox_export",
373 ]
rickyz966f039d2015-03-17 07:23:43374 deps = [
375 "//base",
376 ]
377
phosek636bceb32015-10-27 03:36:48378 if (compile_credentials || is_nacl_nonsfi) {
[email protected]75cd8f02014-05-29 20:56:02379 sources += [
380 "services/credentials.cc",
381 "services/credentials.h",
rickyz8f235da2015-02-03 07:26:19382 "services/namespace_sandbox.cc",
383 "services/namespace_sandbox.h",
rickyz41fb1452015-01-27 03:57:58384 "services/namespace_utils.cc",
385 "services/namespace_utils.h",
[email protected]75cd8f02014-05-29 20:56:02386 ]
scottmg34fb7e52014-12-03 23:27:24387
brettw63340882016-03-22 17:09:49388 public_deps += [ ":sandbox_services_headers" ]
[email protected]75cd8f02014-05-29 20:56:02389 }
phosek636bceb32015-10-27 03:36:48390
391 if (is_nacl_nonsfi) {
mcgrathr87cb1c072015-11-20 21:47:40392 cflags = [ "-fgnu-inline-asm" ]
393
phosek636bceb32015-10-27 03:36:48394 sources -= [
395 "services/init_process_reaper.cc",
396 "services/init_process_reaper.h",
397 "services/scoped_process.cc",
398 "services/scoped_process.h",
399 "services/yama.cc",
400 "services/yama.h",
401 "syscall_broker/broker_channel.cc",
402 "syscall_broker/broker_channel.h",
403 "syscall_broker/broker_client.cc",
404 "syscall_broker/broker_client.h",
405 "syscall_broker/broker_common.h",
406 "syscall_broker/broker_file_permission.cc",
407 "syscall_broker/broker_file_permission.h",
408 "syscall_broker/broker_host.cc",
409 "syscall_broker/broker_host.h",
410 "syscall_broker/broker_policy.cc",
411 "syscall_broker/broker_policy.h",
412 "syscall_broker/broker_process.cc",
413 "syscall_broker/broker_process.h",
414 ]
415 }
[email protected]75cd8f02014-05-29 20:56:02416}
417
418source_set("sandbox_services_headers") {
419 sources = [
jlnaedcc3e2015-02-12 03:18:10420 "system_headers/arm64_linux_syscalls.h",
hidehikoa926d0b2015-04-24 21:55:21421 "system_headers/arm64_linux_ucontext.h",
jlna65ffca2015-02-13 04:12:43422 "system_headers/arm_linux_syscalls.h",
hidehikoa926d0b2015-04-24 21:55:21423 "system_headers/arm_linux_ucontext.h",
424 "system_headers/i386_linux_ucontext.h",
tfarina1d7984c2017-03-27 23:00:22425 "system_headers/linux_filter.h",
dnicoara97178052015-04-15 17:44:04426 "system_headers/linux_futex.h",
jlna65ffca2015-02-13 04:12:43427 "system_headers/linux_seccomp.h",
hidehikoa926d0b2015-04-24 21:55:21428 "system_headers/linux_signal.h",
jlnaedcc3e2015-02-12 03:18:10429 "system_headers/linux_syscalls.h",
ben7598f462015-05-22 23:19:51430 "system_headers/linux_time.h",
hidehikoa926d0b2015-04-24 21:55:21431 "system_headers/linux_ucontext.h",
tfarina1d7984c2017-03-27 23:00:22432 "system_headers/mips64_linux_syscalls.h",
433 "system_headers/mips_linux_syscalls.h",
434 "system_headers/mips_linux_ucontext.h",
jlnaedcc3e2015-02-12 03:18:10435 "system_headers/x86_32_linux_syscalls.h",
436 "system_headers/x86_64_linux_syscalls.h",
tfarina1d7984c2017-03-27 23:00:22437 "system_headers/x86_64_linux_ucontext.h",
[email protected]75cd8f02014-05-29 20:56:02438 ]
439}
440
phosek636bceb32015-10-27 03:36:48441if (compile_suid_client || is_nacl_nonsfi) {
James Robinson060f2e32014-09-10 22:31:37442 component("suid_sandbox_client") {
443 sources = [
James Robinson060f2e32014-09-10 22:31:37444 "suid/client/setuid_sandbox_client.cc",
445 "suid/client/setuid_sandbox_client.h",
mdempsky3cc942a2015-02-05 03:29:25446 "suid/client/setuid_sandbox_host.cc",
447 "suid/client/setuid_sandbox_host.h",
scottmg7c7296f42015-02-28 02:23:09448 "suid/common/sandbox.h",
449 "suid/common/suid_unsafe_environment_variables.h",
James Robinson060f2e32014-09-10 22:31:37450 ]
451 defines = [ "SANDBOX_IMPLEMENTATION" ]
Thiago Farina10ec8a62017-05-15 20:38:09452 public_deps = [
453 "//sandbox:sandbox_export",
454 ]
James Robinson060f2e32014-09-10 22:31:37455 deps = [
456 ":sandbox_services",
457 "//base",
458 ]
phosek636bceb32015-10-27 03:36:48459
460 if (is_nacl_nonsfi) {
461 sources -= [
462 "suid/client/setuid_sandbox_host.cc",
463 "suid/client/setuid_sandbox_host.h",
464 "suid/common/sandbox.h",
465 "suid/common/suid_unsafe_environment_variables.h",
466 ]
467 }
James Robinson060f2e32014-09-10 22:31:37468 }
[email protected]75cd8f02014-05-29 20:56:02469}