openbsd-ports/www/lighttpd/patches/patch-src_server_c

13 lines
670 B
Plaintext

$OpenBSD: patch-src_server_c,v 1.8 2010/08/18 11:16:55 sthen Exp $
--- src/server.c.orig Sat Aug 7 07:00:16 2010
+++ src/server.c Sun Aug 8 22:18:55 2010
@@ -211,7 +211,7 @@ static server *server_init(void) {
srv->mtime_cache[i].str = buffer_init();
}
- if ((NULL != (frandom = fopen("/dev/urandom", "rb")) || NULL != (frandom = fopen("/dev/random", "rb")))
+ if ((NULL != (frandom = fopen("/dev/arandom", "rb")) || NULL != (frandom = fopen("/dev/urandom", "rb")))
&& 1 == fread(srv->entropy, sizeof(srv->entropy), 1, frandom)) {
unsigned int e;
memcpy(&e, srv->entropy, sizeof(e) < sizeof(srv->entropy) ? sizeof(e) : sizeof(srv->entropy));