From ddd5e8abb4c54e51138a46b98716517f7774c5c7 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 27 Feb 2018 10:36:17 +0100 Subject: [PATCH] Provide /dev/random in runtime for fetchurl libcrypto transparently opens /dev/random to seed its PRNG or logs an error if this fails. --- repos/gems/run/sculpt/download_runtime.config | 1 + repos/gems/src/app/depot_download_manager/gen_fetchurl.cc | 5 +++++ repos/libports/run/fetchurl.run | 1 + 3 files changed, 7 insertions(+) diff --git a/repos/gems/run/sculpt/download_runtime.config b/repos/gems/run/sculpt/download_runtime.config index e1fb060864..aad49acbc4 100644 --- a/repos/gems/run/sculpt/download_runtime.config +++ b/repos/gems/run/sculpt/download_runtime.config @@ -122,6 +122,7 @@ 2000-01-01 00:00 + 01234567890123456789 diff --git a/repos/gems/src/app/depot_download_manager/gen_fetchurl.cc b/repos/gems/src/app/depot_download_manager/gen_fetchurl.cc index 221ffef4a1..9b87254a24 100644 --- a/repos/gems/src/app/depot_download_manager/gen_fetchurl.cc +++ b/repos/gems/src/app/depot_download_manager/gen_fetchurl.cc @@ -44,6 +44,11 @@ void Depot_download_manager::gen_fetchurl_start_content(Xml_generator &xml, String<64> date("2000-01-01 00:00"); xml.append(date.string()); }); + xml.node("inline", [&] () { + xml.attribute("name", "random"); + String<64> entropy("01234567890123456789"); + xml.append(entropy.string()); + }); }); xml.node("fs", [&] () { xml.attribute("label", "tcpip"); }); diff --git a/repos/libports/run/fetchurl.run b/repos/libports/run/fetchurl.run index 0987af0888..e2fe5fec76 100644 --- a/repos/libports/run/fetchurl.run +++ b/repos/libports/run/fetchurl.run @@ -58,6 +58,7 @@ append config { 2000-01-01 00:00 + 01234567890123456789