summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-10 21:41:17 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-10 21:41:17 +0000
commit9faa288fe9517ea8524204f90bfa36d1aa74a828 (patch)
treeeff3e3e0bc96603cd311c9cc44415785ca49cc5c /sys/kern
parent9392a0d20bd3087247d0122567d2147d16bf3f97 (diff)
srandom() seeds random() at boottime
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/init_main.c4
1 files changed, 3 insertions, 1 deletions
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 */