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 "content/public/common/sandbox_init.h" | 13 #include "content/public/common/sandbox_init.h" |
14 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" | 14 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" |
15 #include "sandbox/linux/services/linux_syscalls.h" | 15 #include "sandbox/linux/services/linux_syscalls.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 if (sandbox_is_initialized) { | 63 if (sandbox_is_initialized) { |
64 // TODO(jln): Find a way to fix this. | 64 // TODO(jln): Find a way to fix this. |
65 // The sandbox' SIGSYS handler trips NaCl, so we disable it. | 65 // The sandbox' SIGSYS handler trips NaCl, so we disable it. |
66 // If SIGSYS is triggered it'll now execute the default action | 66 // If SIGSYS is triggered it'll now execute the default action |
67 // (CORE). This will make it hard to track down bugs and sandbox violations. | 67 // (CORE). This will make it hard to track down bugs and sandbox violations. |
68 CHECK(signal(SIGSYS, SIG_DFL) != SIG_ERR); | 68 CHECK(signal(SIGSYS, SIG_DFL) != SIG_ERR); |
69 return true; | 69 return true; |
70 } | 70 } |
71 return false; | 71 return false; |
72 } | 72 } |
OLD | NEW |