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

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

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 months 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 NOTREACHED(); 297 NOTREACHED();
298 return CrashSIGSYS(); 298 return CrashSIGSYS();
299 } 299 }
300 } 300 }
301 301
302 ResultExpr RestrictPrlimit64(pid_t target_pid) { 302 ResultExpr RestrictPrlimit64(pid_t target_pid) {
303 const Arg<pid_t> pid(0); 303 const Arg<pid_t> pid(0);
304 return If(pid == 0 || pid == target_pid, Allow()).Else(CrashSIGSYS()); 304 return If(pid == 0 || pid == target_pid, Allow()).Else(CrashSIGSYS());
305 } 305 }
306 306
307 ResultExpr RestrictGetrusage() {
308 const Arg<int> who(0);
309 return If(who == RUSAGE_SELF, Allow()).Else(CrashSIGSYS());
310 }
311
307 } // namespace sandbox. 312 } // namespace sandbox.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698