Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 61348 invoked by uid 500); 17 Apr 2003 08:35:36 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 61333 invoked from network); 17 Apr 2003 08:35:34 -0000 X-Authentication-Warning: kurgan.lyra.org: gstein set sender to gstein@lyra.org using -f Date: Thu, 17 Apr 2003 01:36:11 -0700 From: Greg Stein To: Ben Collins-Sussman Cc: dev@apr.apache.org Subject: Re: apr_generate_random_bytes() blocks forever Message-ID: <20030417083611.GC19066@lyra.org> Mail-Followup-To: Ben Collins-Sussman , dev@apr.apache.org References: <20030311213316.GA1427@manyfish.co.uk> <86hea9tr0d.fsf@kepler.ch.collab.net> <3E6E5995.4080606@xbc.nu> <85hea9xznc.fsf@newton.ch.collab.net> <3E6F9739.9060409@algroup.co.uk> <861y04961u.fsf@kepler.ch.collab.net> <00f101c302f1$878d3ca0$7500a8c0@goliath> <86znmr3loh.fsf@kepler.ch.collab.net> <3E9D485A.9090607@algroup.co.uk> <86vfxecu8k.fsf@kepler.ch.collab.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86vfxecu8k.fsf@kepler.ch.collab.net> User-Agent: Mutt/1.4i X-URL: http://www.lyra.org/greg/ X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Wed, Apr 16, 2003 at 10:55:23AM -0500, Ben Collins-Sussman wrote: >... > So perhaps svn_repos_create() shouldn't be calling apr_uuid_get() at > all? Perhaps svn should have its own pseudorandom-nonblocking uuid > generator? Perhaps APR could grow one? SVN should absolutely NOT grow a UUID generator. Don't even start thinking along those lines. That is squarely in the realm of APR, as it can simply defer to Windows's builtin function for that platform. I think some unix platforms actually have it, but APR just rolls its own according to the spec. To answer Ben Laurie's question: we could probably use rand() if it was at all reasonably seeded. I'd have to trace the logic again, but I believe we shove the random data (along with other info) thru an MD5 hash to produce some "random" bits. I could be that we hash other stuff, and just use the random data directly. Not sure. In any case, it really doesn't need cryptographic random data, but it should at least have a well-seeded rand() value. Cheers, -g -- Greg Stein, http://www.lyra.org/