summaryrefslogtreecommitdiffstats
path: root/ppapi/native_client
diff options
context:
space:
mode:
authormseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-24 21:37:36 +0000
committermseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-24 21:37:36 +0000
commit22d2ba7a76e1492ea861e124a46e5c7d46098361 (patch)
tree0d0bcec3d44217c39a6040a19c51a0e9135f2d4f /ppapi/native_client
parentfe4773064a50bb772fa62c7205e14e89e8c6b9a4 (diff)
downloadchromium_src-22d2ba7a76e1492ea861e124a46e5c7d46098361.zip
chromium_src-22d2ba7a76e1492ea861e124a46e5c7d46098361.tar.gz
chromium_src-22d2ba7a76e1492ea861e124a46e5c7d46098361.tar.bz2
NaCl: Provide the /dev/urandom FD via NaCl's new embedding interface
This will allow an "#ifdef NACL_STANDALONE" to be removed from the NaCl side. BUG=http://code.google.com/p/nativeclient/issues/detail?id=2655 TEST=nacl_integration on Unix Review URL: https://chromiumcodereview.appspot.com/10442009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138901 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/native_client')
-rw-r--r--ppapi/native_client/src/trusted/plugin/module_ppapi.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/ppapi/native_client/src/trusted/plugin/module_ppapi.cc b/ppapi/native_client/src/trusted/plugin/module_ppapi.cc
index 60c7625..f639e7a 100644
--- a/ppapi/native_client/src/trusted/plugin/module_ppapi.cc
+++ b/ppapi/native_client/src/trusted/plugin/module_ppapi.cc
@@ -48,8 +48,14 @@ class ModulePpapi : public pp::Module {
launch_nacl_process = reinterpret_cast<LaunchNaClProcessFunc>(
private_interface_->LaunchSelLdr);
+ // TODO(mseaborn): Remove this get_urandom_fd global variable once
+ // the NaCl side no longer depends on it.
get_urandom_fd = private_interface_->UrandomFD;
+#if NACL_LINUX || NACL_OSX
+ NaClSecureRngModuleSetUrandomFd(dup(private_interface_->UrandomFD()));
+#endif
+
// In the plugin, we don't need high resolution time of day.
NaClAllowLowResolutionTimeOfDay();
NaClNrdAllModulesInit();