diff options
author | mdempsky <mdempsky@chromium.org> | 2015-01-02 16:17:28 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-03 00:18:22 +0000 |
commit | 90ef511e5b93f32b80cb6f52d88f6cae2ac5ee6c (patch) | |
tree | c5d6c48462310d1abd9c7171b656b9abc4adb2b5 /content/zygote | |
parent | fb5b07fe4a8961eba502b50a9cf5d0d527e1670c (diff) | |
download | chromium_src-90ef511e5b93f32b80cb6f52d88f6cae2ac5ee6c.zip chromium_src-90ef511e5b93f32b80cb6f52d88f6cae2ac5ee6c.tar.gz chromium_src-90ef511e5b93f32b80cb6f52d88f6cae2ac5ee6c.tar.bz2 |
zygote: skip pre-initializing sandbox under --no-sandbox flag
BUG=444900
Review URL: https://codereview.chromium.org/830173002
Cr-Commit-Position: refs/heads/master@{#309865}
Diffstat (limited to 'content/zygote')
-rw-r--r-- | content/zygote/zygote_main_linux.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/content/zygote/zygote_main_linux.cc b/content/zygote/zygote_main_linux.cc index 514891e..8f89580 100644 --- a/content/zygote/zygote_main_linux.cc +++ b/content/zygote/zygote_main_linux.cc @@ -576,8 +576,12 @@ bool ZygoteMain(const MainFunctionParams& params, fds_to_close_post_fork.push_back(sancov_socket_fds[1]); #endif - // This will pre-initialize the various sandboxes that need it. - linux_sandbox->PreinitializeSandbox(); + // Skip pre-initializing sandbox under --no-sandbox for crbug.com/444900. + if (!base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kNoSandbox)) { + // This will pre-initialize the various sandboxes that need it. + linux_sandbox->PreinitializeSandbox(); + } const bool must_enable_setuid_sandbox = linux_sandbox->setuid_sandbox_client()->IsSuidSandboxChild(); |