From 9faa288fe9517ea8524204f90bfa36d1aa74a828 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sat, 10 Aug 1996 21:41:17 +0000 Subject: srandom() seeds random() at boottime --- sys/kern/init_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/kern') diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 28d44e05c0b..d8af76650dc 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.12 1996/06/16 10:28:39 deraadt Exp $ */ +/* $OpenBSD: init_main.c,v 1.13 1996/08/10 21:41:13 deraadt Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -386,6 +386,8 @@ main(framep) cpu_set_kpc(pfind(3), start_update); #endif + srandom((u_long)(time.tv_sec ^ time.tv_usec)); + /* The scheduler is an infinite loop. */ scheduler(); /* NOTREACHED */ -- cgit v1.2.3