mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-26 23:40:57 +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:
parent
36ee5dba51
commit
23b65c13f4
1 changed files with 6 additions and 3 deletions
|
@ -75,9 +75,12 @@ final class PhabricatorSetup {
|
|||
$open_arcanist = false;
|
||||
}
|
||||
|
||||
$open_urandom = @fopen('/dev/urandom', 'r');
|
||||
if (!$open_urandom) {
|
||||
self::write("Unable to open /dev/urandom!\n");
|
||||
$open_urandom = false;
|
||||
try {
|
||||
Filesystem::readRandomBytes(1);
|
||||
$open_urandom = true;
|
||||
} catch (FilesystemException $ex) {
|
||||
self::write($ex->getMessage()."\n");
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue