summaryrefslogtreecommitdiffstats
path: root/content/browser/child_process_launcher.cc
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-19 23:46:15 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-19 23:46:15 +0000
commit9d3affb15f5d275a19f81aa583fcc33a49fc3c9c (patch)
tree4a3e16a92bbeacf6b33266ee64d4d197933dcca9 /content/browser/child_process_launcher.cc
parentc54192896a0121ee9e03fcf0dfaf68d61ba91449 (diff)
downloadchromium_src-9d3affb15f5d275a19f81aa583fcc33a49fc3c9c.zip
chromium_src-9d3affb15f5d275a19f81aa583fcc33a49fc3c9c.tar.gz
chromium_src-9d3affb15f5d275a19f81aa583fcc33a49fc3c9c.tar.bz2
Alter the design of the bootstrap sandbox to only take over the bootstrap port of children when necessary.
Rather than replacing the bootstrap port outright in the browser process, this change merely registers the sandboxed bootstrap port with launchd. When a sandboxed child is being launched with base::LaunchProcess(), a new LaunchOptions can specify a bootstrap name to look up and use as a replacement bootstrap port. The bootstrap port in the new child is replaced after fork() but before exec(). The kernel clears the IPC space during both of these system calls, so no other references to the original bootstrap port will exist after replacing the port with the sandboxed one and exec()ing. This change also partially reverts r276026, which introduced a permissive policy for NPAPI plugins. Since those plugins are no longer affected by the bootstrap sandbox, it can be removed. BUG=367863,383513,383517,383791,386330 R=jam@chromium.org, mark@chromium.org Review URL: https://codereview.chromium.org/347783002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278530 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/child_process_launcher.cc')
-rw-r--r--content/browser/child_process_launcher.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher.cc
index 9ead67b..b49a982 100644
--- a/content/browser/child_process_launcher.cc
+++ b/content/browser/child_process_launcher.cc
@@ -288,6 +288,8 @@ class ChildProcessLauncher::Context
const int bootstrap_sandbox_policy = delegate->GetSandboxType();
if (ShouldEnableBootstrapSandbox() &&
bootstrap_sandbox_policy != SANDBOX_TYPE_INVALID) {
+ options.replacement_bootstrap_name =
+ GetBootstrapSandbox()->server_bootstrap_name();
GetBootstrapSandbox()->PrepareToForkWithPolicy(
bootstrap_sandbox_policy);
}