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

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

Issue 837083002: Linux Sandbox: move init processes to new session id. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/suid/client/setuid_sandbox_client.cc
diff --git a/sandbox/linux/suid/client/setuid_sandbox_client.cc b/sandbox/linux/suid/client/setuid_sandbox_client.cc
index f0b5cef1e0068ef9c0ddc1deccf46786ade54a4a..8a50a3b2aeb2c428e1f59243016d15555d3b1467 100644
--- a/sandbox/linux/suid/client/setuid_sandbox_client.cc
+++ b/sandbox/linux/suid/client/setuid_sandbox_client.cc
@@ -208,6 +208,11 @@ bool SetuidSandboxClient::ChrootMe() {
return true;
}
+bool SetuidSandboxClient::CreateNewSession() {
+ // This could fail if the process is already a process group leader.
+ return 0 < setsid();
+}
+
bool SetuidSandboxClient::CreateInitProcessReaper(
base::Closure* post_fork_parent_callback) {
return sandbox::CreateInitProcessReaper(post_fork_parent_callback);
« no previous file with comments | « sandbox/linux/suid/client/setuid_sandbox_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698