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

Unified Diff: ppapi/native_client/src/trusted/plugin/module_ppapi.cc

Issue 10448055: NaCl: Remove the plugin's internal definition of GetUrandomFD() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Retry upload Created 8 years, 7 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
Index: ppapi/native_client/src/trusted/plugin/module_ppapi.cc
diff --git a/ppapi/native_client/src/trusted/plugin/module_ppapi.cc b/ppapi/native_client/src/trusted/plugin/module_ppapi.cc
index f639e7ad26ad7fa04375bb6da4419d5282277d67..f43c26aea85de55a61ca9cb190af867a68ebfabf 100644
--- a/ppapi/native_client/src/trusted/plugin/module_ppapi.cc
+++ b/ppapi/native_client/src/trusted/plugin/module_ppapi.cc
@@ -13,8 +13,6 @@
#include "ppapi/c/private/ppb_nacl_private.h"
#include "ppapi/cpp/module.h"
-GetURandomFDFunc get_urandom_fd;
-
namespace plugin {
class ModulePpapi : public pp::Module {
@@ -48,11 +46,12 @@ 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
+ // Note that currently we do not need random numbers inside the
+ // NaCl trusted plugin on Unix, but NaClSecureRngModuleInit() is
+ // strict and will raise a fatal error unless we provide it with a
+ // /dev/urandom FD beforehand.
NaClSecureRngModuleSetUrandomFd(dup(private_interface_->UrandomFD()));
#endif
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/browser_utils.cc ('k') | ppapi/native_client/src/trusted/plugin/nacl_entry_points.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698