blob: 7b04a1f31215d95a6ba7a68951e9f63bc41e3dfb [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",
Mostyn Bramley-Moore452bf632017-11-28 21:51:42115 "//base/third_party/dynamic_annotations",
[email protected]75cd8f02014-05-29 20:56:02116 "//testing/gtest",
117 ]
118
jln01954fd2015-05-15 06:19:33119 if (use_base_test_suite) {
120 deps += [ "//base/test:test_support" ]
121 defines = [ "SANDBOX_USES_BASE_TEST_SUITE" ]
122 }
123
[email protected]75cd8f02014-05-29 20:56:02124 if (compile_suid_client) {
mdempsky3cc942a2015-02-05 03:29:25125 sources += [
126 "suid/client/setuid_sandbox_client_unittest.cc",
127 "suid/client/setuid_sandbox_host_unittest.cc",
128 ]
[email protected]75cd8f02014-05-29 20:56:02129 }
130 if (use_seccomp_bpf) {
131 sources += [
[email protected]fb75e2a2014-07-17 07:24:58132 "bpf_dsl/bpf_dsl_unittest.cc",
mdempskyb80b1f52015-02-05 00:54:35133 "bpf_dsl/codegen_unittest.cc",
[email protected]fb75e2a2014-07-17 07:24:58134 "bpf_dsl/cons_unittest.cc",
mdempsky937389d2015-08-31 22:27:23135 "bpf_dsl/dump_bpf.cc",
136 "bpf_dsl/dump_bpf.h",
mdempskyce4c9f12015-02-05 06:23:05137 "bpf_dsl/syscall_set_unittest.cc",
mdempsky3909ebf2015-08-20 23:18:18138 "bpf_dsl/test_trap_registry.cc",
139 "bpf_dsl/test_trap_registry.h",
140 "bpf_dsl/test_trap_registry_unittest.cc",
mdempsky937389d2015-08-31 22:27:23141 "bpf_dsl/verifier.cc",
142 "bpf_dsl/verifier.h",
jlnaedcc3e2015-02-12 03:18:10143 "integration_tests/bpf_dsl_seccomp_unittest.cc",
144 "integration_tests/seccomp_broker_process_unittest.cc",
[email protected]75cd8f02014-05-29 20:56:02145 "seccomp-bpf-helpers/baseline_policy_unittest.cc",
jlnfcdfb102014-09-12 02:47:44146 "seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc",
[email protected]75cd8f02014-05-29 20:56:02147 "seccomp-bpf/bpf_tests_unittest.cc",
jlna29d0a32014-11-26 22:38:35148 "seccomp-bpf/sandbox_bpf_unittest.cc",
[email protected]75cd8f02014-05-29 20:56:02149 "seccomp-bpf/syscall_unittest.cc",
hidehikoa926d0b2015-04-24 21:55:21150 "seccomp-bpf/trap_unittest.cc",
[email protected]75cd8f02014-05-29 20:56:02151 ]
mdempskya3fd0ec2015-08-26 00:45:52152 deps += [ ":bpf_dsl_golden" ]
[email protected]75cd8f02014-05-29 20:56:02153 }
154 if (compile_credentials) {
155 sources += [
jlnaedcc3e2015-02-12 03:18:10156 "integration_tests/namespace_unix_domain_socket_unittest.cc",
[email protected]75cd8f02014-05-29 20:56:02157 "services/credentials_unittest.cc",
rickyz41fb1452015-01-27 03:57:58158 "services/namespace_utils_unittest.cc",
[email protected]75cd8f02014-05-29 20:56:02159 ]
rickyz966f039d2015-03-17 07:23:43160
jln01954fd2015-05-15 06:19:33161 if (use_base_test_suite) {
162 # Tests that use advanced features not available in stock GTest.
163 sources += [ "services/namespace_sandbox_unittest.cc" ]
164 }
165
rickyz966f039d2015-03-17 07:23:43166 # For credentials_unittest.cc
167 configs += [ "//build/config/linux:libcap" ]
[email protected]75cd8f02014-05-29 20:56:02168 }
169}
170
mdempskya3fd0ec2015-08-26 00:45:52171action("bpf_dsl_golden") {
172 script = "bpf_dsl/golden/generate.py"
173 inputs = [
174 "bpf_dsl/golden/i386/ArgSizePolicy.txt",
175 "bpf_dsl/golden/i386/BasicPolicy.txt",
176 "bpf_dsl/golden/i386/ElseIfPolicy.txt",
177 "bpf_dsl/golden/i386/MaskingPolicy.txt",
178 "bpf_dsl/golden/i386/MoreBooleanLogicPolicy.txt",
179 "bpf_dsl/golden/i386/NegativeConstantsPolicy.txt",
180 "bpf_dsl/golden/i386/SwitchPolicy.txt",
181 "bpf_dsl/golden/x86-64/ArgSizePolicy.txt",
182 "bpf_dsl/golden/x86-64/BasicPolicy.txt",
183 "bpf_dsl/golden/x86-64/BooleanLogicPolicy.txt",
184 "bpf_dsl/golden/x86-64/ElseIfPolicy.txt",
185 "bpf_dsl/golden/x86-64/MaskingPolicy.txt",
186 "bpf_dsl/golden/x86-64/MoreBooleanLogicPolicy.txt",
187 "bpf_dsl/golden/x86-64/NegativeConstantsPolicy.txt",
188 "bpf_dsl/golden/x86-64/SwitchPolicy.txt",
189 ]
190 outputs = [
191 "$target_gen_dir/bpf_dsl/golden/golden_files.h",
192 ]
193 args =
194 rebase_path(outputs, root_build_dir) + rebase_path(inputs, root_build_dir)
195}
196
agrieve62ab00282016-04-05 02:03:45197test("sandbox_linux_unittests") {
rockot86da06c7f2015-02-21 00:40:58198 deps = [
199 ":sandbox_linux_unittests_sources",
thomasanderson84fa8b02017-05-18 23:38:47200 "//build/config:exe_and_shlib_deps",
rockot86da06c7f2015-02-21 00:40:58201 ]
agrieve62ab00282016-04-05 02:03:45202 if (is_android) {
203 use_raw_android_executable = true
204 }
rockot86da06c7f2015-02-21 00:40:58205}
206
[email protected]75cd8f02014-05-29 20:56:02207component("seccomp_bpf") {
208 sources = [
[email protected]fb75e2a2014-07-17 07:24:58209 "bpf_dsl/bpf_dsl.cc",
210 "bpf_dsl/bpf_dsl.h",
mdempskyc60a1c52014-10-24 23:07:10211 "bpf_dsl/bpf_dsl_forward.h",
mdempskyfb10cce2014-10-14 17:56:44212 "bpf_dsl/bpf_dsl_impl.h",
mdempskyb80b1f52015-02-05 00:54:35213 "bpf_dsl/codegen.cc",
214 "bpf_dsl/codegen.h",
[email protected]fb75e2a2014-07-17 07:24:58215 "bpf_dsl/cons.h",
mdempsky3909ebf2015-08-20 23:18:18216 "bpf_dsl/errorcode.h",
jlna65ffca2015-02-13 04:12:43217 "bpf_dsl/linux_syscall_ranges.h",
mdempskyc60a1c52014-10-24 23:07:10218 "bpf_dsl/policy.cc",
219 "bpf_dsl/policy.h",
mdempsky27e78ad72014-10-16 16:49:54220 "bpf_dsl/policy_compiler.cc",
221 "bpf_dsl/policy_compiler.h",
jlna65ffca2015-02-13 04:12:43222 "bpf_dsl/seccomp_macros.h",
mdempskyce4c9f12015-02-05 06:23:05223 "bpf_dsl/syscall_set.cc",
224 "bpf_dsl/syscall_set.h",
mdempsky27e78ad72014-10-16 16:49:54225 "bpf_dsl/trap_registry.h",
ejcarusob7865802016-08-30 06:14:30226 "seccomp-bpf-helpers/baseline_policy.cc",
227 "seccomp-bpf-helpers/baseline_policy.h",
Robert Sesekf2255a22017-07-07 16:02:39228 "seccomp-bpf-helpers/baseline_policy_android.cc",
229 "seccomp-bpf-helpers/baseline_policy_android.h",
ejcarusob7865802016-08-30 06:14:30230 "seccomp-bpf-helpers/sigsys_handlers.cc",
231 "seccomp-bpf-helpers/sigsys_handlers.h",
232 "seccomp-bpf-helpers/syscall_parameters_restrictions.cc",
233 "seccomp-bpf-helpers/syscall_parameters_restrictions.h",
234 "seccomp-bpf-helpers/syscall_sets.cc",
235 "seccomp-bpf-helpers/syscall_sets.h",
[email protected]75cd8f02014-05-29 20:56:02236 "seccomp-bpf/die.cc",
237 "seccomp-bpf/die.h",
[email protected]75cd8f02014-05-29 20:56:02238 "seccomp-bpf/sandbox_bpf.cc",
239 "seccomp-bpf/sandbox_bpf.h",
[email protected]75cd8f02014-05-29 20:56:02240 "seccomp-bpf/syscall.cc",
241 "seccomp-bpf/syscall.h",
[email protected]75cd8f02014-05-29 20:56:02242 "seccomp-bpf/trap.cc",
243 "seccomp-bpf/trap.h",
[email protected]75cd8f02014-05-29 20:56:02244 ]
245 defines = [ "SANDBOX_IMPLEMENTATION" ]
246
brettw63340882016-03-22 17:09:49247 public_deps = [
248 ":sandbox_services_headers",
Thiago Farina10ec8a62017-05-15 20:38:09249 "//sandbox:sandbox_export",
brettw63340882016-03-22 17:09:49250 ]
[email protected]75cd8f02014-05-29 20:56:02251 deps = [
jlnbd4df41c2014-11-25 02:32:30252 ":sandbox_services",
[email protected]75cd8f02014-05-29 20:56:02253 "//base",
Mostyn Bramley-Moore452bf632017-11-28 21:51:42254 "//base/third_party/dynamic_annotations",
[email protected]75cd8f02014-05-29 20:56:02255 ]
phosek636bceb32015-10-27 03:36:48256
257 if (is_nacl_nonsfi) {
258 cflags = [ "-fgnu-inline-asm" ]
259 sources -= [
260 "bpf_dsl/bpf_dsl_forward.h",
261 "bpf_dsl/bpf_dsl_impl.h",
262 "bpf_dsl/cons.h",
263 "bpf_dsl/errorcode.h",
264 "bpf_dsl/linux_syscall_ranges.h",
265 "bpf_dsl/seccomp_macros.h",
266 "bpf_dsl/trap_registry.h",
phosek636bceb32015-10-27 03:36:48267 "seccomp-bpf-helpers/baseline_policy.cc",
268 "seccomp-bpf-helpers/baseline_policy.h",
269 "seccomp-bpf-helpers/syscall_sets.cc",
270 "seccomp-bpf-helpers/syscall_sets.h",
271 ]
272 configs += [ ":nacl_nonsfi_warnings" ]
273 }
[email protected]75cd8f02014-05-29 20:56:02274}
275
Robert Sesek5fb31972017-07-12 00:21:40276if (is_android) {
277 # This target is available even if use_seccomp_bpf is disabled, but it also
278 # works when it is enabled.
279 component("seccomp_starter_android") {
280 sources = [
281 "seccomp-bpf-helpers/seccomp_starter_android.cc",
282 "seccomp-bpf-helpers/seccomp_starter_android.h",
283 ]
284
285 defines = [ "SANDBOX_IMPLEMENTATION" ]
286
287 deps = [
288 "//base",
Robert Sesekd4b1c132017-07-13 21:22:05289 "//sandbox:sandbox_features",
Robert Sesek5fb31972017-07-12 00:21:40290 ]
291
292 if (use_seccomp_bpf) {
293 deps += [ ":seccomp_bpf" ]
294 }
295
296 visibility = [ ":*" ]
297 }
298}
299
James Robinson060f2e32014-09-10 22:31:37300if (is_linux) {
scottmg34fb7e52014-12-03 23:27:24301 # The setuid sandbox for Linux.
James Robinson060f2e32014-09-10 22:31:37302 executable("chrome_sandbox") {
303 sources = [
304 "suid/common/sandbox.h",
305 "suid/common/suid_unsafe_environment_variables.h",
James Robinson060f2e32014-09-10 22:31:37306 "suid/process_util.h",
307 "suid/process_util_linux.c",
308 "suid/sandbox.c",
309 ]
[email protected]75cd8f02014-05-29 20:56:02310
James Robinson060f2e32014-09-10 22:31:37311 cflags = [
312 # For ULLONG_MAX
313 "-std=gnu99",
scottmg34fb7e52014-12-03 23:27:24314
James Robinson060f2e32014-09-10 22:31:37315 # These files have a suspicious comparison.
316 # TODO fix this and re-enable this warning.
317 "-Wno-sign-compare",
318 ]
brettwba7a73d2015-08-31 22:17:39319
dpranke3ea22b3a2016-06-09 23:39:50320 import("//build/config/compiler/compiler.gni")
321 import("//build/config/sanitizers/sanitizers.gni")
dpranke651705f2016-07-15 03:58:47322 if (is_component_build || using_sanitizer) {
dpranke3ea22b3a2016-06-09 23:39:50323 # WARNING! We remove this config so that we don't accidentally
324 # pick up the //build/config:rpath_for_built_shared_libraries
325 # sub-config. However, this means that we need to duplicate any
326 # other flags that executable_config might have.
327 configs -= [ "//build/config:executable_config" ]
328 if (!use_gold) {
dpranke41d05be2016-06-13 18:59:31329 ldflags = [ "-Wl,--disable-new-dtags" ]
dpranke3ea22b3a2016-06-09 23:39:50330 }
331 }
332
dpranke651705f2016-07-15 03:58:47333 # We also do not want to pick up any of the other sanitizer
334 # flags (i.e. we do not want to build w/ the sanitizers at all).
335 # This is safe to delete unconditionally, because it is part of the
336 # default configs and empty when not using the sanitizers.
337 configs -= [ "//build/config/sanitizers:default_sanitizer_flags" ]
James Robinson060f2e32014-09-10 22:31:37338 }
[email protected]75cd8f02014-05-29 20:56:02339}
340
341component("sandbox_services") {
342 sources = [
[email protected]75cd8f02014-05-29 20:56:02343 "services/init_process_reaper.cc",
344 "services/init_process_reaper.h",
jlnb14fc802015-02-12 05:32:11345 "services/proc_util.cc",
346 "services/proc_util.h",
jln977185982015-02-13 20:58:41347 "services/resource_limits.cc",
348 "services/resource_limits.h",
[email protected]75cd8f02014-05-29 20:56:02349 "services/scoped_process.cc",
350 "services/scoped_process.h",
jln610a4a612014-11-20 18:58:21351 "services/syscall_wrappers.cc",
352 "services/syscall_wrappers.h",
[email protected]75cd8f02014-05-29 20:56:02353 "services/thread_helpers.cc",
354 "services/thread_helpers.h",
[email protected]75cd8f02014-05-29 20:56:02355 "services/yama.cc",
jlnb14fc802015-02-12 05:32:11356 "services/yama.h",
jln878dca32014-11-11 07:43:57357 "syscall_broker/broker_channel.cc",
358 "syscall_broker/broker_channel.h",
jln70c42c202014-11-01 00:59:57359 "syscall_broker/broker_client.cc",
360 "syscall_broker/broker_client.h",
Tom Sepeza788b142017-12-05 01:17:08361 "syscall_broker/broker_command.cc",
362 "syscall_broker/broker_command.h",
leecamad78f422014-11-26 22:08:45363 "syscall_broker/broker_file_permission.cc",
364 "syscall_broker/broker_file_permission.h",
jln70c42c202014-11-01 00:59:57365 "syscall_broker/broker_host.cc",
366 "syscall_broker/broker_host.h",
367 "syscall_broker/broker_policy.cc",
368 "syscall_broker/broker_policy.h",
369 "syscall_broker/broker_process.cc",
370 "syscall_broker/broker_process.h",
[email protected]75cd8f02014-05-29 20:56:02371 ]
372
373 defines = [ "SANDBOX_IMPLEMENTATION" ]
374
Thiago Farina10ec8a62017-05-15 20:38:09375 public_deps = [
376 "//sandbox:sandbox_export",
377 ]
rickyz966f039d2015-03-17 07:23:43378 deps = [
379 "//base",
Mostyn Bramley-Moore452bf632017-11-28 21:51:42380 "//base/third_party/dynamic_annotations",
rickyz966f039d2015-03-17 07:23:43381 ]
382
phosek636bceb32015-10-27 03:36:48383 if (compile_credentials || is_nacl_nonsfi) {
[email protected]75cd8f02014-05-29 20:56:02384 sources += [
385 "services/credentials.cc",
386 "services/credentials.h",
rickyz8f235da2015-02-03 07:26:19387 "services/namespace_sandbox.cc",
388 "services/namespace_sandbox.h",
rickyz41fb1452015-01-27 03:57:58389 "services/namespace_utils.cc",
390 "services/namespace_utils.h",
[email protected]75cd8f02014-05-29 20:56:02391 ]
scottmg34fb7e52014-12-03 23:27:24392
brettw63340882016-03-22 17:09:49393 public_deps += [ ":sandbox_services_headers" ]
[email protected]75cd8f02014-05-29 20:56:02394 }
phosek636bceb32015-10-27 03:36:48395
396 if (is_nacl_nonsfi) {
mcgrathr87cb1c072015-11-20 21:47:40397 cflags = [ "-fgnu-inline-asm" ]
398
phosek636bceb32015-10-27 03:36:48399 sources -= [
400 "services/init_process_reaper.cc",
401 "services/init_process_reaper.h",
402 "services/scoped_process.cc",
403 "services/scoped_process.h",
404 "services/yama.cc",
405 "services/yama.h",
406 "syscall_broker/broker_channel.cc",
407 "syscall_broker/broker_channel.h",
408 "syscall_broker/broker_client.cc",
409 "syscall_broker/broker_client.h",
Tom Sepeza788b142017-12-05 01:17:08410 "syscall_broker/broker_command.cc",
411 "syscall_broker/broker_command.h",
phosek636bceb32015-10-27 03:36:48412 "syscall_broker/broker_file_permission.cc",
413 "syscall_broker/broker_file_permission.h",
414 "syscall_broker/broker_host.cc",
415 "syscall_broker/broker_host.h",
416 "syscall_broker/broker_policy.cc",
417 "syscall_broker/broker_policy.h",
418 "syscall_broker/broker_process.cc",
419 "syscall_broker/broker_process.h",
420 ]
421 }
[email protected]75cd8f02014-05-29 20:56:02422}
423
424source_set("sandbox_services_headers") {
425 sources = [
jlnaedcc3e2015-02-12 03:18:10426 "system_headers/arm64_linux_syscalls.h",
hidehikoa926d0b2015-04-24 21:55:21427 "system_headers/arm64_linux_ucontext.h",
jlna65ffca2015-02-13 04:12:43428 "system_headers/arm_linux_syscalls.h",
hidehikoa926d0b2015-04-24 21:55:21429 "system_headers/arm_linux_ucontext.h",
430 "system_headers/i386_linux_ucontext.h",
tfarina1d7984c2017-03-27 23:00:22431 "system_headers/linux_filter.h",
dnicoara97178052015-04-15 17:44:04432 "system_headers/linux_futex.h",
jlna65ffca2015-02-13 04:12:43433 "system_headers/linux_seccomp.h",
hidehikoa926d0b2015-04-24 21:55:21434 "system_headers/linux_signal.h",
jlnaedcc3e2015-02-12 03:18:10435 "system_headers/linux_syscalls.h",
ben7598f462015-05-22 23:19:51436 "system_headers/linux_time.h",
hidehikoa926d0b2015-04-24 21:55:21437 "system_headers/linux_ucontext.h",
tfarina1d7984c2017-03-27 23:00:22438 "system_headers/mips64_linux_syscalls.h",
Wang Qing534d7ce2017-09-18 23:35:59439 "system_headers/mips64_linux_ucontext.h",
tfarina1d7984c2017-03-27 23:00:22440 "system_headers/mips_linux_syscalls.h",
441 "system_headers/mips_linux_ucontext.h",
jlnaedcc3e2015-02-12 03:18:10442 "system_headers/x86_32_linux_syscalls.h",
443 "system_headers/x86_64_linux_syscalls.h",
tfarina1d7984c2017-03-27 23:00:22444 "system_headers/x86_64_linux_ucontext.h",
[email protected]75cd8f02014-05-29 20:56:02445 ]
446}
447
phosek636bceb32015-10-27 03:36:48448if (compile_suid_client || is_nacl_nonsfi) {
James Robinson060f2e32014-09-10 22:31:37449 component("suid_sandbox_client") {
450 sources = [
James Robinson060f2e32014-09-10 22:31:37451 "suid/client/setuid_sandbox_client.cc",
452 "suid/client/setuid_sandbox_client.h",
mdempsky3cc942a2015-02-05 03:29:25453 "suid/client/setuid_sandbox_host.cc",
454 "suid/client/setuid_sandbox_host.h",
scottmg7c7296f42015-02-28 02:23:09455 "suid/common/sandbox.h",
456 "suid/common/suid_unsafe_environment_variables.h",
James Robinson060f2e32014-09-10 22:31:37457 ]
458 defines = [ "SANDBOX_IMPLEMENTATION" ]
Thiago Farina10ec8a62017-05-15 20:38:09459 public_deps = [
460 "//sandbox:sandbox_export",
461 ]
James Robinson060f2e32014-09-10 22:31:37462 deps = [
463 ":sandbox_services",
464 "//base",
Mostyn Bramley-Moore452bf632017-11-28 21:51:42465 "//base/third_party/dynamic_annotations",
James Robinson060f2e32014-09-10 22:31:37466 ]
phosek636bceb32015-10-27 03:36:48467
468 if (is_nacl_nonsfi) {
469 sources -= [
470 "suid/client/setuid_sandbox_host.cc",
471 "suid/client/setuid_sandbox_host.h",
472 "suid/common/sandbox.h",
473 "suid/common/suid_unsafe_environment_variables.h",
474 ]
475 }
James Robinson060f2e32014-09-10 22:31:37476 }
[email protected]75cd8f02014-05-29 20:56:02477}