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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 return If(who == RUSAGE_SELF, Allow()).Else(CrashSIGSYS()); | 298 return If(who == RUSAGE_SELF, Allow()).Else(CrashSIGSYS()); |
299 } | 299 } |
300 #endif // !defined(OS_NACL_NONSFI) | 300 #endif // !defined(OS_NACL_NONSFI) |
301 | 301 |
302 ResultExpr RestrictClockID() { | 302 ResultExpr RestrictClockID() { |
303 static_assert(4 == sizeof(clockid_t), "clockid_t is not 32bit"); | 303 static_assert(4 == sizeof(clockid_t), "clockid_t is not 32bit"); |
304 const Arg<clockid_t> clockid(0); | 304 const Arg<clockid_t> clockid(0); |
305 return If( | 305 return If( |
306 #if defined(OS_CHROMEOS) | 306 #if defined(OS_CHROMEOS) |
307 // Allow the special clock for Chrome OS used by Chrome tracing. | 307 // Allow the special clock for Chrome OS used by Chrome tracing. |
308 clockid == base::TimeTicks::kClockSystemTrace || | 308 clockid == base::TraceTicks::kClockSystemTrace || |
309 #endif | 309 #endif |
310 clockid == CLOCK_MONOTONIC || | 310 clockid == CLOCK_MONOTONIC || |
311 clockid == CLOCK_MONOTONIC_COARSE || | 311 clockid == CLOCK_MONOTONIC_COARSE || |
312 clockid == CLOCK_PROCESS_CPUTIME_ID || | 312 clockid == CLOCK_PROCESS_CPUTIME_ID || |
313 clockid == CLOCK_REALTIME || | 313 clockid == CLOCK_REALTIME || |
314 clockid == CLOCK_REALTIME_COARSE || | 314 clockid == CLOCK_REALTIME_COARSE || |
315 clockid == CLOCK_THREAD_CPUTIME_ID, | 315 clockid == CLOCK_THREAD_CPUTIME_ID, |
316 Allow()).Else(CrashSIGSYS()); | 316 Allow()).Else(CrashSIGSYS()); |
317 } | 317 } |
318 | 318 |
319 } // namespace sandbox. | 319 } // namespace sandbox. |
OLD | NEW |