1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 08:42:41 +01:00

Use Filesystem::readRandomBytes() in setup

Test Plan: Run setup.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran

Differential Revision: https://secure.phabricator.com/D2123
This commit is contained in:
vrana 2012-04-06 09:54:53 -07:00
parent 36ee5dba51
commit 23b65c13f4

View file

@ -75,9 +75,12 @@ final class PhabricatorSetup {
$open_arcanist = false; $open_arcanist = false;
} }
$open_urandom = @fopen('/dev/urandom', 'r'); $open_urandom = false;
if (!$open_urandom) { try {
self::write("Unable to open /dev/urandom!\n"); Filesystem::readRandomBytes(1);
$open_urandom = true;
} catch (FilesystemException $ex) {
self::write($ex->getMessage()."\n");
} }
try { try {