This source file includes following definitions.
- EvaluateSyscall
- PreSandboxHook
- GetFSDeniedErrno
#include "content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h"
#include <errno.h>
#include "base/logging.h"
#include "sandbox/linux/seccomp-bpf-helpers/baseline_policy.h"
namespace content {
namespace {
static const int kFSDeniedErrno = EPERM;
}
SandboxBPFBasePolicy::SandboxBPFBasePolicy()
: baseline_policy_(new sandbox::BaselinePolicy(kFSDeniedErrno)) {}
SandboxBPFBasePolicy::~SandboxBPFBasePolicy() {}
ErrorCode SandboxBPFBasePolicy::EvaluateSyscall(SandboxBPF* sandbox_compiler,
int system_call_number) const {
DCHECK(baseline_policy_);
return baseline_policy_->EvaluateSyscall(sandbox_compiler,
system_call_number);
}
bool SandboxBPFBasePolicy::PreSandboxHook() {
return true;
}
int SandboxBPFBasePolicy::GetFSDeniedErrno() {
return kFSDeniedErrno;
}
}