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

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

Issue 590213003: Linux sandbox: Allow restricting sched_* on other processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/baseline_policy.h" 5 #include "sandbox/linux/seccomp-bpf-helpers/baseline_policy.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <sys/mman.h> 8 #include <sys/mman.h>
9 #include <sys/socket.h> 9 #include <sys/socket.h>
10 #include <sys/syscall.h> 10 #include <sys/syscall.h>
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 if (1 == sysno) { 253 if (1 == sysno) {
254 DCHECK_EQ(syscall(__NR_getpid), current_pid_); 254 DCHECK_EQ(syscall(__NR_getpid), current_pid_);
255 } 255 }
256 return EvaluateSyscallImpl(fs_denied_errno_, current_pid_, sysno); 256 return EvaluateSyscallImpl(fs_denied_errno_, current_pid_, sysno);
257 } 257 }
258 258
259 ResultExpr BaselinePolicy::InvalidSyscall() const { 259 ResultExpr BaselinePolicy::InvalidSyscall() const {
260 return CrashSIGSYS(); 260 return CrashSIGSYS();
261 } 261 }
262 262
263 pid_t BaselinePolicy::GetCurrentPid() const {
264 return current_pid_;
265 }
266
263 } // namespace sandbox. 267 } // namespace sandbox.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698