OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'targets': [ | 6 'targets': [ |
7 # We have two principal targets: sandbox and sandbox_linux_unittests | 7 # We have two principal targets: sandbox and sandbox_linux_unittests |
8 # All other targets are listed as dependencies. | 8 # All other targets are listed as dependencies. |
9 # FIXME(jln): for historial reasons, sandbox_linux is the setuid sandbox | 9 # FIXME(jln): for historial reasons, sandbox_linux is the setuid sandbox |
10 # and is its own target. | 10 # and is its own target. |
11 { | 11 { |
12 'target_name': 'sandbox', | 12 'target_name': 'sandbox', |
13 'type': 'none', | 13 'type': 'none', |
| 14 'dependencies': [ |
| 15 'suid_sandbox_client', |
| 16 ], |
14 'conditions': [ | 17 'conditions': [ |
15 # Only compile in the seccomp mode 1 code for the flag combination | 18 # Only compile in the seccomp mode 1 code for the flag combination |
16 # where we support it. | 19 # where we support it. |
17 [ 'OS=="linux" and (target_arch=="ia32" or target_arch=="x64") ' | 20 [ 'OS=="linux" and (target_arch=="ia32" or target_arch=="x64") ' |
18 'and toolkit_views==0 and selinux==0', { | 21 'and toolkit_views==0 and selinux==0', { |
19 'dependencies': [ | 22 'dependencies': [ |
20 'linux/seccomp-legacy/seccomp.gyp:seccomp_sandbox', | 23 'linux/seccomp-legacy/seccomp.gyp:seccomp_sandbox', |
21 ], | 24 ], |
22 }], | 25 }], |
23 # Similarly, compile seccomp BPF when we support it | 26 # Similarly, compile seccomp BPF when we support it |
24 [ 'OS=="linux" and (target_arch=="ia32" or target_arch=="x64")', { | 27 [ 'OS=="linux" and (target_arch=="ia32" or target_arch=="x64")', { |
25 'type': 'static_library', | 28 'type': 'static_library', |
26 'dependencies': [ | 29 'dependencies': [ |
27 'seccomp_bpf', | 30 'seccomp_bpf', |
28 ], | 31 ], |
29 }], | 32 }], |
30 ], | 33 ], |
31 }, | 34 }, |
32 { | 35 { |
33 'target_name': 'sandbox_linux_unittests', | 36 'target_name': 'sandbox_linux_unittests', |
34 'type': 'executable', | 37 'type': 'executable', |
35 'dependencies': [ | 38 'dependencies': [ |
36 'sandbox', | 39 'sandbox', |
37 '../testing/gtest.gyp:gtest', | 40 '../testing/gtest.gyp:gtest', |
38 ], | 41 ], |
39 'sources': [ | 42 'sources': [ |
40 'tests/unit_tests.cc', | 43 'tests/unit_tests.cc', |
| 44 'suid/client/setuid_sandbox_client_unittest.cc', |
41 ], | 45 ], |
42 'include_dirs': [ | 46 'include_dirs': [ |
43 '../..', | 47 '../..', |
44 ], | 48 ], |
45 'conditions': [ | 49 'conditions': [ |
46 [ 'OS=="linux" and (target_arch=="ia32" or target_arch=="x64")', { | 50 [ 'OS=="linux" and (target_arch=="ia32" or target_arch=="x64")', { |
47 'sources': [ | 51 'sources': [ |
48 'seccomp-bpf/sandbox_bpf_unittest.cc', | 52 'seccomp-bpf/sandbox_bpf_unittest.cc', |
49 ], | 53 ], |
50 }], | 54 }], |
(...skipping 13 matching lines...) Expand all Loading... |
64 ], | 68 ], |
65 'include_dirs': [ | 69 'include_dirs': [ |
66 '../..', | 70 '../..', |
67 ], | 71 ], |
68 }, | 72 }, |
69 { | 73 { |
70 # The setuid sandbox, for Linux | 74 # The setuid sandbox, for Linux |
71 'target_name': 'chrome_sandbox', | 75 'target_name': 'chrome_sandbox', |
72 'type': 'executable', | 76 'type': 'executable', |
73 'sources': [ | 77 'sources': [ |
| 78 'suid/common/sandbox.h', |
| 79 'suid/common/suid_unsafe_environment_variables.h', |
74 'suid/linux_util.c', | 80 'suid/linux_util.c', |
75 'suid/linux_util.h', | 81 'suid/linux_util.h', |
76 'suid/process_util.h', | 82 'suid/process_util.h', |
77 'suid/process_util_linux.c', | 83 'suid/process_util_linux.c', |
78 'suid/sandbox.h', | |
79 'suid/sandbox.c', | 84 'suid/sandbox.c', |
80 ], | 85 ], |
81 'cflags': [ | 86 'cflags': [ |
82 # For ULLONG_MAX | 87 # For ULLONG_MAX |
83 '-std=gnu99', | 88 '-std=gnu99', |
84 ], | 89 ], |
85 'include_dirs': [ | 90 'include_dirs': [ |
86 '../..', | 91 '../..', |
87 ], | 92 ], |
88 }, | 93 }, |
89 { | 94 { |
90 'target_name': 'libc_urandom_override', | 95 'target_name': 'libc_urandom_override', |
91 'type': 'static_library', | 96 'type': 'static_library', |
92 'sources': [ | 97 'sources': [ |
93 'services/libc_urandom_override.cc', | 98 'services/libc_urandom_override.cc', |
94 'services/libc_urandom_override.h', | 99 'services/libc_urandom_override.h', |
95 ], | 100 ], |
96 'dependencies': [ | 101 'dependencies': [ |
97 '../base/base.gyp:base', | 102 '../base/base.gyp:base', |
98 ], | 103 ], |
99 'include_dirs': [ | 104 'include_dirs': [ |
100 '..', | 105 '..', |
101 ], | 106 ], |
102 }, | 107 }, |
| 108 { |
| 109 'target_name': 'suid_sandbox_client', |
| 110 'type': 'static_library', |
| 111 'sources': [ |
| 112 'suid/common/sandbox.h', |
| 113 'suid/common/suid_unsafe_environment_variables.h', |
| 114 'suid/client/setuid_sandbox_client.cc', |
| 115 'suid/client/setuid_sandbox_client.h', |
| 116 ], |
| 117 'dependencies': [ |
| 118 '../base/base.gyp:base', |
| 119 ], |
| 120 'include_dirs': [ |
| 121 '..', |
| 122 ], |
| 123 }, |
| 124 |
103 ], | 125 ], |
104 } | 126 } |
OLD | NEW |