diff options
author | ncbray@chromium.org <ncbray@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-13 01:28:07 +0000 |
---|---|---|
committer | ncbray@chromium.org <ncbray@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-13 01:28:07 +0000 |
commit | 59d816b0141785fda252decfcdfb2f35a40da991 (patch) | |
tree | 5f894afd515ea58ffcb6a880b74b097a39c5cc9b /chrome/nacl | |
parent | ae100e6994a304739d95ac3b1b625a054704c907 (diff) | |
download | chromium_src-59d816b0141785fda252decfcdfb2f35a40da991.zip chromium_src-59d816b0141785fda252decfcdfb2f35a40da991.tar.gz chromium_src-59d816b0141785fda252decfcdfb2f35a40da991.tar.bz2 |
Share the zygote's fopen overrides with nacl_helper.
This will allow ChromeOS's version of NSS to initialize inside of nacl_helper
without killing the process, which in turn allows validation caching to be
enabled on ChromeOS.
BUG= https://code.google.com/p/chromium/issues/detail?id=134538
TEST= none
Review URL: https://chromiumcodereview.appspot.com/10736017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146498 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/nacl')
-rw-r--r-- | chrome/nacl/DEPS | 1 | ||||
-rw-r--r-- | chrome/nacl/nacl_helper_linux.cc | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/chrome/nacl/DEPS b/chrome/nacl/DEPS index d27086f..d0a3e4fa 100644 --- a/chrome/nacl/DEPS +++ b/chrome/nacl/DEPS @@ -1,6 +1,7 @@ include_rules = [ "+chrome/app/breakpad_win.h", "+content/public/app/startup_helper_win.h", + "+sandbox/linux/services", "+sandbox/src", "+seccompsandbox", "+native_client/src", diff --git a/chrome/nacl/nacl_helper_linux.cc b/chrome/nacl/nacl_helper_linux.cc index 3c35c87..ccad0f0 100644 --- a/chrome/nacl/nacl_helper_linux.cc +++ b/chrome/nacl/nacl_helper_linux.cc @@ -29,6 +29,7 @@ #include "crypto/nss_util.h" #include "ipc/ipc_descriptors.h" #include "ipc/ipc_switches.h" +#include "sandbox/linux/services/libc_urandom_override.h" namespace { @@ -201,6 +202,10 @@ int main(int argc, char *argv[]) { CommandLine::Init(argc, argv); base::AtExitManager exit_manager; base::RandUint64(); // acquire /dev/urandom fd before sandbox is raised +#if !defined(CHROMIUM_SELINUX) + // Allows NSS to fopen() /dev/urandom. + sandbox::InitLibcUrandomOverrides(); +#endif #if defined(USE_NSS) // Configure NSS for use inside the NaCl process. // The fork check has not caused problems for NaCl, but this appears to be |