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