| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <errno.h> | 5 #include <errno.h> |
| 6 #include <fcntl.h> | 6 #include <fcntl.h> |
| 7 #include <pthread.h> | 7 #include <pthread.h> |
| 8 #include <sched.h> | 8 #include <sched.h> |
| 9 #include <signal.h> | 9 #include <signal.h> |
| 10 #include <sys/prctl.h> | 10 #include <sys/prctl.h> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "base/bind.h" | 25 #include "base/bind.h" |
| 26 #include "base/logging.h" | 26 #include "base/logging.h" |
| 27 #include "base/macros.h" | 27 #include "base/macros.h" |
| 28 #include "base/memory/scoped_ptr.h" | 28 #include "base/memory/scoped_ptr.h" |
| 29 #include "base/posix/eintr_wrapper.h" | 29 #include "base/posix/eintr_wrapper.h" |
| 30 #include "base/synchronization/waitable_event.h" | 30 #include "base/synchronization/waitable_event.h" |
| 31 #include "base/sys_info.h" | 31 #include "base/sys_info.h" |
| 32 #include "base/threading/thread.h" | 32 #include "base/threading/thread.h" |
| 33 #include "build/build_config.h" | 33 #include "build/build_config.h" |
| 34 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" | 34 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" |
| 35 #include "sandbox/linux/bpf_dsl/errorcode.h" |
| 35 #include "sandbox/linux/bpf_dsl/linux_syscall_ranges.h" | 36 #include "sandbox/linux/bpf_dsl/linux_syscall_ranges.h" |
| 36 #include "sandbox/linux/bpf_dsl/policy.h" | 37 #include "sandbox/linux/bpf_dsl/policy.h" |
| 37 #include "sandbox/linux/bpf_dsl/seccomp_macros.h" | 38 #include "sandbox/linux/bpf_dsl/seccomp_macros.h" |
| 38 #include "sandbox/linux/seccomp-bpf/bpf_tests.h" | 39 #include "sandbox/linux/seccomp-bpf/bpf_tests.h" |
| 39 #include "sandbox/linux/seccomp-bpf/die.h" | 40 #include "sandbox/linux/seccomp-bpf/die.h" |
| 40 #include "sandbox/linux/seccomp-bpf/errorcode.h" | |
| 41 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" | 41 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" |
| 42 #include "sandbox/linux/seccomp-bpf/syscall.h" | 42 #include "sandbox/linux/seccomp-bpf/syscall.h" |
| 43 #include "sandbox/linux/seccomp-bpf/trap.h" | 43 #include "sandbox/linux/seccomp-bpf/trap.h" |
| 44 #include "sandbox/linux/services/syscall_wrappers.h" | 44 #include "sandbox/linux/services/syscall_wrappers.h" |
| 45 #include "sandbox/linux/services/thread_helpers.h" | 45 #include "sandbox/linux/services/thread_helpers.h" |
| 46 #include "sandbox/linux/system_headers/linux_syscalls.h" | 46 #include "sandbox/linux/system_headers/linux_syscalls.h" |
| 47 #include "sandbox/linux/tests/scoped_temporary_file.h" | 47 #include "sandbox/linux/tests/scoped_temporary_file.h" |
| 48 #include "sandbox/linux/tests/unit_tests.h" | 48 #include "sandbox/linux/tests/unit_tests.h" |
| 49 #include "testing/gtest/include/gtest/gtest.h" | 49 #include "testing/gtest/include/gtest/gtest.h" |
| 50 | 50 |
| (...skipping 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2250 BPF_ASSERT_EQ(ENOSYS, errno); | 2250 BPF_ASSERT_EQ(ENOSYS, errno); |
| 2251 | 2251 |
| 2252 BPF_ASSERT_EQ(-1, syscall(__NR_setgid, 300)); | 2252 BPF_ASSERT_EQ(-1, syscall(__NR_setgid, 300)); |
| 2253 BPF_ASSERT_EQ(EPERM, errno); | 2253 BPF_ASSERT_EQ(EPERM, errno); |
| 2254 } | 2254 } |
| 2255 | 2255 |
| 2256 } // namespace | 2256 } // namespace |
| 2257 | 2257 |
| 2258 } // namespace bpf_dsl | 2258 } // namespace bpf_dsl |
| 2259 } // namespace sandbox | 2259 } // namespace sandbox |
| OLD | NEW |