| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CONTENT_COMMON_SANDBOX_LINUX_ANDROID_SANDBOX_BPF_BASE_POLICY_ANDROID_H_ | 5 #ifndef CONTENT_COMMON_SANDBOX_LINUX_ANDROID_SANDBOX_BPF_BASE_POLICY_ANDROID_H_ |
| 6 #define CONTENT_COMMON_SANDBOX_LINUX_ANDROID_SANDBOX_BPF_BASE_POLICY_ANDROID_H_ | 6 #define CONTENT_COMMON_SANDBOX_LINUX_ANDROID_SANDBOX_BPF_BASE_POLICY_ANDROID_H_ |
| 7 | 7 |
| 8 #include <sys/types.h> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h" | 11 #include "content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h" |
| 10 | 12 |
| 11 namespace content { | 13 namespace content { |
| 12 | 14 |
| 13 // This class builds on top of the generic Linux baseline policy to reduce | 15 // This class builds on top of the generic Linux baseline policy to reduce |
| 14 // Linux kernel attack surface. It augments the list of allowed syscalls to | 16 // Linux kernel attack surface. It augments the list of allowed syscalls to |
| 15 // allow ones required by the Android runtime. | 17 // allow ones required by the Android runtime. |
| 16 class SandboxBPFBasePolicyAndroid : public SandboxBPFBasePolicy { | 18 class SandboxBPFBasePolicyAndroid : public SandboxBPFBasePolicy { |
| 17 public: | 19 public: |
| 18 SandboxBPFBasePolicyAndroid(); | 20 SandboxBPFBasePolicyAndroid(); |
| 19 ~SandboxBPFBasePolicyAndroid() override; | 21 ~SandboxBPFBasePolicyAndroid() override; |
| 20 | 22 |
| 21 // sandbox::SandboxBPFPolicy: | 23 // sandbox::SandboxBPFPolicy: |
| 22 sandbox::bpf_dsl::ResultExpr EvaluateSyscall( | 24 sandbox::bpf_dsl::ResultExpr EvaluateSyscall( |
| 23 int system_call_number) const override; | 25 int system_call_number) const override; |
| 24 | 26 |
| 25 private: | 27 private: |
| 28 const pid_t pid_; |
| 29 |
| 26 DISALLOW_COPY_AND_ASSIGN(SandboxBPFBasePolicyAndroid); | 30 DISALLOW_COPY_AND_ASSIGN(SandboxBPFBasePolicyAndroid); |
| 27 }; | 31 }; |
| 28 | 32 |
| 29 } // namespace content | 33 } // namespace content |
| 30 | 34 |
| 31 #endif // CONTENT_COMMON_SANDBOX_LINUX_ANDROID_SANDBOX_BPF_BASE_POLICY_ANDROID_
H_ | 35 #endif // CONTENT_COMMON_SANDBOX_LINUX_ANDROID_SANDBOX_BPF_BASE_POLICY_ANDROID_
H_ |
| OLD | NEW |