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. |