Re: apr_generate_random_bytes() blocks forever

2003-04-17 Thread William A. Rowe, Jr.
At 10:59 AM 4/17/2003, Ben Laurie wrote: >> >> 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 h

Re: apr_generate_random_bytes() blocks forever

2003-04-17 Thread Ben Laurie
Greg Stein wrote: > 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 shoul

Re: [PATCH] Re: apr_generate_random_bytes() blocks forever

2003-04-17 Thread Ben Laurie
Joe Orton wrote: > Index: test/testrand.c > === > RCS file: /home/cvs/apr/test/testrand.c,v > retrieving revision 1.10 > diff -u -r1.10 testrand.c > --- test/testrand.c 1 Jan 2003 00:01:56 - 1.10 > +++ test/testrand.c 16

Re: apr_generate_random_bytes() blocks forever

2003-04-17 Thread Greg Stein
On Wed, Apr 16, 2003 at 10:50:17AM +0100, David Reid wrote: >... > > Subversion, right now, needs to generate some poor-quality > > pseudorandom bits, and it *cannot* block. Yes, it's a bit unusual, > > but not an outrageous request. > > Are you sure? Once more it's altering apr to accomodate SVN

Re: apr_generate_random_bytes() blocks forever

2003-04-17 Thread Greg Stein
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 gen

Re: apr_generate_random_bytes() blocks forever

2003-04-16 Thread Ben Collins-Sussman
Ben Laurie <[EMAIL PROTECTED]> writes: > Ben Collins-Sussman wrote: > > He did give a very detailed overview of his proposed API, if you go > > back read his original response. The problem is that I haven't the > > first idea of how to start implementing it. And his API seems to > > Well, I'll

RE: apr_generate_random_bytes() blocks forever

