git: rand(3): Fix up sranddev(3) a bit better.
Sascha Wildner
swildner at crater.dragonflybsd.org
Tue Feb 25 15:09:55 PST 2014
commit 7918d779d8aeb069b5be1d6901d96574ed6dd83c
Author: Sascha Wildner <saw at online.de>
Date: Tue Feb 25 23:50:13 2014 +0100
rand(3): Fix up sranddev(3) a bit better.
In case we can't read /dev/random for the seed, try kern.random. If that
fails, use the getpid()/gettimeofday() xor. For the latter, remove the
usage of an uninitialized variable.
We should probably just abort() when kern.random can't be read.
Discussed-with: dillon
Summary of changes:
lib/libc/stdlib/rand.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7918d779d8aeb069b5be1d6901d96574ed6dd83c
--
DragonFly BSD source repository
More information about the Commits
mailing list