Date: Sat, 23 Jul 2005 06:08:10 +0400 From: Andrey Chernov <ache@FreeBSD.ORG> To: "Greg 'groggy' Lehey" <grog@FreeBSD.ORG> Cc: cvs-src@FreeBSD.ORG, src-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/games/fortune/fortune fortune.c Message-ID: <20050723020810.GA28712@nagual.pp.ru> In-Reply-To: <20050723020120.GV842@wantadilla.lemis.com> References: <200507230146.j6N1koqL061690@repoman.freebsd.org> <20050723015517.GA28428@nagual.pp.ru> <20050723020120.GV842@wantadilla.lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 23, 2005 at 11:31:20AM +0930, Greg 'groggy' Lehey wrote: > No, it was there: >=20 > init_prob(); > - srandomdev(); > + gettimeofday (&now, NULL); > + srandom (now.tv_usec); >=20 > But for whatever reasons, many systems seem to have incorrect > random(4) initialization. You'll recall the debate about removing If you care about many systems, please do not degrade our own FreeBSD=20 system fortune randomness and use this workaround instead: #ifdef __FreeBSD__ srandomdev(); #else gettimeofday (&now, NULL); srandom (now.tv_usec); #endif > Rush Limbaugh fortunes recently because, for some reason related to > this issue, his fortunes kept popping up. This is the only place It means something wrong with /dev/random initialization, probably not=20 enough startup randomness. Use rc-embedded ability to keep randomness=20 around boots and add more random sources instead. You fix the problem in the wrong place. We have a _lots_ of places where=20 srandomdev() or arc4random() used (which both use /dev/random) --=20 http://ache.pp.ru/ --k1lZvvs/B4yU6o8G Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iQCVAwUBQuGmiuJgpPLZnQjrAQIcwQP/f2ztCRF/GA7sVfoK8wE+UsQMxAT2fUiG CNblXBYQU1H6nUKbn2fxIIhUz3h1+r+aXwV60mVL0BkiJyB1MWPHY1HPV1wdBdTJ AiLLIh4eieToXyndooPzuGxxXkWZgZglFFEMMuGPO8bIdV8Dg2ChJRcaB8b86l6E Jcy98R8yjZQ= =1xEu -----END PGP SIGNATURE----- --k1lZvvs/B4yU6o8G--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050723020810.GA28712>