diff options
author | Kim Alvefur <zash@zash.se> | 2016-01-12 23:48:16 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-01-12 23:48:16 +0100 |
commit | 79d9b096cd35adbf7b818a1729c0b2b0da561554 (patch) | |
tree | 1a77c265137634b69277a6ff146442c7885aa50a /util/random.lua | |
parent | 527b03ca48588ea5a907b96cc336ccb80843b2d3 (diff) | |
download | prosody-79d9b096cd35adbf7b818a1729c0b2b0da561554.tar.gz prosody-79d9b096cd35adbf7b818a1729c0b2b0da561554.zip |
util.random: Open /dev/urandom read-only, make seed() a noop
Diffstat (limited to 'util/random.lua')
-rw-r--r-- | util/random.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/util/random.lua b/util/random.lua index 4963e98c..05f36aba 100644 --- a/util/random.lua +++ b/util/random.lua @@ -6,11 +6,9 @@ -- COPYING file in the source package for more information. -- -local urandom = assert(io.open("/dev/urandom", "r+")); +local urandom = assert(io.open("/dev/urandom", "r")); -local function seed(x) - urandom:write(x); - urandom:flush(); +local function seed() end local function bytes(n) |