# HG changeset patch # User Kim Alvefur # Date 1452638896 -3600 # Node ID ac920b0f9eae0f89025186e5a95e6ca6dfa1b92b # Parent 8b590fc77d91c013c0ebf3c69023bc69710695cb util.random: Open /dev/urandom read-only, make seed() a noop diff -r 8b590fc77d91 -r ac920b0f9eae util/random.lua --- 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)