[EMAIL PROTECTED] wrote:
>
> On Wed, Jul 28, 1999, [EMAIL PROTECTED] wrote:
>
> > Full_Name: Matthias Loepfe
> > Version: 2.3.9
> > OS: Solaris 2.6
> > Submission from: (NULL) (193.192.235.3)
> >
> > I'm not sure if the following is realy seen as a bug, but I think it
> > is one.
> >
> > If I use the following Option:
> >
> > 'SSLRandomSeed startup exec:bin/truerand 16'
> >
> > The process which get spawned has no command line arguments. This lets
> > the truerand produce randomnumbers till it cannot write any more to
> > stdout (EPIPE). This terminates the truerand and the parent process
> > gets the exit condition and logs it - which I feel is not elegant.
> >
> > I tried to circument it by the following Option which does not work:
> >
> > 'SSLRandomSeed startup exec:"bin/truerand 16" 16
> >
> > There are two solutions:
> >
> > 1. catch the SIG_PIPE in truerand
> > 2. pass the number of expected bytes as a command line arg
>
> Or 3. use a wrapper:
>
> #!/bin/sh
> exec truerand 16
>
> That's how such external programs are usually expected in Apache to look. But
> nevertheless your suggestion isn't silly, of course. I'll look inside the
> code, perhaps there is an easy and non-kludge solution.
>
> Ralf S. Engelschall
> [EMAIL PROTECTED]
> www.engelschall.com
>
> ______________________________________________________________________
> Apache Interface to OpenSSL (mod_ssl) www.modssl.org
> User Support Mailing List [EMAIL PROTECTED]
> Automated List Manager [EMAIL PROTECTED]
I use the following patch to truerand.c:
diff -c truerand.c
/opt/projects/packages/apache/mod_ssl-2.3.9-1.3.6/pkg.contrib/truerand.c
*** truerand.c Wed Jul 28 19:20:35 1999
--- /opt/projects/packages/apache/mod_ssl-2.3.9-1.3.6/pkg.contrib/truerand.c
Tue Jan 26 19:36:28 1999
***************
*** 451,461 ****
return ((int) (*hash)) & 0xff;
}
- static void done(int s)
- {
- exit(0);
- }
-
/*
* Main program
*/
--- 451,456 ----
***************
*** 464,471 ****
{
int count;
- (void) signal(SIGPIPE, done);
-
if (argc == 1)
count = 0;
else
--- 459,464 ----
---------------------------------------------------------
Matthias Loepfe, AdNovum Informatik AG, Roentgenstr. 22, CH-8005 Zurich
Email: [EMAIL PROTECTED] Voice: +41 1 272 6111 Fax: +41 1 272 6312
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]