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

Unified Diff: content/browser/browser_main_loop.cc

Issue 1840923002: Removed setuid Sandbox Check as Per Bug#598454 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 3c39e531a9aea3f03cfb018a0ee5430a5b2bf243..19ea411538f59911c6f3024f4fba955f4200ed8f 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -193,41 +193,13 @@ namespace content {
namespace {
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
-void SetupSandbox(const base::CommandLine& parsed_command_line) {
- TRACE_EVENT0("startup", "SetupSandbox");
- base::FilePath sandbox_binary;
-
- scoped_ptr<sandbox::SetuidSandboxHost> setuid_sandbox_host(
- sandbox::SetuidSandboxHost::Create());
-
- const bool want_setuid_sandbox =
- !parsed_command_line.HasSwitch(switches::kNoSandbox) &&
- !parsed_command_line.HasSwitch(switches::kDisableSetuidSandbox) &&
- !setuid_sandbox_host->IsDisabledViaEnvironment();
-
- static const char no_suid_error[] =
- "Running without the SUID sandbox! See "
- "https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md "
- "for more information on developing with the sandbox on.";
- if (want_setuid_sandbox) {
- sandbox_binary = setuid_sandbox_host->GetSandboxBinaryPath();
- if (sandbox_binary.empty()) {
- // This needs to be fatal. Talk to security@chromium.org if you feel
- // otherwise.
- LOG(FATAL) << no_suid_error;
- }
- } else {
- LOG(ERROR) << no_suid_error;
- }
Dirk Pranke 2016/03/29 21:17:47 Do we need to keep this logic on ChromeOS (i.e., c
-
- // Tickle the sandbox host and zygote host so they fork now.
+void TickleSandbox() {
RenderSandboxHostLinux::GetInstance()->Init();
- ZygoteHostImpl::GetInstance()->Init(sandbox_binary.value());
+ // ZygoteHostImpl::GetInstance()->Init(sandbox_binary.value());
mdempsky 2016/03/29 19:02:47 We still need to call Init here.
*GetGenericZygote() = CreateZygote();
RenderProcessHostImpl::EarlyZygoteLaunch();
}
#endif
-
#if defined(USE_GLIB)
static void GLibLogHandler(const gchar* log_domain,
GLogLevelFlags log_level,
@@ -440,11 +412,8 @@ void BrowserMainLoop::EarlyInitialization() {
TRACK_SCOPED_REGION("Startup", "BrowserMainLoop::EarlyInitialization");
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
- // No thread should be created before this call, as SetupSandbox()
- // will end-up using fork().
- SetupSandbox(parsed_command_line_);
+ TickleSandbox();
#endif
-
#if defined(USE_X11)
if (UsingInProcessGpu()) {
if (!gfx::InitializeThreadedX11()) {
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698