17d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved. 27d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 37d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)// found in the LICENSE file. 47d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 57d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#include "content/public/common/sandbox_init.h" 67d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 7a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)#include "base/memory/scoped_ptr.h" 85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "content/common/sandbox_linux/sandbox_seccomp_bpf_linux.h" 91320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#include "sandbox/linux/bpf_dsl/bpf_dsl.h" 107d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 117d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)namespace content { 127d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 131320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tuccibool InitializeSandbox( 141320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci scoped_ptr<sandbox::bpf_dsl::SandboxBPFDSLPolicy> policy) { 15a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) return SandboxSeccompBPF::StartSandboxWithExternalPolicy(policy.Pass()); 167d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 177d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 181320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucciscoped_ptr<sandbox::bpf_dsl::SandboxBPFDSLPolicy> 191320f92c476a1ad9d19dba2a48c72b75566198e9Primiano TucciGetBPFSandboxBaselinePolicy() { 20a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) return SandboxSeccompBPF::GetBaselinePolicy().Pass(); 217d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 227d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 237d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} // namespace content 24