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

Side by Side Diff: chrome/renderer/renderer_main_platform_delegate_linux.cc

Issue 371047: Allow the seccomp sandbox to be enabled, even if the suid sandbox has... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/zygote_main_linux.cc ('k') | sandbox/linux/seccomp/access.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 19 matching lines...) Expand all
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) && !defined(CHROMIUM_SELINUX) 39 #if defined(ARCH_CPU_X86_FAMILY) && !defined(CHROMIUM_SELINUX)
40 // N.b. SupportsSeccompSandbox() returns a cached result, as we already
41 // called it earlier in the zygote. Thus, it is OK for us to not pass in
42 // a file descriptor for "/proc".
40 if (CommandLine::ForCurrentProcess()->HasSwitch( 43 if (CommandLine::ForCurrentProcess()->HasSwitch(
41 switches::kEnableSeccompSandbox) && 44 switches::kEnableSeccompSandbox) &&
42 SupportsSeccompSandbox()) { 45 SupportsSeccompSandbox(-1)) {
43 StartSeccompSandbox(); 46 StartSeccompSandbox();
44 } 47 }
45 #endif 48 #endif
46 return true; 49 return true;
47 } 50 }
48 51
49 void RendererMainPlatformDelegate::RunSandboxTests() { 52 void RendererMainPlatformDelegate::RunSandboxTests() {
50 // The sandbox is started in the zygote process: zygote_main_linux.cc 53 // The sandbox is started in the zygote process: zygote_main_linux.cc
51 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox 54 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox
52 } 55 }
OLDNEW
« no previous file with comments | « chrome/browser/zygote_main_linux.cc ('k') | sandbox/linux/seccomp/access.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698