Software /
code /
prosody
Changeset
7083:ac920b0f9eae
util.random: Open /dev/urandom read-only, make seed() a noop
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 12 Jan 2016 23:48:16 +0100 |
parents | 7082:8b590fc77d91 |
children | 7084:fdbe9ccac17d |
files | util/random.lua |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/util/random.lua Tue Jan 12 23:47:30 2016 +0100 +++ b/util/random.lua Tue Jan 12 23:48:16 2016 +0100 @@ -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)