| 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/futex.h> | 10 #include <linux/futex.h> |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 const Arg<pid_t> pid(0); | 279 const Arg<pid_t> pid(0); |
| 280 return If(pid == 0 || pid == target_pid, Allow()) | 280 return If(pid == 0 || pid == target_pid, Allow()) |
| 281 .Else(RewriteSchedSIGSYS()); | 281 .Else(RewriteSchedSIGSYS()); |
| 282 } | 282 } |
| 283 default: | 283 default: |
| 284 NOTREACHED(); | 284 NOTREACHED(); |
| 285 return CrashSIGSYS(); | 285 return CrashSIGSYS(); |
| 286 } | 286 } |
| 287 } | 287 } |
| 288 | 288 |
| 289 ResultExpr RestrictPrlimit64(pid_t target_pid) { |
| 290 const Arg<pid_t> pid(0); |
| 291 return If(pid == 0 || pid == target_pid, Allow()).Else(CrashSIGSYS()); |
| 292 } |
| 289 | 293 |
| 290 } // namespace sandbox. | 294 } // namespace sandbox. |
| OLD | NEW |