diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2014-01-22 03:24:43 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2014-01-22 03:24:43 +0000 |
commit | ed232994097bf289b2334e4703c35ffbfad3767a (patch) | |
tree | 9d8497323fcc5218d3e658290dfddabf99f73316 | |
parent | aea604897cde61414e1ae833489a19595118547f (diff) |
Emit a warning if no entropy was supplied by the boot loader.
ok deraadt@
-rw-r--r-- | sys/dev/rnd.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c index 6920cd828f0..820e29572e3 100644 --- a/sys/dev/rnd.c +++ b/sys/dev/rnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rnd.c,v 1.153 2014/01/19 23:52:54 deraadt Exp $ */ +/* $OpenBSD: rnd.c,v 1.154 2014/01/22 03:24:42 jsing Exp $ */ /* * Copyright (c) 2011 Theo de Raadt. @@ -750,6 +750,13 @@ arc4_reinit(void *v) void random_start(void) { +#if !defined(NO_PROPOLICE) + extern long __guard_local; + + if (__guard_local == 0) + printf("warning: no entropy supplied by boot loader\n"); +#endif + rnd_states[RND_SRC_TIMER].dont_count_entropy = 1; rnd_states[RND_SRC_TRUE].dont_count_entropy = 1; rnd_states[RND_SRC_TRUE].max_entropy = 1; |