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 #ifndef SANDBOX_LINUX_SECCOMP_BPF_HELPERS_BASELINE_POLICY_H_ | 5 #ifndef SANDBOX_LINUX_SECCOMP_BPF_HELPERS_BASELINE_POLICY_H_ |
6 #define SANDBOX_LINUX_SECCOMP_BPF_HELPERS_BASELINE_POLICY_H_ | 6 #define SANDBOX_LINUX_SECCOMP_BPF_HELPERS_BASELINE_POLICY_H_ |
7 | 7 |
8 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" | 8 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" |
9 #include "sandbox/sandbox_export.h" | 9 #include "sandbox/sandbox_export.h" |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... | |
25 public: | 25 public: |
26 BaselinePolicy(); | 26 BaselinePolicy(); |
27 // |fs_denied_errno| is the errno returned when a filesystem access system | 27 // |fs_denied_errno| is the errno returned when a filesystem access system |
28 // call is denied. | 28 // call is denied. |
29 explicit BaselinePolicy(int fs_denied_errno); | 29 explicit BaselinePolicy(int fs_denied_errno); |
30 virtual ~BaselinePolicy(); | 30 virtual ~BaselinePolicy(); |
31 | 31 |
32 virtual bpf_dsl::ResultExpr EvaluateSyscall( | 32 virtual bpf_dsl::ResultExpr EvaluateSyscall( |
33 int system_call_number) const OVERRIDE; | 33 int system_call_number) const OVERRIDE; |
34 virtual bpf_dsl::ResultExpr InvalidSyscall() const OVERRIDE; | 34 virtual bpf_dsl::ResultExpr InvalidSyscall() const OVERRIDE; |
35 // Returns the pid of the process being sandboxed. | |
36 pid_t GetCurrentPid() const; | |
jln (very slow on Chromium)
2014/09/22 21:56:44
As per style-guide, this can just be current_pid()
rickyz (no longer on Chrome)
2014/09/23 06:03:20
Good to know, removed this for now and will reintr
| |
35 | 37 |
36 private: | 38 private: |
37 int fs_denied_errno_; | 39 int fs_denied_errno_; |
38 pid_t current_pid_; | 40 pid_t current_pid_; |
39 DISALLOW_COPY_AND_ASSIGN(BaselinePolicy); | 41 DISALLOW_COPY_AND_ASSIGN(BaselinePolicy); |
40 }; | 42 }; |
41 | 43 |
42 } // namespace sandbox. | 44 } // namespace sandbox. |
43 | 45 |
44 #endif // SANDBOX_LINUX_SECCOMP_BPF_HELPERS_BASELINE_POLICY_H_ | 46 #endif // SANDBOX_LINUX_SECCOMP_BPF_HELPERS_BASELINE_POLICY_H_ |
OLD | NEW |