summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-08-10 21:41:08 +0000
committerderaadt <deraadt@openbsd.org>1996-08-10 21:41:08 +0000
commit9d9e279b041a9bb2d1430043f2cb5fecc6cb6e0f (patch)
tree43d7f843f22167be86eb35696f2ebea8970168cd /sys/kern/init_main.c
parentcall bindresvport() instead of faking it badly (diff)
downloadwireguard-openbsd-9d9e279b041a9bb2d1430043f2cb5fecc6cb6e0f.tar.xz
wireguard-openbsd-9d9e279b041a9bb2d1430043f2cb5fecc6cb6e0f.zip
srandom() seeds random() at boottime
Diffstat (limited to 'sys/kern/init_main.c')
-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 */