Anthony,<div><br><div class="gmail_quote">On Sun, Jun 6, 2010 at 3:19 PM, Anthony Iliopoulos <span dir="ltr"><<a href="mailto:ailiop@lsu.edu">ailiop@lsu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Pedro,<br>
<div class="im"><br>
On Sun, Jun 06, 2010 at 11:24:50AM +0200, Pedro Fortuny Ayuso wrote:<br>
> Anthony,<br>
><br>
> Yes, I did isolate the fault: it is the crypt() call for sure. Most probably<br>
> it is the<br>
> sshd thread context thing you mention (it is the only way I have tried to<br>
> run it so far).<br>
> As a matter of fact I tried to use also OpenSSL's BIOs and got another<br>
> segfault when calling BIO_free() (all this in through sshd), which makes<br>
> me think the thread context is the key to the problem.<br>
><br>
> I shall try and use the crypt_r version. However, could you point me<br>
> to some place where this thread context of sshd is explained? Is there a way<br>
<br>
</div>I don't believe there's any better explanation other than the source code,<br>
see auth-pam.c in any openssh portable release tree.<br>
<div class="im"><br>
> to replicate crypt() using OpenSSL?<br>
<br>
</div>There are several ways to replicate crypt() via OpenSSL, see<br>
<a href="http://www.openssl.org/docs/crypto/des.html" target="_blank">http://www.openssl.org/docs/crypto/des.html</a>, I assume DES_fcrypt<br>
is probably what you need.<br>
<br>
> Thanks a lot,<br>
><br>
> Pedro.<br>
<br>
Hope that helps,<br>
<br>
Regards,<br>
<font color="#888888">Anthony<br>
</font><div><div></div><div class="h5"><br></div></div></blockquote><div> </div></div><div>Well, it is nice to get this kind of help.</div><div><br></div><div>I have just checked the DES_  family's documentation and yes,</div>
<div><br></div><div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; ">==DES_fcrypt: </span>is a fast version of the Unix <code>crypt(3)</code> function.</div><div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; ">==(...) This function is thread safe, unlike the normal crypt</span></div>
<div><font class="Apple-style-span" face="'Times New Roman'"><span class="Apple-style-span" style="font-size: medium; ">(by the way, DES_crypt seems to do the trick as well)</span></font></div><div><br></div><div>
About to read pam-auth.c in detail, but I guess my problems are solved</div><div>by now. I'll keep this thread posted anyway, for completeness.</div><div><br></div><div>Thanks a lot and all the best,</div><div><br></div>
<div>Pedro.</div><br clear="all"><br>-- <br>Pedro Fortuny Ayuso<br>Dpto de Matemáticas<br>Escuela Univ. de Ingeniería Técnica Industrial<br>Campus Universitario de Gijón (Viesques)<br>33203 Gijón (Asturias)<br><br>
</div>