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

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

Issue 299683004: Rewrite all BPF policies to use DSL API Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Overhaul of DSL and implementation Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: sandbox/linux/seccomp-bpf-helpers/baseline_policy.h
diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.h b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.h
index edf4c77b3c667f530732685009c58aa8fe564425..eb3fd0a392353d6aaec56013af92c707edd43f1a 100644
--- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.h
+++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.h
@@ -5,6 +5,7 @@
#ifndef SANDBOX_LINUX_SECCOMP_BPF_HELPERS_BASELINE_POLICY_H_
#define SANDBOX_LINUX_SECCOMP_BPF_HELPERS_BASELINE_POLICY_H_
+#include "sandbox/linux/seccomp-bpf-helpers/bpf_dsl.h"
#include "sandbox/linux/seccomp-bpf/errorcode.h"
#include "sandbox/linux/seccomp-bpf/sandbox_bpf_policy.h"
#include "sandbox/sandbox_export.h"
@@ -25,7 +26,7 @@ class SandboxBPFPolicy;
// code in a sandboxed environment.
// A baseline policy is only valid for the process for which this object was
// instantiated (so do not fork() and use it in a child).
-class SANDBOX_EXPORT BaselinePolicy : public SandboxBPFPolicy {
+class SANDBOX_EXPORT BaselinePolicy : public bpf_dsl::SandboxBPFPolicyDSL {
public:
BaselinePolicy();
// |fs_denied_errno| is the errno returned when a filesystem access system
@@ -33,8 +34,9 @@ class SANDBOX_EXPORT BaselinePolicy : public SandboxBPFPolicy {
explicit BaselinePolicy(int fs_denied_errno);
virtual ~BaselinePolicy();
- virtual ErrorCode EvaluateSyscall(SandboxBPF* sandbox_compiler,
- int system_call_number) const OVERRIDE;
+ using bpf_dsl::SandboxBPFPolicyDSL::EvaluateSyscall;
+ virtual bpf_dsl::ResultExpr EvaluateSyscall(
+ int system_call_number) const OVERRIDE;
private:
int fs_denied_errno_;
« no previous file with comments | « content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc ('k') | sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698