diff options
author | jln <jln@chromium.org> | 2015-02-18 18:21:55 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-19 02:22:20 +0000 |
commit | 151ebd71242e36fa18e0bd1d0b5df228a97fbbdf (patch) | |
tree | 4f8a7ae28c32dcc67cf933c8e5670f2c9e4ef27f /content/zygote/zygote_linux.cc | |
parent | 30bc93f3361397f8cde5d319923f1609508bb909 (diff) | |
download | chromium_src-151ebd71242e36fa18e0bd1d0b5df228a97fbbdf.zip chromium_src-151ebd71242e36fa18e0bd1d0b5df228a97fbbdf.tar.gz chromium_src-151ebd71242e36fa18e0bd1d0b5df228a97fbbdf.tar.bz2 |
Linux Sandbox: always discover Zygote PID properly
Discover the Zygote's PID properly when using the namespace sandbox.
BUG=459724
Review URL: https://codereview.chromium.org/940603003
Cr-Commit-Position: refs/heads/master@{#316974}
Diffstat (limited to 'content/zygote/zygote_linux.cc')
-rw-r--r-- | content/zygote/zygote_linux.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/content/zygote/zygote_linux.cc b/content/zygote/zygote_linux.cc index 42dd5d8..5944f87 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]; |