|
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
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=278530
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+104 lines, -98 lines) |
Patch |
 |
M |
base/process/launch.h
|
View
|
|
2 chunks |
+14 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/process/launch_mac.cc
|
View
|
1
|
2 chunks |
+20 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/process/launch_posix.cc
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/browser/bootstrap_sandbox_mac.cc
|
View
|
|
2 chunks |
+0 lines, -10 lines |
0 comments
|
Download
|
 |
M |
content/browser/child_process_launcher.cc
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/browser/plugin_process_host.cc
|
View
|
|
1 chunk |
+0 lines, -7 lines |
0 comments
|
Download
|
 |
M |
content/common/sandbox_mac.mm
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/common/sandbox_mac_unittest_helper.mm
|
View
|
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/plugin/plugin_main_mac.mm
|
View
|
|
2 chunks |
+0 lines, -24 lines |
0 comments
|
Download
|
 |
M |
content/public/common/sandbox_type_mac.h
|
View
|
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
sandbox/mac/bootstrap_sandbox.h
|
View
|
1
2
|
3 chunks |
+9 lines, -3 lines |
0 comments
|
Download
|
 |
M |
sandbox/mac/bootstrap_sandbox.cc
|
View
|
1
|
5 chunks |
+24 lines, -28 lines |
0 comments
|
Download
|
 |
M |
sandbox/mac/bootstrap_sandbox_unittest.mm
|
View
|
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
sandbox/mac/launchd_interception_server.h
|
View
|
1
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
sandbox/mac/launchd_interception_server.cc
|
View
|
1
2
|
3 chunks |
+6 lines, -5 lines |
0 comments
|
Download
|
 |
M |
sandbox/mac/mach_message_server.h
|
View
|
1
|
1 chunk |
+8 lines, -1 line |
0 comments
|
Download
|
 |
M |
sandbox/mac/mach_message_server.cc
|
View
|
1
|
2 chunks |
+12 lines, -8 lines |
0 comments
|
Download
|
Total messages: 6 (0 generated)
|