| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/nacl/nacl_sandbox_linux.h" | 5 #include "components/nacl/loader/nacl_sandbox_linux.h" |
| 6 | 6 |
| 7 #include <signal.h> | 7 #include <signal.h> |
| 8 #include <sys/ptrace.h> | 8 #include <sys/ptrace.h> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "content/public/common/sandbox_init.h" | 14 #include "content/public/common/sandbox_init.h" |
| 15 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" | 15 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 RunSandboxSanityChecks(); | 144 RunSandboxSanityChecks(); |
| 145 // TODO(jln): Find a way to fix this. | 145 // TODO(jln): Find a way to fix this. |
| 146 // The sandbox' SIGSYS handler trips NaCl, so we disable it. | 146 // The sandbox' SIGSYS handler trips NaCl, so we disable it. |
| 147 // If SIGSYS is triggered it'll now execute the default action | 147 // If SIGSYS is triggered it'll now execute the default action |
| 148 // (CORE). This will make it hard to track down bugs and sandbox violations. | 148 // (CORE). This will make it hard to track down bugs and sandbox violations. |
| 149 CHECK(signal(SIGSYS, SIG_DFL) != SIG_ERR); | 149 CHECK(signal(SIGSYS, SIG_DFL) != SIG_ERR); |
| 150 return true; | 150 return true; |
| 151 } | 151 } |
| 152 return false; | 152 return false; |
| 153 } | 153 } |
| OLD | NEW |