summaryrefslogtreecommitdiffstats
path: root/sys/dev/random
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2003-02-05 15:56:04 +0000
committerache <ache@FreeBSD.org>2003-02-05 15:56:04 +0000
commitd15f8916c5c7fd13cf7814c1a92960d7257d0749 (patch)
tree5cc2fec700412efeb39fdf6b6ff1ea55af25d641 /sys/dev/random
parent61f86586d8546ec9291c4bbe9bb92b3c02b46f07 (diff)
downloadFreeBSD-src-d15f8916c5c7fd13cf7814c1a92960d7257d0749.zip
FreeBSD-src-d15f8916c5c7fd13cf7814c1a92960d7257d0749.tar.gz
Remove srandom():
1) It is already called in init_main.c:proc0_post() 2) It is called each time read_random_phony() called, because "initialized" variable is never set to 1. Approved by: markm
Diffstat (limited to 'sys/dev/random')
-rw-r--r--sys/dev/random/harvest.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/dev/random/harvest.c b/sys/dev/random/harvest.c
index b6f3fba..87c8213 100644
--- a/sys/dev/random/harvest.c
+++ b/sys/dev/random/harvest.c
@@ -101,13 +101,8 @@ read_random_phony(void *buf, int count)
{
u_long randval;
int size, i;
- static int initialised = 0;
- /* Try to give random(9) a half decent initialisation
- * DO NOT make the mistake of thinking this is secure!!
- */
- if (!initialised)
- srandom((u_long)get_cyclecount());
+ /* srandom() is called in kern/init_main.c:proc0_post() */
/* Fill buf[] with random(9) output */
for (i = 0; i < count; i+= (int)sizeof(u_long)) {
OpenPOWER on IntegriCloud