Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698