diff options
author | mdempsky@chromium.org <mdempsky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-02 04:38:02 +0000 |
---|---|---|
committer | mdempsky@chromium.org <mdempsky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-02 04:38:02 +0000 |
commit | f9d2a4f5505b5dc8ba625a93b901d8b0e2af46e3 (patch) | |
tree | 1d4deb57c1bfb2ee2af822704e8eb88fcdd4bd37 /components/nacl/loader | |
parent | f65b1259ce5d6b12ac6212128ee25c4bfb0479d8 (diff) | |
download | chromium_src-f9d2a4f5505b5dc8ba625a93b901d8b0e2af46e3.zip chromium_src-f9d2a4f5505b5dc8ba625a93b901d8b0e2af46e3.tar.gz chromium_src-f9d2a4f5505b5dc8ba625a93b901d8b0e2af46e3.tar.bz2 |
Get rid of kZygoteIdFd from content
Move handling of the dummy file descriptor into SetuidSandboxClient.
Review URL: https://codereview.chromium.org/262533004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267743 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/nacl/loader')
-rw-r--r-- | components/nacl/loader/sandbox_linux/nacl_sandbox_linux.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/components/nacl/loader/sandbox_linux/nacl_sandbox_linux.cc b/components/nacl/loader/sandbox_linux/nacl_sandbox_linux.cc index 1bf329d..2c92021 100644 --- a/components/nacl/loader/sandbox_linux/nacl_sandbox_linux.cc +++ b/components/nacl/loader/sandbox_linux/nacl_sandbox_linux.cc @@ -74,13 +74,11 @@ void NaClSandbox::InitializeLayerOneSandbox() { CHECK(!IsSandboxed()) << "Unexpectedly sandboxed!"; scoped_ptr<sandbox::SetuidSandboxClient> setuid_sandbox_client( sandbox::SetuidSandboxClient::Create()); - // Close the file descriptor that is an artefact of how the setuid sandbox - // works. - PCHECK(0 == IGNORE_EINTR(close( - setuid_sandbox_client->GetUniqueToChildFileDescriptor()))); const bool suid_sandbox_child = setuid_sandbox_client->IsSuidSandboxChild(); if (suid_sandbox_child) { + setuid_sandbox_client->CloseDummyFile(); + // Make sure that no directory file descriptor is open, as it would bypass // the setuid sandbox model. CHECK(!HasOpenDirectory()); |