| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "content/common/sandbox_linux/bpf_renderer_policy_linux.h" | 5 #include "content/common/sandbox_linux/bpf_renderer_policy_linux.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "content/common/sandbox_linux/sandbox_linux.h" | 11 #include "content/common/sandbox_linux/sandbox_linux.h" |
| 12 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" | 12 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" |
| 13 #include "sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h" | 13 #include "sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h" |
| 14 #include "sandbox/linux/seccomp-bpf-helpers/syscall_sets.h" | 14 #include "sandbox/linux/seccomp-bpf-helpers/syscall_sets.h" |
| 15 #include "sandbox/linux/services/linux_syscalls.h" | 15 #include "sandbox/linux/system_headers/linux_syscalls.h" |
| 16 | 16 |
| 17 using sandbox::SyscallSets; | 17 using sandbox::SyscallSets; |
| 18 using sandbox::bpf_dsl::Allow; | 18 using sandbox::bpf_dsl::Allow; |
| 19 using sandbox::bpf_dsl::Error; | 19 using sandbox::bpf_dsl::Error; |
| 20 using sandbox::bpf_dsl::ResultExpr; | 20 using sandbox::bpf_dsl::ResultExpr; |
| 21 | 21 |
| 22 namespace content { | 22 namespace content { |
| 23 | 23 |
| 24 RendererProcessPolicy::RendererProcessPolicy() {} | 24 RendererProcessPolicy::RendererProcessPolicy() {} |
| 25 RendererProcessPolicy::~RendererProcessPolicy() {} | 25 RendererProcessPolicy::~RendererProcessPolicy() {} |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 return sandbox::RestrictSchedTarget(GetPolicyPid(), sysno); | 57 return sandbox::RestrictSchedTarget(GetPolicyPid(), sysno); |
| 58 case __NR_prlimit64: | 58 case __NR_prlimit64: |
| 59 return Error(EPERM); // See crbug.com/160157. | 59 return Error(EPERM); // See crbug.com/160157. |
| 60 default: | 60 default: |
| 61 // Default on the content baseline policy. | 61 // Default on the content baseline policy. |
| 62 return SandboxBPFBasePolicy::EvaluateSyscall(sysno); | 62 return SandboxBPFBasePolicy::EvaluateSyscall(sysno); |
| 63 } | 63 } |
| 64 } | 64 } |
| 65 | 65 |
| 66 } // namespace content | 66 } // namespace content |
| OLD | NEW |