diff options
author | mseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-29 21:25:56 +0000 |
---|---|---|
committer | mseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-29 21:25:56 +0000 |
commit | c43513df2f257e75f36efa29397aa305ccaa4883 (patch) | |
tree | b35d94126e329c996abbc5effda4fb96f89da08f /ppapi/native_client | |
parent | b985a1b7c3a64ea513cb139b90aa241fd2a1fbef (diff) | |
download | chromium_src-c43513df2f257e75f36efa29397aa305ccaa4883.zip chromium_src-c43513df2f257e75f36efa29397aa305ccaa4883.tar.gz chromium_src-c43513df2f257e75f36efa29397aa305ccaa4883.tar.bz2 |
NaCl: Remove the plugin's internal definition of GetUrandomFD()
The code in the NaCl repo no longer uses this function; it gets a
/dev/urandom FD via dependency injection instead.
BUG=http://code.google.com/p/nativeclient/issues/detail?id=2655
TEST=nacl_integration etc.
Review URL: https://chromiumcodereview.appspot.com/10448055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139376 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/native_client')
4 files changed, 4 insertions, 30 deletions
diff --git a/ppapi/native_client/src/trusted/plugin/browser_utils.cc b/ppapi/native_client/src/trusted/plugin/browser_utils.cc deleted file mode 100644 index af0f6b2..0000000 --- a/ppapi/native_client/src/trusted/plugin/browser_utils.cc +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2011 The Chromium Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - - -// Portable interface for browser interaction - API invariant portions. -#define BASE_IMPLEMENTATION - -#include "base/rand_util_c.h" - -#include "native_client/src/trusted/plugin/nacl_entry_points.h" - - -extern "C" { - int GetUrandomFD(void) { - return get_urandom_fd(); - } -} - diff --git a/ppapi/native_client/src/trusted/plugin/module_ppapi.cc b/ppapi/native_client/src/trusted/plugin/module_ppapi.cc index f639e7a..f43c26a 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 diff --git a/ppapi/native_client/src/trusted/plugin/nacl_entry_points.h b/ppapi/native_client/src/trusted/plugin/nacl_entry_points.h index 8074e5f..3723394 100644 --- a/ppapi/native_client/src/trusted/plugin/nacl_entry_points.h +++ b/ppapi/native_client/src/trusted/plugin/nacl_entry_points.h @@ -23,11 +23,8 @@ typedef bool (*LaunchNaClProcessFunc)(PP_Instance instance, typedef bool (*StartPpapiProxyFunc)(PP_Instance instance); -typedef int (*GetURandomFDFunc)(void); - extern LaunchNaClProcessFunc launch_nacl_process; extern StartPpapiProxyFunc start_ppapi_proxy; -extern GetURandomFDFunc get_urandom_fd; #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_NACL_ENTRY_POINTS_H_ diff --git a/ppapi/native_client/src/trusted/plugin/plugin.gyp b/ppapi/native_client/src/trusted/plugin/plugin.gyp index b36b644..f080c49 100644 --- a/ppapi/native_client/src/trusted/plugin/plugin.gyp +++ b/ppapi/native_client/src/trusted/plugin/plugin.gyp @@ -85,7 +85,6 @@ 'type': 'loadable_module', 'sources': [ '<@(common_sources)', - 'browser_utils.cc', ], 'xcode_settings': { 'OTHER_LDFLAGS': [ |