| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/renderer/renderer_main_platform_delegate.h" | 5 #include "chrome/renderer/renderer_main_platform_delegate.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/debug_util.h" | 8 #include "base/debug_util.h" |
| 9 #include "sandbox/linux/seccomp/sandbox.h" | 9 #include "sandbox/linux/seccomp/sandbox.h" |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox | 29 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox |
| 30 return true; | 30 return true; |
| 31 } | 31 } |
| 32 | 32 |
| 33 bool RendererMainPlatformDelegate::EnableSandbox() { | 33 bool RendererMainPlatformDelegate::EnableSandbox() { |
| 34 // The setuid sandbox is started in the zygote process: zygote_main_linux.cc | 34 // The setuid sandbox is started in the zygote process: zygote_main_linux.cc |
| 35 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox | 35 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox |
| 36 // | 36 // |
| 37 // The seccomp sandbox is started in the renderer. | 37 // The seccomp sandbox is started in the renderer. |
| 38 // http://code.google.com/p/seccompsandbox/ | 38 // http://code.google.com/p/seccompsandbox/ |
| 39 #if defined(ARCH_CPU_X86_FAMILY) | 39 #if defined(ARCH_CPU_X86_FAMILY) && !defined(CHROMIUM_SELINUX) |
| 40 if (CommandLine::ForCurrentProcess()->HasSwitch( | 40 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 41 switches::kEnableSeccompSandbox)) { | 41 switches::kEnableSeccompSandbox)) { |
| 42 StartSeccompSandbox(); | 42 StartSeccompSandbox(); |
| 43 } | 43 } |
| 44 #endif | 44 #endif |
| 45 return true; | 45 return true; |
| 46 } | 46 } |
| 47 | 47 |
| 48 void RendererMainPlatformDelegate::RunSandboxTests() { | 48 void RendererMainPlatformDelegate::RunSandboxTests() { |
| 49 // The sandbox is started in the zygote process: zygote_main_linux.cc | 49 // The sandbox is started in the zygote process: zygote_main_linux.cc |
| 50 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox | 50 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox |
| 51 } | 51 } |
| OLD | NEW |