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/bpf_dsl/bpf_dsl.h" | 5 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <pthread.h> | 9 #include <pthread.h> |
10 #include <sched.h> | 10 #include <sched.h> |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "base/threading/thread.h" | 33 #include "base/threading/thread.h" |
34 #include "build/build_config.h" | 34 #include "build/build_config.h" |
35 #include "sandbox/linux/bpf_dsl/policy.h" | 35 #include "sandbox/linux/bpf_dsl/policy.h" |
36 #include "sandbox/linux/seccomp-bpf/bpf_tests.h" | 36 #include "sandbox/linux/seccomp-bpf/bpf_tests.h" |
37 #include "sandbox/linux/seccomp-bpf/die.h" | 37 #include "sandbox/linux/seccomp-bpf/die.h" |
38 #include "sandbox/linux/seccomp-bpf/errorcode.h" | 38 #include "sandbox/linux/seccomp-bpf/errorcode.h" |
39 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h" | 39 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h" |
40 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" | 40 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" |
41 #include "sandbox/linux/seccomp-bpf/syscall.h" | 41 #include "sandbox/linux/seccomp-bpf/syscall.h" |
42 #include "sandbox/linux/seccomp-bpf/trap.h" | 42 #include "sandbox/linux/seccomp-bpf/trap.h" |
43 #include "sandbox/linux/services/broker_process.h" | |
44 #include "sandbox/linux/services/linux_syscalls.h" | 43 #include "sandbox/linux/services/linux_syscalls.h" |
| 44 #include "sandbox/linux/syscall_broker/broker_process.h" |
45 #include "sandbox/linux/tests/scoped_temporary_file.h" | 45 #include "sandbox/linux/tests/scoped_temporary_file.h" |
46 #include "sandbox/linux/tests/unit_tests.h" | 46 #include "sandbox/linux/tests/unit_tests.h" |
47 #include "testing/gtest/include/gtest/gtest.h" | 47 #include "testing/gtest/include/gtest/gtest.h" |
48 | 48 |
49 // Workaround for Android's prctl.h file. | 49 // Workaround for Android's prctl.h file. |
50 #ifndef PR_GET_ENDIAN | 50 #ifndef PR_GET_ENDIAN |
51 #define PR_GET_ENDIAN 19 | 51 #define PR_GET_ENDIAN 19 |
52 #endif | 52 #endif |
53 #ifndef PR_CAPBSET_READ | 53 #ifndef PR_CAPBSET_READ |
54 #define PR_CAPBSET_READ 23 | 54 #define PR_CAPBSET_READ 23 |
(...skipping 2335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2390 BPF_ASSERT_EQ(ENOSYS, errno); | 2390 BPF_ASSERT_EQ(ENOSYS, errno); |
2391 | 2391 |
2392 BPF_ASSERT_EQ(-1, syscall(__NR_setgid, 300)); | 2392 BPF_ASSERT_EQ(-1, syscall(__NR_setgid, 300)); |
2393 BPF_ASSERT_EQ(EPERM, errno); | 2393 BPF_ASSERT_EQ(EPERM, errno); |
2394 } | 2394 } |
2395 | 2395 |
2396 } // namespace | 2396 } // namespace |
2397 | 2397 |
2398 } // namespace bpf_dsl | 2398 } // namespace bpf_dsl |
2399 } // namespace sandbox | 2399 } // namespace sandbox |
OLD | NEW |