blob: b00a88cfa35b968771db783f1bb6105af3653d36 [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 ]
phosek636bceb32015-10-27 03:36:4840 if (compile_suid_client || is_nacl_nonsfi) {
brettw00709df2015-12-02 01:40:5041 public_deps += [ ":suid_sandbox_client" ]
[email protected]75cd8f02014-05-29 20:56:0242 }
phosek636bceb32015-10-27 03:36:4843 if (use_seccomp_bpf || is_nacl_nonsfi) {
ejcarusob7865802016-08-30 06:14:3044 public_deps += [ ":seccomp_bpf" ]
[email protected]75cd8f02014-05-29 20:56:0245 }
Robert Sesek5fb31972017-07-12 00:21:4046 if (is_android) {
47 public_deps += [ ":seccomp_starter_android" ]
48 }
[email protected]75cd8f02014-05-29 20:56:0249}
50
51source_set("sandbox_linux_test_utils") {
Brett Wilson0c8745a2014-09-08 22:59:4952 testonly = true
[email protected]75cd8f02014-05-29 20:56:0253 sources = [
54 "tests/sandbox_test_runner.cc",
55 "tests/sandbox_test_runner.h",
56 "tests/sandbox_test_runner_function_pointer.cc",
57 "tests/sandbox_test_runner_function_pointer.h",
[email protected]75cd8f02014-05-29 20:56:0258 "tests/unit_tests.cc",
59 "tests/unit_tests.h",
60 ]
61
62 deps = [
63 "//testing/gtest",
64 ]
65
phosekca8571a92015-12-17 16:35:4266 if (!is_nacl_nonsfi) {
67 sources += [
68 "tests/test_utils.cc",
69 "tests/test_utils.h",
70 ]
71 }
72
73 if (use_seccomp_bpf || is_nacl_nonsfi) {
[email protected]75cd8f02014-05-29 20:56:0274 sources += [
75 "seccomp-bpf/bpf_tester_compatibility_delegate.h",
76 "seccomp-bpf/bpf_tests.h",
77 "seccomp-bpf/sandbox_bpf_test_runner.cc",
78 "seccomp-bpf/sandbox_bpf_test_runner.h",
79 ]
scottmg34fb7e52014-12-03 23:27:2480 deps += [ ":seccomp_bpf" ]
[email protected]75cd8f02014-05-29 20:56:0281 }
jln01954fd2015-05-15 06:19:3382
83 if (use_base_test_suite) {
84 deps += [ "//base/test:test_support" ]
85 defines = [ "SANDBOX_USES_BASE_TEST_SUITE" ]
86 }
[email protected]75cd8f02014-05-29 20:56:0287}
88
pkotwicz41889e32015-10-28 22:17:4889# Sources for sandbox_linux_unittests.
rockot86da06c7f2015-02-21 00:40:5890source_set("sandbox_linux_unittests_sources") {
91 testonly = true
92
[email protected]75cd8f02014-05-29 20:56:0293 sources = [
jlnb14fc802015-02-12 05:32:1194 "services/proc_util_unittest.cc",
jln977185982015-02-13 20:58:4195 "services/resource_limits_unittests.cc",
[email protected]75cd8f02014-05-29 20:56:0296 "services/scoped_process_unittest.cc",
jlnc420f0d2014-11-22 01:12:0997 "services/syscall_wrappers_unittest.cc",
[email protected]75cd8f02014-05-29 20:56:0298 "services/thread_helpers_unittests.cc",
99 "services/yama_unittests.cc",
leecamad78f422014-11-26 22:08:45100 "syscall_broker/broker_file_permission_unittest.cc",
jln70c42c202014-11-01 00:59:57101 "syscall_broker/broker_process_unittest.cc",
Greg Kerra7221102018-05-14 19:31:31102 "syscall_broker/broker_simple_message_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" ]
Robert Seseka64d5732018-03-29 13:55:37153
154 if (is_android) {
155 sources += [ "seccomp-bpf-helpers/baseline_policy_android_unittest.cc" ]
156 }
[email protected]75cd8f02014-05-29 20:56:02157 }
158 if (compile_credentials) {
159 sources += [
jlnaedcc3e2015-02-12 03:18:10160 "integration_tests/namespace_unix_domain_socket_unittest.cc",
[email protected]75cd8f02014-05-29 20:56:02161 "services/credentials_unittest.cc",
rickyz41fb1452015-01-27 03:57:58162 "services/namespace_utils_unittest.cc",
[email protected]75cd8f02014-05-29 20:56:02163 ]
rickyz966f039d2015-03-17 07:23:43164
jln01954fd2015-05-15 06:19:33165 if (use_base_test_suite) {
166 # Tests that use advanced features not available in stock GTest.
167 sources += [ "services/namespace_sandbox_unittest.cc" ]
168 }
169
rickyz966f039d2015-03-17 07:23:43170 # For credentials_unittest.cc
171 configs += [ "//build/config/linux:libcap" ]
[email protected]75cd8f02014-05-29 20:56:02172 }
173}
174
mdempskya3fd0ec2015-08-26 00:45:52175action("bpf_dsl_golden") {
176 script = "bpf_dsl/golden/generate.py"
177 inputs = [
178 "bpf_dsl/golden/i386/ArgSizePolicy.txt",
179 "bpf_dsl/golden/i386/BasicPolicy.txt",
180 "bpf_dsl/golden/i386/ElseIfPolicy.txt",
181 "bpf_dsl/golden/i386/MaskingPolicy.txt",
182 "bpf_dsl/golden/i386/MoreBooleanLogicPolicy.txt",
183 "bpf_dsl/golden/i386/NegativeConstantsPolicy.txt",
184 "bpf_dsl/golden/i386/SwitchPolicy.txt",
185 "bpf_dsl/golden/x86-64/ArgSizePolicy.txt",
186 "bpf_dsl/golden/x86-64/BasicPolicy.txt",
187 "bpf_dsl/golden/x86-64/BooleanLogicPolicy.txt",
188 "bpf_dsl/golden/x86-64/ElseIfPolicy.txt",
189 "bpf_dsl/golden/x86-64/MaskingPolicy.txt",
190 "bpf_dsl/golden/x86-64/MoreBooleanLogicPolicy.txt",
191 "bpf_dsl/golden/x86-64/NegativeConstantsPolicy.txt",
192 "bpf_dsl/golden/x86-64/SwitchPolicy.txt",
193 ]
194 outputs = [
195 "$target_gen_dir/bpf_dsl/golden/golden_files.h",
196 ]
197 args =
198 rebase_path(outputs, root_build_dir) + rebase_path(inputs, root_build_dir)
199}
200
agrieve62ab00282016-04-05 02:03:45201test("sandbox_linux_unittests") {
rockot86da06c7f2015-02-21 00:40:58202 deps = [
203 ":sandbox_linux_unittests_sources",
204 ]
agrieve62ab00282016-04-05 02:03:45205 if (is_android) {
206 use_raw_android_executable = true
207 }
rockot86da06c7f2015-02-21 00:40:58208}
209
[email protected]75cd8f02014-05-29 20:56:02210component("seccomp_bpf") {
211 sources = [
[email protected]fb75e2a2014-07-17 07:24:58212 "bpf_dsl/bpf_dsl.cc",
213 "bpf_dsl/bpf_dsl.h",
mdempskyc60a1c52014-10-24 23:07:10214 "bpf_dsl/bpf_dsl_forward.h",
mdempskyfb10cce2014-10-14 17:56:44215 "bpf_dsl/bpf_dsl_impl.h",
mdempskyb80b1f52015-02-05 00:54:35216 "bpf_dsl/codegen.cc",
217 "bpf_dsl/codegen.h",
[email protected]fb75e2a2014-07-17 07:24:58218 "bpf_dsl/cons.h",
mdempsky3909ebf2015-08-20 23:18:18219 "bpf_dsl/errorcode.h",
jlna65ffca2015-02-13 04:12:43220 "bpf_dsl/linux_syscall_ranges.h",
mdempskyc60a1c52014-10-24 23:07:10221 "bpf_dsl/policy.cc",
222 "bpf_dsl/policy.h",
mdempsky27e78ad72014-10-16 16:49:54223 "bpf_dsl/policy_compiler.cc",
224 "bpf_dsl/policy_compiler.h",
jlna65ffca2015-02-13 04:12:43225 "bpf_dsl/seccomp_macros.h",
mdempskyce4c9f12015-02-05 06:23:05226 "bpf_dsl/syscall_set.cc",
227 "bpf_dsl/syscall_set.h",
mdempsky27e78ad72014-10-16 16:49:54228 "bpf_dsl/trap_registry.h",
ejcarusob7865802016-08-30 06:14:30229 "seccomp-bpf-helpers/baseline_policy.cc",
230 "seccomp-bpf-helpers/baseline_policy.h",
Robert Sesekf2255a22017-07-07 16:02:39231 "seccomp-bpf-helpers/baseline_policy_android.cc",
232 "seccomp-bpf-helpers/baseline_policy_android.h",
ejcarusob7865802016-08-30 06:14:30233 "seccomp-bpf-helpers/sigsys_handlers.cc",
234 "seccomp-bpf-helpers/sigsys_handlers.h",
235 "seccomp-bpf-helpers/syscall_parameters_restrictions.cc",
236 "seccomp-bpf-helpers/syscall_parameters_restrictions.h",
237 "seccomp-bpf-helpers/syscall_sets.cc",
238 "seccomp-bpf-helpers/syscall_sets.h",
[email protected]75cd8f02014-05-29 20:56:02239 "seccomp-bpf/die.cc",
240 "seccomp-bpf/die.h",
[email protected]75cd8f02014-05-29 20:56:02241 "seccomp-bpf/sandbox_bpf.cc",
242 "seccomp-bpf/sandbox_bpf.h",
[email protected]75cd8f02014-05-29 20:56:02243 "seccomp-bpf/syscall.cc",
244 "seccomp-bpf/syscall.h",
[email protected]75cd8f02014-05-29 20:56:02245 "seccomp-bpf/trap.cc",
246 "seccomp-bpf/trap.h",
[email protected]75cd8f02014-05-29 20:56:02247 ]
248 defines = [ "SANDBOX_IMPLEMENTATION" ]
249
brettw63340882016-03-22 17:09:49250 public_deps = [
251 ":sandbox_services_headers",
Thiago Farina10ec8a62017-05-15 20:38:09252 "//sandbox:sandbox_export",
brettw63340882016-03-22 17:09:49253 ]
[email protected]75cd8f02014-05-29 20:56:02254 deps = [
jlnbd4df41c2014-11-25 02:32:30255 ":sandbox_services",
[email protected]75cd8f02014-05-29 20:56:02256 "//base",
Mostyn Bramley-Moore452bf632017-11-28 21:51:42257 "//base/third_party/dynamic_annotations",
[email protected]75cd8f02014-05-29 20:56:02258 ]
phosek636bceb32015-10-27 03:36:48259
260 if (is_nacl_nonsfi) {
261 cflags = [ "-fgnu-inline-asm" ]
262 sources -= [
263 "bpf_dsl/bpf_dsl_forward.h",
264 "bpf_dsl/bpf_dsl_impl.h",
265 "bpf_dsl/cons.h",
266 "bpf_dsl/errorcode.h",
267 "bpf_dsl/linux_syscall_ranges.h",
268 "bpf_dsl/seccomp_macros.h",
269 "bpf_dsl/trap_registry.h",
phosek636bceb32015-10-27 03:36:48270 "seccomp-bpf-helpers/baseline_policy.cc",
271 "seccomp-bpf-helpers/baseline_policy.h",
272 "seccomp-bpf-helpers/syscall_sets.cc",
273 "seccomp-bpf-helpers/syscall_sets.h",
274 ]
275 configs += [ ":nacl_nonsfi_warnings" ]
276 }
[email protected]75cd8f02014-05-29 20:56:02277}
278
Robert Sesek5fb31972017-07-12 00:21:40279if (is_android) {
280 # This target is available even if use_seccomp_bpf is disabled, but it also
281 # works when it is enabled.
282 component("seccomp_starter_android") {
283 sources = [
284 "seccomp-bpf-helpers/seccomp_starter_android.cc",
285 "seccomp-bpf-helpers/seccomp_starter_android.h",
286 ]
287
288 defines = [ "SANDBOX_IMPLEMENTATION" ]
289
290 deps = [
291 "//base",
Scott Violet73634e322018-04-04 21:05:02292 "//sandbox:sandbox_buildflags",
Robert Sesek5fb31972017-07-12 00:21:40293 ]
294
295 if (use_seccomp_bpf) {
296 deps += [ ":seccomp_bpf" ]
297 }
298
299 visibility = [ ":*" ]
300 }
301}
302
James Robinson060f2e32014-09-10 22:31:37303if (is_linux) {
scottmg34fb7e52014-12-03 23:27:24304 # The setuid sandbox for Linux.
James Robinson060f2e32014-09-10 22:31:37305 executable("chrome_sandbox") {
306 sources = [
307 "suid/common/sandbox.h",
308 "suid/common/suid_unsafe_environment_variables.h",
James Robinson060f2e32014-09-10 22:31:37309 "suid/process_util.h",
310 "suid/process_util_linux.c",
311 "suid/sandbox.c",
312 ]
[email protected]75cd8f02014-05-29 20:56:02313
James Robinson060f2e32014-09-10 22:31:37314 cflags = [
315 # For ULLONG_MAX
316 "-std=gnu99",
scottmg34fb7e52014-12-03 23:27:24317
James Robinson060f2e32014-09-10 22:31:37318 # These files have a suspicious comparison.
319 # TODO fix this and re-enable this warning.
320 "-Wno-sign-compare",
321 ]
322 }
[email protected]75cd8f02014-05-29 20:56:02323}
324
325component("sandbox_services") {
326 sources = [
[email protected]75cd8f02014-05-29 20:56:02327 "services/init_process_reaper.cc",
328 "services/init_process_reaper.h",
jlnb14fc802015-02-12 05:32:11329 "services/proc_util.cc",
330 "services/proc_util.h",
jln977185982015-02-13 20:58:41331 "services/resource_limits.cc",
332 "services/resource_limits.h",
[email protected]75cd8f02014-05-29 20:56:02333 "services/scoped_process.cc",
334 "services/scoped_process.h",
jln610a4a612014-11-20 18:58:21335 "services/syscall_wrappers.cc",
336 "services/syscall_wrappers.h",
[email protected]75cd8f02014-05-29 20:56:02337 "services/thread_helpers.cc",
338 "services/thread_helpers.h",
[email protected]75cd8f02014-05-29 20:56:02339 "services/yama.cc",
jlnb14fc802015-02-12 05:32:11340 "services/yama.h",
jln878dca32014-11-11 07:43:57341 "syscall_broker/broker_channel.cc",
342 "syscall_broker/broker_channel.h",
jln70c42c202014-11-01 00:59:57343 "syscall_broker/broker_client.cc",
344 "syscall_broker/broker_client.h",
Tom Sepeza788b142017-12-05 01:17:08345 "syscall_broker/broker_command.cc",
346 "syscall_broker/broker_command.h",
leecamad78f422014-11-26 22:08:45347 "syscall_broker/broker_file_permission.cc",
348 "syscall_broker/broker_file_permission.h",
jln70c42c202014-11-01 00:59:57349 "syscall_broker/broker_host.cc",
350 "syscall_broker/broker_host.h",
Tom Sepez18f57542017-12-07 22:46:30351 "syscall_broker/broker_permission_list.cc",
352 "syscall_broker/broker_permission_list.h",
jln70c42c202014-11-01 00:59:57353 "syscall_broker/broker_process.cc",
354 "syscall_broker/broker_process.h",
Greg Kerra7221102018-05-14 19:31:31355 "syscall_broker/broker_simple_message.cc",
356 "syscall_broker/broker_simple_message.h",
[email protected]75cd8f02014-05-29 20:56:02357 ]
358
359 defines = [ "SANDBOX_IMPLEMENTATION" ]
360
Thiago Farina10ec8a62017-05-15 20:38:09361 public_deps = [
362 "//sandbox:sandbox_export",
363 ]
rickyz966f039d2015-03-17 07:23:43364 deps = [
365 "//base",
Mostyn Bramley-Moore452bf632017-11-28 21:51:42366 "//base/third_party/dynamic_annotations",
rickyz966f039d2015-03-17 07:23:43367 ]
368
phosek636bceb32015-10-27 03:36:48369 if (compile_credentials || is_nacl_nonsfi) {
[email protected]75cd8f02014-05-29 20:56:02370 sources += [
371 "services/credentials.cc",
372 "services/credentials.h",
rickyz8f235da2015-02-03 07:26:19373 "services/namespace_sandbox.cc",
374 "services/namespace_sandbox.h",
rickyz41fb1452015-01-27 03:57:58375 "services/namespace_utils.cc",
376 "services/namespace_utils.h",
[email protected]75cd8f02014-05-29 20:56:02377 ]
scottmg34fb7e52014-12-03 23:27:24378
brettw63340882016-03-22 17:09:49379 public_deps += [ ":sandbox_services_headers" ]
[email protected]75cd8f02014-05-29 20:56:02380 }
phosek636bceb32015-10-27 03:36:48381
382 if (is_nacl_nonsfi) {
mcgrathr87cb1c072015-11-20 21:47:40383 cflags = [ "-fgnu-inline-asm" ]
384
phosek636bceb32015-10-27 03:36:48385 sources -= [
386 "services/init_process_reaper.cc",
387 "services/init_process_reaper.h",
388 "services/scoped_process.cc",
389 "services/scoped_process.h",
390 "services/yama.cc",
391 "services/yama.h",
392 "syscall_broker/broker_channel.cc",
393 "syscall_broker/broker_channel.h",
394 "syscall_broker/broker_client.cc",
395 "syscall_broker/broker_client.h",
Tom Sepeza788b142017-12-05 01:17:08396 "syscall_broker/broker_command.cc",
397 "syscall_broker/broker_command.h",
phosek636bceb32015-10-27 03:36:48398 "syscall_broker/broker_file_permission.cc",
399 "syscall_broker/broker_file_permission.h",
400 "syscall_broker/broker_host.cc",
401 "syscall_broker/broker_host.h",
Tom Sepez18f57542017-12-07 22:46:30402 "syscall_broker/broker_permission_list.cc",
403 "syscall_broker/broker_permission_list.h",
phosek636bceb32015-10-27 03:36:48404 "syscall_broker/broker_process.cc",
405 "syscall_broker/broker_process.h",
Greg Kerra7221102018-05-14 19:31:31406 "syscall_broker/broker_simple_message.cc",
407 "syscall_broker/broker_simple_message.h",
phosek636bceb32015-10-27 03:36:48408 ]
Tom Sepezb081ec32018-01-25 03:18:22409 } else if (!is_android) {
410 sources += [
411 "services/libc_interceptor.cc",
412 "services/libc_interceptor.h",
413 ]
phosek636bceb32015-10-27 03:36:48414 }
[email protected]75cd8f02014-05-29 20:56:02415}
416
417source_set("sandbox_services_headers") {
418 sources = [
jlnaedcc3e2015-02-12 03:18:10419 "system_headers/arm64_linux_syscalls.h",
jlna65ffca2015-02-13 04:12:43420 "system_headers/arm_linux_syscalls.h",
hidehikoa926d0b2015-04-24 21:55:21421 "system_headers/arm_linux_ucontext.h",
422 "system_headers/i386_linux_ucontext.h",
tfarina1d7984c2017-03-27 23:00:22423 "system_headers/linux_filter.h",
dnicoara97178052015-04-15 17:44:04424 "system_headers/linux_futex.h",
jlna65ffca2015-02-13 04:12:43425 "system_headers/linux_seccomp.h",
hidehikoa926d0b2015-04-24 21:55:21426 "system_headers/linux_signal.h",
jlnaedcc3e2015-02-12 03:18:10427 "system_headers/linux_syscalls.h",
ben7598f462015-05-22 23:19:51428 "system_headers/linux_time.h",
hidehikoa926d0b2015-04-24 21:55:21429 "system_headers/linux_ucontext.h",
tfarina1d7984c2017-03-27 23:00:22430 "system_headers/mips64_linux_syscalls.h",
431 "system_headers/mips_linux_syscalls.h",
jlnaedcc3e2015-02-12 03:18:10432 "system_headers/x86_32_linux_syscalls.h",
433 "system_headers/x86_64_linux_syscalls.h",
[email protected]75cd8f02014-05-29 20:56:02434 ]
435}
436
phosek636bceb32015-10-27 03:36:48437if (compile_suid_client || is_nacl_nonsfi) {
James Robinson060f2e32014-09-10 22:31:37438 component("suid_sandbox_client") {
439 sources = [
James Robinson060f2e32014-09-10 22:31:37440 "suid/client/setuid_sandbox_client.cc",
441 "suid/client/setuid_sandbox_client.h",
mdempsky3cc942a2015-02-05 03:29:25442 "suid/client/setuid_sandbox_host.cc",
443 "suid/client/setuid_sandbox_host.h",
scottmg7c7296f42015-02-28 02:23:09444 "suid/common/sandbox.h",
445 "suid/common/suid_unsafe_environment_variables.h",
James Robinson060f2e32014-09-10 22:31:37446 ]
447 defines = [ "SANDBOX_IMPLEMENTATION" ]
Thiago Farina10ec8a62017-05-15 20:38:09448 public_deps = [
449 "//sandbox:sandbox_export",
450 ]
James Robinson060f2e32014-09-10 22:31:37451 deps = [
452 ":sandbox_services",
453 "//base",
Mostyn Bramley-Moore452bf632017-11-28 21:51:42454 "//base/third_party/dynamic_annotations",
James Robinson060f2e32014-09-10 22:31:37455 ]
phosek636bceb32015-10-27 03:36:48456
457 if (is_nacl_nonsfi) {
458 sources -= [
459 "suid/client/setuid_sandbox_host.cc",
460 "suid/client/setuid_sandbox_host.h",
461 "suid/common/sandbox.h",
462 "suid/common/suid_unsafe_environment_variables.h",
463 ]
464 }
James Robinson060f2e32014-09-10 22:31:37465 }
[email protected]75cd8f02014-05-29 20:56:02466}