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

Unified Diff: content/zygote/zygote_linux.cc

Issue 940603003: Linux Sandbox: always discover Zygote PID properly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo. Created 5 years, 10 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_linux.h ('k') | content/zygote/zygote_main_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/zygote/zygote_linux.cc
diff --git a/content/zygote/zygote_linux.cc b/content/zygote/zygote_linux.cc
index 42dd5d8457f9a0bda85d79ee0b681f9cfc7629ff..5944f87aa1258dff7a908eb6d5a2d55cea93a05f 100644
--- a/content/zygote/zygote_linux.cc
+++ b/content/zygote/zygote_linux.cc
@@ -106,7 +106,7 @@ bool Zygote::ProcessRequests() {
action.sa_handler = &SIGCHLDHandler;
CHECK(sigaction(SIGCHLD, &action, NULL) == 0);
- if (UsingSUIDSandbox()) {
+ if (UsingSUIDSandbox() || UsingNSSandbox()) {
// Let the ZygoteHost know we are ready to go.
// The receiving code is in content/browser/zygote_host_linux.cc.
bool r = UnixDomainSocket::SendMsg(kZygoteSocketPairFd,
@@ -147,6 +147,10 @@ bool Zygote::UsingSUIDSandbox() const {
return sandbox_flags_ & kSandboxLinuxSUID;
}
+bool Zygote::UsingNSSandbox() const {
+ return sandbox_flags_ & kSandboxLinuxUserNS;
+}
+
bool Zygote::HandleRequestFromBrowser(int fd) {
ScopedVector<base::ScopedFD> fds;
char buf[kZygoteMaxMessageLength];
« no previous file with comments | « content/zygote/zygote_linux.h ('k') | content/zygote/zygote_main_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698