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

Unified Diff: sandbox/linux/services/credentials.cc

Issue 1158793003: Enable one PID namespace per process for NaCl processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enable PID namespace per process for nonsfi newlib NaCl as well. Created 5 years, 6 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/services/credentials.h ('k') | sandbox/linux/services/namespace_sandbox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/services/credentials.cc
diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
index 35bb4dcbd73fe99882deaf362dae473b9efd8c56..dc62f1b21392b05012a6dda3a24b50be97bacf91 100644
--- a/sandbox/linux/services/credentials.cc
+++ b/sandbox/linux/services/credentials.cc
@@ -296,4 +296,15 @@ bool Credentials::DropFileSystemAccess(int proc_fd) {
return true;
}
+pid_t Credentials::ForkAndDropCapabilitiesInChild() {
+ pid_t pid = fork();
+ if (pid != 0) {
+ return pid;
+ }
+
+ // Since we just forked, we are single threaded.
+ PCHECK(DropAllCapabilitiesOnCurrentThread());
+ return 0;
+}
+
} // namespace sandbox.
« no previous file with comments | « sandbox/linux/services/credentials.h ('k') | sandbox/linux/services/namespace_sandbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698