OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/nacl/nacl_main_platform_delegate.h" | |
6 | |
7 #include "base/command_line.h" | |
8 | |
9 NaClMainPlatformDelegate::NaClMainPlatformDelegate( | |
10 const content::MainFunctionParams& parameters) | |
11 : parameters_(parameters), sandbox_test_module_(NULL) { | |
12 } | |
13 | |
14 NaClMainPlatformDelegate::~NaClMainPlatformDelegate() { | |
15 } | |
16 | |
17 void NaClMainPlatformDelegate::PlatformInitialize() { | |
18 } | |
19 | |
20 void NaClMainPlatformDelegate::PlatformUninitialize() { | |
21 } | |
22 | |
23 void NaClMainPlatformDelegate::InitSandboxTests(bool no_sandbox) { | |
24 // The sandbox is started in the zygote process: zygote_main_linux.cc | |
25 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox | |
26 return; | |
27 } | |
28 | |
29 void NaClMainPlatformDelegate::EnableSandbox() { | |
30 // The setuid sandbox is started in the zygote process: zygote_main_linux.cc | |
31 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox | |
32 // | |
33 // The seccomp sandbox is started in the renderer. | |
34 // http://code.google.com/p/seccompsandbox/ | |
35 // seccomp is currently disabled for nacl. | |
36 // http://code.google.com/p/chromium/issues/detail?id=59423 | |
37 // See the code in chrome/renderer/renderer_main_platform_delegate_linux.cc | |
38 // for how to turn seccomp on. | |
39 // | |
40 // The seccomp sandbox should not be enabled for Native Client until | |
41 // all of these issues are fixed: | |
42 // http://code.google.com/p/nativeclient/issues/list?q=label:Seccomp | |
43 // At best, NaCl will not work. At worst, enabling the seccomp sandbox | |
44 // could create a hole in the NaCl sandbox. | |
45 } | |
46 | |
47 bool NaClMainPlatformDelegate::RunSandboxTests() { | |
48 // The sandbox is started in the zygote process: zygote_main_linux.cc | |
49 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox | |
50 return true; | |
51 } | |
OLD | NEW |