On Thu, Oct 28, 1999, [EMAIL PROTECTED] wrote:
> Full_Name: Matthias Loepfe
> Version: mod_ssl-2.3.9
> OS: Solaris 2.6
> Submission from: (NULL) (193.192.235.3)
>
> In the builtin passphrase getter a magic constant STDERR_FILENO_STORE
> is used to as the fd to store the stderr fd during passphrase getting.
>
> The problem is, that it is possible that this fd (10) is already in use.
> What then happens is dependend on the use of the fd 10. In my case
> where we have a logrotater configured for the 3 logs, the fd 10 is
> used for the certificate beeing processed. This leads to a situation
> where after reading the passphrase a read(10, ..) blocks the process.
>
> I would propose NOT to use dup2() in this situation but to use the
> normal dup() which uses the first FREE file descriptor, store it and
> use it instead of the magic constant.
Yes, the problem is just that I tried dup() one year ago when I wrote this
stuff and it didn't worked on all my test machines. It was totally confusing
and against my knowledge of dup(), but the only thing which definetely worked
in all Unix platforms was the dup2() approach. So I decided to go this way,
although you're right that the fixed filedescriptor number is nasty. If
someone has time it would be nice to change it to dup() and try it out on lots
of Unix platforms again. In the meantime I don't want to risk anything, of
course. But perhaps we at least can increase the number 10 to say 50 or 100?
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]