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

Unified Diff: sandbox/linux/suid/client/setuid_sandbox_host.cc

Issue 2950153002: Improve process launch handle sharing API. (Closed)
Patch Set: Merge Created 3 years, 5 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 | « sandbox/linux/suid/client/setuid_sandbox_host.h ('k') | sandbox/win/src/broker_services.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/suid/client/setuid_sandbox_host.cc
diff --git a/sandbox/linux/suid/client/setuid_sandbox_host.cc b/sandbox/linux/suid/client/setuid_sandbox_host.cc
index 58cb8c712a71a4ac6e86f2e72dbbf09ad9bcd8fe..89836aaabb3dfc072cacb4c7edd62eced59e730c 100644
--- a/sandbox/linux/suid/client/setuid_sandbox_host.cc
+++ b/sandbox/linux/suid/client/setuid_sandbox_host.cc
@@ -165,10 +165,8 @@ void SetuidSandboxHost::PrependWrapper(base::CommandLine* cmd_line) {
void SetuidSandboxHost::SetupLaunchOptions(
base::LaunchOptions* options,
- base::FileHandleMappingVector* fds_to_remap,
base::ScopedFD* dummy_fd) {
DCHECK(options);
- DCHECK(fds_to_remap);
// Launching a setuid binary requires PR_SET_NO_NEW_PRIVS to not be used.
options->allow_new_privs = true;
@@ -183,7 +181,7 @@ void SetuidSandboxHost::SetupLaunchOptions(
// We no longer need a dummy socket for discovering the child's PID,
// but the sandbox is still hard-coded to expect a file descriptor at
// kZygoteIdFd. Fixing this requires a sandbox API change. :(
- fds_to_remap->push_back(std::make_pair(dummy_fd->get(), kZygoteIdFd));
+ options->fds_to_remap.push_back(std::make_pair(dummy_fd->get(), kZygoteIdFd));
}
void SetuidSandboxHost::SetupLaunchEnvironment() {
« no previous file with comments | « sandbox/linux/suid/client/setuid_sandbox_host.h ('k') | sandbox/win/src/broker_services.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698