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

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

Issue 598203004: Linux sandbox: Restrict sched_* syscalls on the GPU and ppapi processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename to policy_pid, add SANDBOX_EXPORT. Created 6 years, 2 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 #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
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 pid_t policy_pid() const { return policy_pid_; }
35 36
36 private: 37 private:
37 int fs_denied_errno_; 38 int fs_denied_errno_;
38 pid_t current_pid_; 39
40 // The PID that the policy applies to (should be equal to the current pid).
41 pid_t policy_pid_;
42
39 DISALLOW_COPY_AND_ASSIGN(BaselinePolicy); 43 DISALLOW_COPY_AND_ASSIGN(BaselinePolicy);
40 }; 44 };
41 45
42 } // namespace sandbox. 46 } // namespace sandbox.
43 47
44 #endif // SANDBOX_LINUX_SECCOMP_BPF_HELPERS_BASELINE_POLICY_H_ 48 #endif // SANDBOX_LINUX_SECCOMP_BPF_HELPERS_BASELINE_POLICY_H_
OLDNEW
« no previous file with comments | « content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h ('k') | sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698