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

Side by Side Diff: content/common/sandbox_linux/sandbox_bpf_base_policy_linux.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 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 #ifndef CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_BPF_BASE_POLICY_LINUX_H_ 5 #ifndef CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_BPF_BASE_POLICY_LINUX_H_
6 #define CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_BPF_BASE_POLICY_LINUX_H_ 6 #define CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_BPF_BASE_POLICY_LINUX_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" 10 #include "sandbox/linux/bpf_dsl/bpf_dsl.h"
(...skipping 18 matching lines...) Expand all
29 // is passed to the BPF compiler and the sandbox is engaged. 29 // is passed to the BPF compiler and the sandbox is engaged.
30 // If PreSandboxHook() returns true, the sandbox is guaranteed to be 30 // If PreSandboxHook() returns true, the sandbox is guaranteed to be
31 // engaged afterwards. 31 // engaged afterwards.
32 // This will be used when enabling the sandbox though 32 // This will be used when enabling the sandbox though
33 // SandboxSeccompBPF::StartSandbox(). 33 // SandboxSeccompBPF::StartSandbox().
34 virtual bool PreSandboxHook(); 34 virtual bool PreSandboxHook();
35 35
36 // Get the errno(3) to return for filesystem errors. 36 // Get the errno(3) to return for filesystem errors.
37 static int GetFSDeniedErrno(); 37 static int GetFSDeniedErrno();
38 38
39 pid_t GetPolicyPid() const { return baseline_policy_->policy_pid(); }
40
39 private: 41 private:
40 // Compose the BaselinePolicy from sandbox/. 42 // Compose the BaselinePolicy from sandbox/.
41 scoped_ptr<sandbox::BaselinePolicy> baseline_policy_; 43 scoped_ptr<sandbox::BaselinePolicy> baseline_policy_;
42 DISALLOW_COPY_AND_ASSIGN(SandboxBPFBasePolicy); 44 DISALLOW_COPY_AND_ASSIGN(SandboxBPFBasePolicy);
43 }; 45 };
44 46
45 } // namespace content 47 } // namespace content
46 48
47 #endif // CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_BPF_BASE_POLICY_LINUX_H_ 49 #endif // CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_BPF_BASE_POLICY_LINUX_H_
OLDNEW
« no previous file with comments | « content/common/sandbox_linux/bpf_ppapi_policy_linux.cc ('k') | sandbox/linux/seccomp-bpf-helpers/baseline_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698