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

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

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 | « content/zygote/zygote_main_linux.cc ('k') | sandbox/linux/suid/client/setuid_sandbox_client.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_client.h
diff --git a/sandbox/linux/suid/client/setuid_sandbox_client.h b/sandbox/linux/suid/client/setuid_sandbox_client.h
index e6a3e4c5cad2837848c2284d29ab8bc30b742f62..9596738b685aeb34638e1a8ccafb939910b5fb39 100644
--- a/sandbox/linux/suid/client/setuid_sandbox_client.h
+++ b/sandbox/linux/suid/client/setuid_sandbox_client.h
@@ -38,7 +38,10 @@ namespace sandbox {
// If B dies, all the processes in the namespace will die.
// B can fork() and the parent can assume the role of init(1), by using
// CreateInitProcessReaper().
-// 8. B requests being chroot-ed through ChrootMe() and
+// 8. B uses CreateNewSession() to move to a new session ID and process group.
+// This prevents a sandboxed process from signaling its process group and
+// get signals delivered across the PID namespace boundary.
+// 9. B requests being chroot-ed through ChrootMe() and
// requests other sandboxing status via the status functions.
class SANDBOX_EXPORT SetuidSandboxClient {
public:
@@ -52,6 +55,9 @@ class SANDBOX_EXPORT SetuidSandboxClient {
// to an empty directory.
// Will only work if we have been launched through the setuid helper.
bool ChrootMe();
+ // Create a new session and a new process group. This helps isolate processes
+ // outside of the sandbox from processes inside.
+ bool CreateNewSession();
// When a new PID namespace is created, the process with pid == 1 should
// assume the role of init.
// See sandbox/linux/services/init_process_reaper.h for more information
« no previous file with comments | « content/zygote/zygote_main_linux.cc ('k') | sandbox/linux/suid/client/setuid_sandbox_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698