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 <stddef.h> | 10 #include <stddef.h> |
11 #include <stdint.h> | 11 #include <stdint.h> |
12 #include <sys/prctl.h> | 12 #include <sys/prctl.h> |
13 #include <sys/ptrace.h> | 13 #include <sys/ptrace.h> |
14 #include <sys/socket.h> | 14 #include <sys/socket.h> |
15 #include <sys/syscall.h> | 15 #include <sys/syscall.h> |
16 #include <sys/time.h> | 16 #include <sys/time.h> |
17 #include <sys/types.h> | 17 #include <sys/types.h> |
18 #include <sys/utsname.h> | 18 #include <sys/utsname.h> |
19 #include <unistd.h> | 19 #include <unistd.h> |
20 | 20 |
21 #if defined(ANDROID) | 21 #if defined(ANDROID) |
22 // Work-around for buggy headers in Android's NDK | 22 // Work-around for buggy headers in Android's NDK |
23 #define __user | 23 #define __user |
24 #endif | 24 #endif |
25 #include <linux/futex.h> | 25 #include <linux/futex.h> |
26 | 26 |
27 #include "base/bind.h" | 27 #include "base/bind.h" |
28 #include "base/logging.h" | 28 #include "base/logging.h" |
29 #include "base/macros.h" | 29 #include "base/macros.h" |
30 #include "base/memory/scoped_ptr.h" | |
31 #include "base/posix/eintr_wrapper.h" | 30 #include "base/posix/eintr_wrapper.h" |
32 #include "base/synchronization/waitable_event.h" | 31 #include "base/synchronization/waitable_event.h" |
33 #include "base/sys_info.h" | 32 #include "base/sys_info.h" |
34 #include "base/threading/thread.h" | 33 #include "base/threading/thread.h" |
35 #include "build/build_config.h" | 34 #include "build/build_config.h" |
36 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" | 35 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" |
37 #include "sandbox/linux/bpf_dsl/errorcode.h" | 36 #include "sandbox/linux/bpf_dsl/errorcode.h" |
38 #include "sandbox/linux/bpf_dsl/linux_syscall_ranges.h" | 37 #include "sandbox/linux/bpf_dsl/linux_syscall_ranges.h" |
39 #include "sandbox/linux/bpf_dsl/policy.h" | 38 #include "sandbox/linux/bpf_dsl/policy.h" |
40 #include "sandbox/linux/bpf_dsl/seccomp_macros.h" | 39 #include "sandbox/linux/bpf_dsl/seccomp_macros.h" |
(...skipping 2215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2256 BPF_ASSERT_EQ(ENOSYS, errno); | 2255 BPF_ASSERT_EQ(ENOSYS, errno); |
2257 | 2256 |
2258 BPF_ASSERT_EQ(-1, syscall(__NR_setgid, 300)); | 2257 BPF_ASSERT_EQ(-1, syscall(__NR_setgid, 300)); |
2259 BPF_ASSERT_EQ(EPERM, errno); | 2258 BPF_ASSERT_EQ(EPERM, errno); |
2260 } | 2259 } |
2261 | 2260 |
2262 } // namespace | 2261 } // namespace |
2263 | 2262 |
2264 } // namespace bpf_dsl | 2263 } // namespace bpf_dsl |
2265 } // namespace sandbox | 2264 } // namespace sandbox |
OLD | NEW |