The following reply was made to PR mod_auth-any/4967; it has been noted by 
GNATS.

From: Dirk-Willem van Gulik <[EMAIL PROTECTED]>
To: "Life is hard, and then you die." <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Subject: Re: mod_auth-any/4967: Can't read from /dev/random (fwd)
Date: Wed, 8 Sep 1999 18:15:34 +0200 (CEST)

 On Wed, 8 Sep 1999, Life is hard, and then you die. wrote:
 
 ...
 
 > I think I got it now. Yes, random(4) seems to be non-blocking, returning
 > 0 bytes when not enough entropy is available. The problem is that when
 > you use the stdio stuff fread() interprets a return of 0 as EOF, sets
 > its internal EOF flag, and then always returns 0 and never goes to the
 > underlying read() again. Hence the problem.
 
 Yep, that sounds correct.. you worded it better than me. This was what I
 was trying to convey.
  
 > Well, ok, I'll have to change to raw read as suggested in the report.
 
 Hmm.. let's see. You propably are doing a read for _each_ and every child
 as you are starting up.. whichis propably why the random(4) gets exhausted
 so quickly during server init.
 
 Now all we require is an unpredictable number. It does not need to be
 random at all. Perhaps during initial config we can _once_ read the value
 and then use a one way function, say md5, to seed each child on the second
 init of the actual forked of processes; just adding a few bits (say the
 PID) is enough as long as the function is one way enough. MD5 should be.
 
 Dw
 

Reply via email to