2003-04-16 Thread Sander Striker
> From: Ben Laurie [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 16, 2003 2:11 PM > Ben Collins-Sussman wrote: > > He did give a very detailed overview of his proposed API, if you go > > back read his original response. The problem is that I haven't the > > first idea of how to start impleme

Re: apr_generate_random_bytes() blocks forever

2003-04-16 Thread Ben Laurie
Ben Collins-Sussman wrote: > He did give a very detailed overview of his proposed API, if you go > back read his original response. The problem is that I haven't the > first idea of how to start implementing it. And his API seems to Well, I'll worry about how to implement it, but... > focus on

[PATCH] Re: apr_generate_random_bytes() blocks forever

2003-04-16 Thread Joe Orton
On Wed, Apr 16, 2003 at 10:50:17AM +0100, David Reid wrote: > > "David Reid" <[EMAIL PROTECTED]> writes: > > > > > Ben's point is more (I think) that if we say we're providing randomness > then > > > we should provide that. > > > > But a caller isn't allowed to *explicitly* ask for poor-quality, >

Re: apr_generate_random_bytes() blocks forever

2003-04-16 Thread David Reid
> "David Reid" <[EMAIL PROTECTED]> writes: > > > Ben's point is more (I think) that if we say we're providing randomness then > > we should provide that. > > But a caller isn't allowed to *explicitly* ask for poor-quality, > non-blocking randomness? Why not? If the word "randomness" bothers > pe

Re: apr_generate_random_bytes() blocks forever

2003-04-15 Thread Ben Collins-Sussman
"David Reid" <[EMAIL PROTECTED]> writes: > Ben's point is more (I think) that if we say we're providing randomness then > we should provide that. But a caller isn't allowed to *explicitly* ask for poor-quality, non-blocking randomness? Why not? If the word "randomness" bothers people, then let

Re: apr_generate_random_bytes() blocks forever

2003-04-15 Thread David Reid
Ben's point is more (I think) that if we say we're providing randomness then we should provide that. Bear in mind that APR could be used for a lot of things, and having a potentially very weak random function isn't going to cut it in a lot of places. FWIW I've seen the sort of api that Ben alludes

Re: apr_generate_random_bytes() blocks forever

2003-04-14 Thread Ben Collins-Sussman
Ben Laurie <[EMAIL PROTECTED]> writes: > Karl Fogel wrote: > > Branko Äibej <[EMAIL PROTECTED]> writes: > > > >>>Or gstein has suggested that apr_generate_random_bytes() can grow a > >>>new flag, indicating urandom is preferred. > >> > >>That would look weird to APR users on systems that have neve

Re: apr_generate_random_bytes() blocks forever

2003-03-13 Thread Aaron Bannert
You just need to get your machine to gather entropy from more sources. It's not like you create repositories that often, right? I could see us having a flag to ask for blocking good entropy or non-blocking not-as-good entropy. -aaron On Tuesday, March 11, 2003, at 02:31 PM, Ben Collins-Sussman wro

Re: apr_generate_random_bytes() blocks forever

2003-03-12 Thread Greg Stein
On Wed, Mar 12, 2003 at 08:23:21PM +, Ben Laurie wrote: > Karl Fogel wrote: > > Branko Cibej <[EMAIL PROTECTED]> writes: > > > >>>Or gstein has suggested that apr_generate_random_bytes() can grow a > >>>new flag, indicating urandom is preferred. Actually, when we were talking, I was thinking

Re: apr_generate_random_bytes() blocks forever

2003-03-12 Thread Ben Laurie
Karl Fogel wrote: Branko Äibej <[EMAIL PROTECTED]> writes: Or gstein has suggested that apr_generate_random_bytes() can grow a new flag, indicating urandom is preferred. That would look weird to APR users on systems that have never heard of /dev/random and /dev/urandom (several come to mind, all of

Re: apr_generate_random_bytes() blocks forever

2003-03-12 Thread Ben Collins-Sussman
Joe Orton <[EMAIL PROTECTED]> writes: > > apr_generate_random_bytes(buf, length, dont_block); > > > > On systems where blocking is not a problem, the `dont_block' parameter > > would simply have no effect. But the question is, are there systems > > where blocking is a problem, but there's n

Re: apr_generate_random_bytes() blocks forever

2003-03-12 Thread Joe Orton
On Tue, Mar 11, 2003 at 05:16:23PM -0600, Karl Fogel wrote: > Branko Äibej <[EMAIL PROTECTED]> writes: > > >Or gstein has suggested that apr_generate_random_bytes() can grow a > > >new flag, indicating urandom is preferred. > > > > That would look weird to APR users on systems that have never heard

Re: apr_generate_random_bytes() blocks forever

2003-03-11 Thread Karl Fogel
Branko Äibej <[EMAIL PROTECTED]> writes: > >Or gstein has suggested that apr_generate_random_bytes() can grow a > >new flag, indicating urandom is preferred. > > That would look weird to APR users on systems that have never heard of > /dev/random and /dev/urandom (several come to mind, all of which

Re: apr_generate_random_bytes() blocks forever

2003-03-11 Thread Joe Orton
On Tue, Mar 11, 2003 at 10:48:05PM +0100, Branko Äibej wrote: > Ben Collins-Sussman wrote: > > >Joe Orton <[EMAIL PROTECTED]> writes: > > > > > > > >>>Sander says there was a long thread about this, about how people > >>>wanted "strong random", but now we're stuck with a situation where > >>>apr

Re: apr_generate_random_bytes() blocks forever

2003-03-11 Thread Cliff Woolley
On Tue, 11 Mar 2003, Ben Collins-Sussman wrote: > Shouldn't apr_generate_random_bytes() being using /dev/urandom instead? > According to thom, ./configure picks up 'random' before 'urandom', and > substitutes whichever it finds first. I think this is a Bad Thing. > urandom should be preferred, no

Re: apr_generate_random_bytes() blocks forever

2003-03-11 Thread Branko Äibej
Ben Collins-Sussman wrote: >Joe Orton <[EMAIL PROTECTED]> writes: > > > >>>Sander says there was a long thread about this, about how people >>>wanted "strong random", but now we're stuck with a situation where >>>apr_uuid_get() can block indefinitely... :-( >>> >>> >>Workarounds are: >>

Re: apr_generate_random_bytes() blocks forever

2003-03-11 Thread Ben Collins-Sussman
Joe Orton <[EMAIL PROTECTED]> writes: > > Sander says there was a long thread about this, about how people > > wanted "strong random", but now we're stuck with a situation where > > apr_uuid_get() can block indefinitely... :-( > > Workarounds are: > > 1. configure --with-devrandom=/dev/urandom

Re: apr_generate_random_bytes() blocks forever

2003-03-11 Thread Joe Orton
On Tue, Mar 11, 2003 at 02:31:32PM -0800, Ben Collins-Sussman wrote: > RedHat 7.2 machine, I just built the latest Subverison > 0.19 sourceball: I can't create a new repository now. 'svnadmin > create' just sits forever, waiting for /dev/random to decide it has > enough entropy. The APR behavio

apr_generate_random_bytes() blocks forever

2003-03-11 Thread Ben Collins-Sussman
RedHat 7.2 machine, I just built the latest Subverison 0.19 sourceball: I can't create a new repository now. 'svnadmin create' just sits forever, waiting for /dev/random to decide it has enough entropy. This is because 'svnadmin create' is trying to generate a repository UUID (apr_uuid_get()),