[core] defer li_rand_init() until first use
commit28c8fec42bf344cdc6239c6a01dff8959810d158
authorGlenn Strauss <gstrauss@gluelogic.com>
Fri, 9 Dec 2016 07:17:52 +0000 (9 02:17 -0500)
committerGlenn Strauss <gstrauss@gluelogic.com>
Fri, 9 Dec 2016 07:17:52 +0000 (9 02:17 -0500)
tree7366c70386d9545197602327c58e686f943c6f14
parent544ccee5e1ccd235f392c72129fd21938a9aa706
[core] defer li_rand_init() until first use

defer li_rand_init() until first use of li_rand_pseudo_bytes()

li_rand_init() is now deferred until first use so that installations
that do not use modules which use these routines do need to potentially
block at startup.  Current use by core lighttpd modules is in mod_auth
HTTP Digest auth and in mod_usertrack.  Deferring collection of random
data until first use may allow sufficient entropy to be collected by
kernel before first use, helping reduce or avoid situations in
low-entropy-generating embedded devices which might otherwise block
lighttpd for minutes at device startup.  Further discussion in
https://redmine.lighttpd.net/boards/2/topics/6981
src/rand.c