0
Files
src/content/common/sandbox_init_linux.cc
Tom Sepez 903f7f132b Move content/sandbox_linux to service_manager/sandbox/linux
The sandbox_linux.cc in service_manager is not the same as in content,
so move it into the deprecated:: namespace to avoid conflicts. A subsequent
CL will replace the old one with the new one, but requires some effort
since the APIs have diverged.

Bug: 708738
Change-Id: I3534090b1b245fd96659ce494d559d8ac8f74aab
Reviewed-on: https://chromium-review.googlesource.com/738317
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511863}
2017-10-26 17:34:02 +00:00

30 lines
943 B
C++

// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/public/common/sandbox_init.h"
#include <memory>
#include <utility>
#include "base/files/scoped_file.h"
#include "build/build_config.h"
#include "sandbox/linux/bpf_dsl/policy.h"
#include "services/service_manager/sandbox/linux/sandbox_seccomp_bpf_linux.h"
namespace content {
bool InitializeSandbox(std::unique_ptr<sandbox::bpf_dsl::Policy> policy,
base::ScopedFD proc_fd) {
return service_manager::SandboxSeccompBPF::StartSandboxWithExternalPolicy(
std::move(policy), std::move(proc_fd));
}
#if !defined(OS_NACL_NONSFI)
std::unique_ptr<sandbox::bpf_dsl::Policy> GetBPFSandboxBaselinePolicy() {
return service_manager::SandboxSeccompBPF::GetBaselinePolicy();
}
#endif // !defined(OS_NACL_NONSFI)
} // namespace content