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

Unified Diff: sandbox/linux/seccomp-bpf/sandbox_bpf_test_runner.cc

Issue 759473002: Linux sandbox: change seccomp detection and initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor_startsandbox
Patch Set: Created 6 years, 1 month 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/sandbox_bpf_test_runner.cc
diff --git a/sandbox/linux/seccomp-bpf/sandbox_bpf_test_runner.cc b/sandbox/linux/seccomp-bpf/sandbox_bpf_test_runner.cc
index cfdb69f5a6b1148c5e5a87480026b418577c5b5c..dc720aa10366e5620ba15c68e92c26f11701d850 100644
--- a/sandbox/linux/seccomp-bpf/sandbox_bpf_test_runner.cc
+++ b/sandbox/linux/seccomp-bpf/sandbox_bpf_test_runner.cc
@@ -31,13 +31,13 @@ void SandboxBPFTestRunner::Run() {
scoped_ptr<bpf_dsl::Policy> policy =
bpf_tester_delegate_->GetSandboxBPFPolicy();
- if (sandbox::SandboxBPF::SupportsSeccompSandbox() ==
- sandbox::SandboxBPF::STATUS_AVAILABLE) {
+ if (sandbox::SandboxBPF::SupportsSeccompSandbox() &
+ SandboxBPF::SECCOMP_SINGLE_THREADED) {
// Initialize and then start the sandbox with our custom policy
sandbox::SandboxBPF sandbox;
sandbox.SetSandboxPolicy(policy.release());
SANDBOX_ASSERT(
- sandbox.StartSandbox(sandbox::SandboxBPF::PROCESS_SINGLE_THREADED));
+ sandbox.StartSandbox(sandbox::SandboxBPF::SECCOMP_SINGLE_THREADED));
// Run the actual test.
bpf_tester_delegate_->RunTestFunction();

Powered by Google App Engine
This is Rietveld 408576698