1 # Copyright (c) 2011 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.
11 'sandbox_windows_target': 0,
13 'target_conditions': [
14 ['sandbox_windows_target==1', {
15 # Files that are shared between the 32-bit and the 64-bit versions
16 # of the Windows sandbox library.
20 'src/broker_services.cc',
21 'src/broker_services.h',
22 'src/crosscall_client.h',
23 'src/crosscall_params.h',
24 'src/crosscall_server.cc',
25 'src/crosscall_server.h',
28 'src/eat_resolver.cc',
30 'src/filesystem_dispatcher.cc',
31 'src/filesystem_dispatcher.h',
32 'src/filesystem_interception.cc',
33 'src/filesystem_interception.h',
34 'src/filesystem_policy.cc',
35 'src/filesystem_policy.h',
36 'src/interception.cc',
38 'src/interception_agent.cc',
39 'src/interception_agent.h',
40 'src/interception_internal.h',
42 'src/internal_types.h',
46 'src/named_pipe_dispatcher.cc',
47 'src/named_pipe_dispatcher.h',
48 'src/named_pipe_interception.cc',
49 'src/named_pipe_interception.h',
50 'src/named_pipe_policy.cc',
51 'src/named_pipe_policy.h',
53 'src/policy_broker.cc',
54 'src/policy_broker.h',
55 'src/policy_engine_opcodes.cc',
56 'src/policy_engine_opcodes.h',
57 'src/policy_engine_params.h',
58 'src/policy_engine_processor.cc',
59 'src/policy_engine_processor.h',
60 'src/policy_low_level.cc',
61 'src/policy_low_level.h',
62 'src/policy_params.h',
63 'src/policy_target.cc',
64 'src/policy_target.h',
65 'src/process_thread_dispatcher.cc',
66 'src/process_thread_dispatcher.h',
67 'src/process_thread_interception.cc',
68 'src/process_thread_interception.h',
69 'src/process_thread_policy.cc',
70 'src/process_thread_policy.h',
71 'src/registry_dispatcher.cc',
72 'src/registry_dispatcher.h',
73 'src/registry_interception.cc',
74 'src/registry_interception.h',
75 'src/registry_policy.cc',
76 'src/registry_policy.h',
79 'src/restricted_token_utils.cc',
80 'src/restricted_token_utils.h',
81 'src/restricted_token.cc',
82 'src/restricted_token.h',
83 'src/sandbox_factory.h',
84 'src/sandbox_nt_types.h',
85 'src/sandbox_nt_util.cc',
86 'src/sandbox_nt_util.h',
87 'src/sandbox_policy_base.cc',
88 'src/sandbox_policy_base.h',
89 'src/sandbox_policy.h',
90 'src/sandbox_types.h',
91 'src/sandbox_utils.cc',
92 'src/sandbox_utils.h',
95 'src/security_level.h',
96 'src/service_resolver.cc',
97 'src/service_resolver.h',
98 'src/shared_handles.cc',
99 'src/shared_handles.h',
100 'src/sharedmem_ipc_client.cc',
101 'src/sharedmem_ipc_client.h',
102 'src/sharedmem_ipc_server.cc',
103 'src/sharedmem_ipc_server.h',
106 'src/sync_dispatcher.cc',
107 'src/sync_dispatcher.h',
108 'src/sync_interception.cc',
109 'src/sync_interception.h',
110 'src/sync_policy.cc',
112 'src/target_interceptions.cc',
113 'src/target_interceptions.h',
114 'src/target_process.cc',
115 'src/target_process.h',
116 'src/target_services.cc',
117 'src/target_services.h',
120 'src/win2k_threadpool.cc',
121 'src/win2k_threadpool.h',
129 [ 'OS=="freebsd" or OS=="openbsd"', {
130 # GYP requires that each file have at least one target defined.
133 'target_name': 'sandbox',
138 [ 'OS=="linux" and selinux==0 and clang==0', {
141 'target_name': 'chrome_sandbox',
142 'type': 'executable',
144 'linux/suid/linux_util.c',
145 'linux/suid/linux_util.h',
146 'linux/suid/process_util.h',
147 'linux/suid/process_util_linux.c',
148 'linux/suid/sandbox.c',
159 'target_name': 'sandbox',
160 'type': '<(library)',
162 ['target_arch!="arm"', {
164 '../seccompsandbox/seccomp.gyp:seccomp_sandbox',
171 [ 'OS=="linux" and (selinux==1 or clang==1)', {
172 # GYP requires that each file have at least one target defined.
175 'target_name': 'sandbox',
183 'target_name': 'sandbox',
184 'type': '<(library)',
186 'sandbox_windows_target': 1,
189 '../testing/gtest.gyp:gtest',
190 '../base/base.gyp:base',
191 '../base/base.gyp:base_static',
193 'export_dependent_settings': [
194 '../base/base.gyp:base',
196 'msvs_guid': '881F6A97-D539-4C48-B401-DF04385B2343',
198 # Files that are used by the 32-bit version of Windows sandbox only.
199 'src/resolver_32.cc',
200 'src/service_resolver_32.cc',
201 'src/sidestep_resolver.cc',
202 'src/sidestep_resolver.h',
203 'src/sidestep\ia32_modrm_map.cpp',
204 'src/sidestep\ia32_opcode_map.cpp',
205 'src/sidestep\mini_disassembler_types.h',
206 'src/sidestep\mini_disassembler.cpp',
207 'src/sidestep\mini_disassembler.h',
208 'src/sidestep\preamble_patcher_with_stub.cpp',
209 'src/sidestep\preamble_patcher.h',
218 'destination': '<(PRODUCT_DIR)',
220 'wow_helper/wow_helper.exe',
221 'wow_helper/wow_helper.pdb',
225 'direct_dependent_settings': {
233 'target_name': 'sandbox_win64',
234 'type': '<(library)',
236 'sandbox_windows_target': 1,
239 '../testing/gtest.gyp:gtest',
240 '../base/base.gyp:base_nacl_win64',
244 'msvs_target_platform': 'x64',
247 'msvs_guid': 'BE3468E6-B314-4310-B449-6FC0C52EE155',
249 # Files that are used by the 64-bit version of Windows sandbox only.
250 'src/interceptors_64.cc',
251 'src/interceptors_64.h',
252 'src/resolver_64.cc',
253 'src/service_resolver_64.cc',
259 'direct_dependent_settings': {
266 '<@(nacl_win64_defines)',
270 'target_name': 'sbox_integration_tests',
271 'type': 'executable',
274 '../testing/gtest.gyp:gtest',
277 'tests/common/controller.cc',
278 'tests/common/controller.h',
279 'tests/common/test_utils.cc',
280 'tests/common/test_utils.h',
281 'tests/integration_tests/integration_tests.cc',
283 'src/file_policy_test.cc',
284 'tests/integration_tests/integration_tests_test.cc',
285 'src/integrity_level_test.cc',
286 'src/ipc_ping_test.cc',
287 'src/named_pipe_policy_test.cc',
288 'src/policy_target_test.cc',
289 'src/process_policy_test.cc',
290 'src/registry_policy_test.cc',
291 'src/sync_policy_test.cc',
292 'src/unload_dll_test.cc',
296 'target_name': 'sbox_validation_tests',
297 'type': 'executable',
300 '../testing/gtest.gyp:gtest',
303 'tests/common/controller.cc',
304 'tests/common/controller.h',
305 'tests/validation_tests/unit_tests.cc',
306 'tests/validation_tests/commands.cc',
307 'tests/validation_tests/commands.h',
308 'tests/validation_tests/suite.cc',
312 'target_name': 'sbox_unittests',
313 'type': 'executable',
316 '../testing/gtest.gyp:gtest',
319 'tests/common/test_utils.cc',
320 'tests/common/test_utils.h',
321 'tests/unit_tests/unit_tests.cc',
322 'src/interception_unittest.cc',
323 'src/service_resolver_unittest.cc',
324 'src/restricted_token_unittest.cc',
325 'src/job_unittest.cc',
326 'src/sid_unittest.cc',
327 'src/policy_engine_unittest.cc',
328 'src/policy_low_level_unittest.cc',
329 'src/policy_opcodes_unittest.cc',
330 'src/ipc_unittest.cc',
331 'src/threadpool_unittest.cc',
332 'src/win_utils_unittest.cc',
336 'target_name': 'sandbox_poc',
337 'type': 'executable',
343 'sandbox_poc/main_ui_window.cc',
344 'sandbox_poc/main_ui_window.h',
345 'sandbox_poc/resource.h',
346 'sandbox_poc/sandbox.cc',
347 'sandbox_poc/sandbox.h',
348 'sandbox_poc/sandbox.ico',
349 'sandbox_poc/sandbox.rc',
358 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
363 'target_name': 'pocdll',
364 'type': 'shared_library',
366 'sandbox_poc/pocdll/exports.h',
367 'sandbox_poc/pocdll/fs.cc',
368 'sandbox_poc/pocdll/handles.cc',
369 'sandbox_poc/pocdll/invasive.cc',
370 'sandbox_poc/pocdll/network.cc',
371 'sandbox_poc/pocdll/pocdll.cc',
372 'sandbox_poc/pocdll/processes_and_threads.cc',
373 'sandbox_poc/pocdll/registry.cc',
374 'sandbox_poc/pocdll/spyware.cc',
375 'sandbox_poc/pocdll/utils.h',
391 # indent-tabs-mode:nil
393 # vim: set expandtab tabstop=2 shiftwidth=2: