| 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> | |
| 11 #include <stdint.h> | |
| 12 #include <sys/prctl.h> | 10 #include <sys/prctl.h> |
| 13 #include <sys/ptrace.h> | 11 #include <sys/ptrace.h> |
| 14 #include <sys/socket.h> | |
| 15 #include <sys/syscall.h> | 12 #include <sys/syscall.h> |
| 16 #include <sys/time.h> | 13 #include <sys/time.h> |
| 17 #include <sys/types.h> | 14 #include <sys/types.h> |
| 18 #include <sys/utsname.h> | 15 #include <sys/utsname.h> |
| 19 #include <unistd.h> | 16 #include <unistd.h> |
| 17 #include <sys/socket.h> |
| 20 | 18 |
| 21 #if defined(ANDROID) | 19 #if defined(ANDROID) |
| 22 // Work-around for buggy headers in Android's NDK | 20 // Work-around for buggy headers in Android's NDK |
| 23 #define __user | 21 #define __user |
| 24 #endif | 22 #endif |
| 25 #include <linux/futex.h> | 23 #include <linux/futex.h> |
| 26 | 24 |
| 27 #include "base/bind.h" | 25 #include "base/bind.h" |
| 28 #include "base/logging.h" | 26 #include "base/logging.h" |
| 29 #include "base/macros.h" | 27 #include "base/macros.h" |
| (...skipping 2226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2256 BPF_ASSERT_EQ(ENOSYS, errno); | 2254 BPF_ASSERT_EQ(ENOSYS, errno); |
| 2257 | 2255 |
| 2258 BPF_ASSERT_EQ(-1, syscall(__NR_setgid, 300)); | 2256 BPF_ASSERT_EQ(-1, syscall(__NR_setgid, 300)); |
| 2259 BPF_ASSERT_EQ(EPERM, errno); | 2257 BPF_ASSERT_EQ(EPERM, errno); |
| 2260 } | 2258 } |
| 2261 | 2259 |
| 2262 } // namespace | 2260 } // namespace |
| 2263 | 2261 |
| 2264 } // namespace bpf_dsl | 2262 } // namespace bpf_dsl |
| 2265 } // namespace sandbox | 2263 } // namespace sandbox |
| OLD | NEW |