| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "sandbox/linux/seccomp-bpf/sandbox_bpf.h" | 5 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <stdint.h> |
| 8 #include <sys/prctl.h> | 9 #include <sys/prctl.h> |
| 9 #include <sys/types.h> | 10 #include <sys/types.h> |
| 10 #include <unistd.h> | 11 #include <unistd.h> |
| 11 | 12 |
| 12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 13 #include "base/files/scoped_file.h" | 14 #include "base/files/scoped_file.h" |
| 14 #include "base/logging.h" | 15 #include "base/logging.h" |
| 15 #include "base/macros.h" | 16 #include "base/macros.h" |
| 16 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/posix/eintr_wrapper.h" | 18 #include "base/posix/eintr_wrapper.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 } else { | 271 } else { |
| 271 if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog)) { | 272 if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog)) { |
| 272 SANDBOX_DIE("Kernel refuses to turn on BPF filters"); | 273 SANDBOX_DIE("Kernel refuses to turn on BPF filters"); |
| 273 } | 274 } |
| 274 } | 275 } |
| 275 | 276 |
| 276 sandbox_has_started_ = true; | 277 sandbox_has_started_ = true; |
| 277 } | 278 } |
| 278 | 279 |
| 279 } // namespace sandbox | 280 } // namespace sandbox |
| OLD | NEW |