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

Side by Side Diff: content/common/sandbox_bpf_base_policy_linux.cc

Issue 99133015: Linux Sandbox: split the GPU policies to their own file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nits from Mark. Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « content/common/sandbox_bpf_base_policy_linux.h ('k') | content/common/sandbox_init_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/common/sandbox_bpf_base_policy_linux.h"
6
7 #include <errno.h>
8
9 #include "base/logging.h"
10 #include "sandbox/linux/seccomp-bpf-helpers/baseline_policy.h"
11
12 namespace content {
13
14 namespace {
15
16 // The errno used for denied file system access system calls, such as open(2).
17 static const int kFSDeniedErrno = EPERM;
18
19 } // namespace.
20
21 SandboxBPFBasePolicy::SandboxBPFBasePolicy()
22 : baseline_policy_(new sandbox::BaselinePolicy(kFSDeniedErrno)) {}
23 SandboxBPFBasePolicy::~SandboxBPFBasePolicy() {}
24
25 ErrorCode SandboxBPFBasePolicy::EvaluateSyscall(SandboxBPF* sandbox_compiler,
26 int system_call_number) const {
27 DCHECK(baseline_policy_);
28 return baseline_policy_->EvaluateSyscall(sandbox_compiler,
29 system_call_number);
30 }
31
32 int SandboxBPFBasePolicy::GetFSDeniedErrno() {
33 return kFSDeniedErrno;
34 }
35
36 } // namespace content.
OLDNEW
« no previous file with comments | « content/common/sandbox_bpf_base_policy_linux.h ('k') | content/common/sandbox_init_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698