| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.h" | 5 #include "components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.h" |
| 6 | 6 |
| 7 #include "base/macros.h" |
| 7 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 8 | 9 |
| 9 #if defined(USE_SECCOMP_BPF) | 10 #if defined(USE_SECCOMP_BPF) |
| 10 | 11 |
| 11 #include <errno.h> | 12 #include <errno.h> |
| 12 #include <signal.h> | 13 #include <signal.h> |
| 13 #include <sys/ptrace.h> | 14 #include <sys/ptrace.h> |
| 14 #include <sys/types.h> | 15 #include <sys/types.h> |
| 15 #include <unistd.h> | 16 #include <unistd.h> |
| 16 | 17 |
| 17 #include "base/basictypes.h" | |
| 18 #include "base/callback.h" | 18 #include "base/callback.h" |
| 19 #include "base/command_line.h" | 19 #include "base/command_line.h" |
| 20 #include "base/compiler_specific.h" | 20 #include "base/compiler_specific.h" |
| 21 #include "base/files/scoped_file.h" | 21 #include "base/files/scoped_file.h" |
| 22 #include "base/logging.h" | 22 #include "base/logging.h" |
| 23 | 23 |
| 24 #include "components/nacl/common/nacl_switches.h" | 24 #include "components/nacl/common/nacl_switches.h" |
| 25 #include "content/public/common/sandbox_init.h" | 25 #include "content/public/common/sandbox_init.h" |
| 26 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" | 26 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" |
| 27 #include "sandbox/linux/bpf_dsl/policy.h" | 27 #include "sandbox/linux/bpf_dsl/policy.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 proc_fd.Pass()); | 169 proc_fd.Pass()); |
| 170 if (sandbox_is_initialized) { | 170 if (sandbox_is_initialized) { |
| 171 RunSandboxSanityChecks(); | 171 RunSandboxSanityChecks(); |
| 172 return true; | 172 return true; |
| 173 } | 173 } |
| 174 #endif // defined(USE_SECCOMP_BPF) | 174 #endif // defined(USE_SECCOMP_BPF) |
| 175 return false; | 175 return false; |
| 176 } | 176 } |
| 177 | 177 |
| 178 } // namespace nacl | 178 } // namespace nacl |
| OLD | NEW |