| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
| 6 | 6 |
| 7 declare_args() { | 7 declare_args() { |
| 8 compile_suid_client = is_linux | 8 compile_suid_client = is_linux |
| 9 | 9 |
| 10 compile_credentials = is_linux | 10 compile_credentials = is_linux |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 "seccomp-bpf-helpers/syscall_sets.h", | 179 "seccomp-bpf-helpers/syscall_sets.h", |
| 180 ] | 180 ] |
| 181 defines = [ "SANDBOX_IMPLEMENTATION" ] | 181 defines = [ "SANDBOX_IMPLEMENTATION" ] |
| 182 | 182 |
| 183 deps = [ | 183 deps = [ |
| 184 "//base", | 184 "//base", |
| 185 ":seccomp_bpf", | 185 ":seccomp_bpf", |
| 186 ] | 186 ] |
| 187 } | 187 } |
| 188 | 188 |
| 189 if (is_linux) { |
| 189 # The setuid sandbox for Linux. | 190 # The setuid sandbox for Linux. |
| 190 executable("chrome_sandbox") { | 191 executable("chrome_sandbox") { |
| 191 sources = [ | 192 sources = [ |
| 192 "suid/common/sandbox.h", | 193 "suid/common/sandbox.h", |
| 193 "suid/common/suid_unsafe_environment_variables.h", | 194 "suid/common/suid_unsafe_environment_variables.h", |
| 194 "suid/linux_util.c", | 195 "suid/linux_util.c", |
| 195 "suid/linux_util.h", | 196 "suid/linux_util.h", |
| 196 "suid/process_util.h", | 197 "suid/process_util.h", |
| 197 "suid/process_util_linux.c", | 198 "suid/process_util_linux.c", |
| 198 "suid/sandbox.c", | 199 "suid/sandbox.c", |
| 199 ] | 200 ] |
| 200 | 201 |
| 201 cflags = [ | 202 cflags = [ |
| 202 # For ULLONG_MAX | 203 # For ULLONG_MAX |
| 203 "-std=gnu99", | 204 "-std=gnu99", |
| 204 # These files have a suspicious comparison. | 205 # These files have a suspicious comparison. |
| 205 # TODO fix this and re-enable this warning. | 206 # TODO fix this and re-enable this warning. |
| 206 "-Wno-sign-compare", | 207 "-Wno-sign-compare", |
| 207 ] | 208 ] |
| 209 } |
| 208 } | 210 } |
| 209 | 211 |
| 210 component("sandbox_services") { | 212 component("sandbox_services") { |
| 211 sources = [ | 213 sources = [ |
| 212 "services/broker_process.cc", | 214 "services/broker_process.cc", |
| 213 "services/broker_process.h", | 215 "services/broker_process.h", |
| 214 "services/init_process_reaper.cc", | 216 "services/init_process_reaper.cc", |
| 215 "services/init_process_reaper.h", | 217 "services/init_process_reaper.h", |
| 216 "services/scoped_process.cc", | 218 "services/scoped_process.cc", |
| 217 "services/scoped_process.h", | 219 "services/scoped_process.h", |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 source_set("libc_urandom_override") { | 258 source_set("libc_urandom_override") { |
| 257 sources = [ | 259 sources = [ |
| 258 "services/libc_urandom_override.cc", | 260 "services/libc_urandom_override.cc", |
| 259 "services/libc_urandom_override.h", | 261 "services/libc_urandom_override.h", |
| 260 ] | 262 ] |
| 261 deps = [ | 263 deps = [ |
| 262 "//base", | 264 "//base", |
| 263 ] | 265 ] |
| 264 } | 266 } |
| 265 | 267 |
| 266 component("suid_sandbox_client") { | 268 if (compile_suid_client) { |
| 267 sources = [ | 269 component("suid_sandbox_client") { |
| 268 "suid/common/sandbox.h", | 270 sources = [ |
| 269 "suid/common/suid_unsafe_environment_variables.h", | 271 "suid/common/sandbox.h", |
| 270 "suid/client/setuid_sandbox_client.cc", | 272 "suid/common/suid_unsafe_environment_variables.h", |
| 271 "suid/client/setuid_sandbox_client.h", | 273 "suid/client/setuid_sandbox_client.cc", |
| 272 ] | 274 "suid/client/setuid_sandbox_client.h", |
| 273 defines = [ "SANDBOX_IMPLEMENTATION" ] | 275 ] |
| 276 defines = [ "SANDBOX_IMPLEMENTATION" ] |
| 274 | 277 |
| 275 deps = [ | 278 deps = [ |
| 276 ":sandbox_services", | 279 ":sandbox_services", |
| 277 "//base", | 280 "//base", |
| 278 ] | 281 ] |
| 282 } |
| 279 } | 283 } |
| 280 | 284 |
| 281 if (is_android) { | 285 if (is_android) { |
| 282 # TODO(GYP) enable this. Needs an android_strip wrapper python script. | 286 # TODO(GYP) enable this. Needs an android_strip wrapper python script. |
| 283 #action("sandbox_linux_unittests_stripped") { | 287 #action("sandbox_linux_unittests_stripped") { |
| 284 # script = "android_stip.py" | 288 # script = "android_stip.py" |
| 285 # | 289 # |
| 286 # in_file = "$root_out_dir/sandbox_linux_unittests" | 290 # in_file = "$root_out_dir/sandbox_linux_unittests" |
| 287 # | 291 # |
| 288 # out_file = "$root_out_dir/sandbox_linux_unittests_stripped" | 292 # out_file = "$root_out_dir/sandbox_linux_unittests_stripped" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 304 # 'type': 'none', | 308 # 'type': 'none', |
| 305 # 'variables': { | 309 # 'variables': { |
| 306 # 'test_suite_name': 'sandbox_linux_jni_unittests', | 310 # 'test_suite_name': 'sandbox_linux_jni_unittests', |
| 307 # }, | 311 # }, |
| 308 # 'dependencies': [ | 312 # 'dependencies': [ |
| 309 # 'sandbox_linux_jni_unittests', | 313 # 'sandbox_linux_jni_unittests', |
| 310 # ], | 314 # ], |
| 311 # 'includes': [ '../../build/apk_test.gypi' ], | 315 # 'includes': [ '../../build/apk_test.gypi' ], |
| 312 # } | 316 # } |
| 313 } | 317 } |
| OLD | NEW |