| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/seccomp-bpf-helpers/syscall_parameters_restrictions.h" | 5 #include "sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #include <fcntl.h> | 9 #include <fcntl.h> |
| 10 #include <linux/net.h> | 10 #include <linux/net.h> |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 | 300 |
| 301 ResultExpr RestrictClockID() { | 301 ResultExpr RestrictClockID() { |
| 302 static_assert(4 == sizeof(clockid_t), "clockid_t is not 32bit"); | 302 static_assert(4 == sizeof(clockid_t), "clockid_t is not 32bit"); |
| 303 const Arg<clockid_t> clockid(0); | 303 const Arg<clockid_t> clockid(0); |
| 304 return If( | 304 return If( |
| 305 #if defined(OS_CHROMEOS) | 305 #if defined(OS_CHROMEOS) |
| 306 // Allow the special clock for Chrome OS used by Chrome tracing. | 306 // Allow the special clock for Chrome OS used by Chrome tracing. |
| 307 clockid == base::TimeTicks::kClockSystemTrace || | 307 clockid == base::TimeTicks::kClockSystemTrace || |
| 308 #endif | 308 #endif |
| 309 clockid == CLOCK_MONOTONIC || | 309 clockid == CLOCK_MONOTONIC || |
| 310 clockid == CLOCK_MONOTONIC_COARSE || |
| 310 clockid == CLOCK_PROCESS_CPUTIME_ID || | 311 clockid == CLOCK_PROCESS_CPUTIME_ID || |
| 311 clockid == CLOCK_REALTIME || | 312 clockid == CLOCK_REALTIME || |
| 313 clockid == CLOCK_REALTIME_COARSE || |
| 312 clockid == CLOCK_THREAD_CPUTIME_ID, | 314 clockid == CLOCK_THREAD_CPUTIME_ID, |
| 313 Allow()).Else(CrashSIGSYS()); | 315 Allow()).Else(CrashSIGSYS()); |
| 314 } | 316 } |
| 315 | 317 |
| 316 } // namespace sandbox. | 318 } // namespace sandbox. |
| OLD | NEW |