From fde03d4ba0b04f3dc0e504b99bf4b5a12359f122 Mon Sep 17 00:00:00 2001 From: markm Date: Sun, 14 Jan 2001 17:50:15 +0000 Subject: Remove NOBLOCKRANDOM as a compile-time option. Instead, provide exactly the same functionality via a sysctl, making this feature a run-time option. The default is 1(ON), which means that /dev/random device will NOT block at startup. setting kern.random.sys.seeded to 0(OFF) will cause /dev/random to block until the next reseed, at which stage the sysctl will be changed back to 1(ON). While I'm here, clean up the sysctls, and make them dynamic. Reviewed by: des Tested on Alpha by: obrien --- sys/dev/random/yarrow.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/dev/random/yarrow.c') diff --git a/sys/dev/random/yarrow.c b/sys/dev/random/yarrow.c index d50dcfa..c28fc74 100644 --- a/sys/dev/random/yarrow.c +++ b/sys/dev/random/yarrow.c @@ -184,6 +184,11 @@ random_init(void) mtx_exit(&Giant, MTX_DEF); #endif + /* This can be turned off by the very paranoid + * a reseed will turn it back on. + */ + random_state.seeded = 1; + random_state.gengateinterval = 10; random_state.bins = 10; random_state.pool[0].thresh = 100; -- cgit v1.1