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/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 Loading... |
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. |
OLD | NEW |