From owner-freebsd-current@FreeBSD.ORG Sat Jul 23 19:28:06 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F013716A41F for ; Sat, 23 Jul 2005 19:28:06 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail1.fluidhosting.com (mail1.fluidhosting.com [204.14.90.61]) by mx1.FreeBSD.org (Postfix) with SMTP id 346D643D48 for ; Sat, 23 Jul 2005 19:28:06 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 3924 invoked by uid 399); 23 Jul 2005 19:28:05 -0000 Received: from mail1.fluidhosting.com (66.150.201.101) by mail1.fluidhosting.com with SMTP; 23 Jul 2005 19:28:05 -0000 Received: (qmail 69336 invoked by uid 399); 23 Jul 2005 19:28:03 -0000 Received: from unknown (HELO ?192.168.15.101?) (dougb@dougbarton.net@67.20.70.103) by mail1.fluidhosting.com with SMTP; 23 Jul 2005 19:28:03 -0000 Message-ID: <42E29A42.7040203@FreeBSD.org> Date: Sat, 23 Jul 2005 12:28:02 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050722) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "M. Warner Losh" References: <20050723020120.GV842@wantadilla.lemis.com> <42E1DFCE.6090506@FreeBSD.org> <20050723064449.GZ842@wantadilla.lemis.com> <20050723.130941.93453281.imp@bsdimp.com> In-Reply-To: <20050723.130941.93453281.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: grog@freebsd.org, freebsd-current@freebsd.org Subject: Re: cvs commit: src/games/fortune/fortune fortune.c X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jul 2005 19:28:07 -0000 M. Warner Losh wrote: > In message: <20050723064449.GZ842@wantadilla.lemis.com> > "Greg 'groggy' Lehey" writes: > : You should take a look at what I committed. It simply uses the > : microsecond value returned by getlocaltime() for the automatic seeding > : by srandomdev(). It fixes the problem. I can see only two > : explanations: > : > : 1. srandomdev(), random(4) or friends are broken. > : 2. random(4) has been initialized incorrectly. > : > : Currently I'm guessing (2), but I don't care much either way. > > When sradnomdev() is broken, *DO*NOT* kludge around them by committing > half-baked "fixes" like you did. I agree with you in principal Warner, but it's not at all clear that the real problem is srandomdev(). For instance, I just took a look at my laptop and noticed that there was still an old version of the fortunes2 file in /usr/share/games/fortune. The first fortune in that file is the one that I have been seeing with much greater frequency than the others, so I deleted those old files and we'll see what happens from here. I also changed my fortune invocation in my shell startup file to: /usr/games/fortune -D -D -D -sa 2>$HOME/fortune-debug sysctl kern.random.sys.seeded >> $HOME/fortune-debug Hopefully that will tell us something interesting. Doug -- This .signature sanitized for your protection