[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Core dump on Solaris 8 when using sasl-regexp



Okay, the following patch appears to fix the problem. However, I am not an expert programmer, so a review of my code is strongly suggested! Should this pass muster, please incorporate it into the HEAD branch,

Tony

P.S. I am attaching the patch as a file and including it in-line as well.

*** servers/slapd/saslauthz.c   Wed Mar 20 15:06:37 2002
--- servers/slapd/saslauthz.c.orig      Tue Mar  5 06:22:49 2002
***************
*** 59,68 ****
                uri += sizeof("dn:")-1;
                uri += strspn( uri, " " );
                bv.bv_val = uri;
!               /* dnNormalize actually uses input bv_len so
!                * we have to properly set this value.
                 */
! is_dn:                bv.bv_len = strlen(uri);
                rc = dnNormalize2( NULL, &bv, searchbase );
                if (rc == LDAP_SUCCESS) {
                        *scope = LDAP_SCOPE_BASE;
--- 59,68 ----
                uri += sizeof("dn:")-1;
                uri += strspn( uri, " " );
                bv.bv_val = uri;
!               /* FIXME: if dnNormalize actually uses input bv_len we
!                * will have to make this right.
                 */
! is_dn:                bv.bv_len = 1;
                rc = dnNormalize2( NULL, &bv, searchbase );
                if (rc == LDAP_SUCCESS) {
                        *scope = LDAP_SCOPE_BASE;


At 02:29 PM 03/20/2002 -0800, you wrote:
I am attempting to get the HEAD version of LDAP working with GSSAPI. Put
simply, I need the functionality of sasl-regexp. Otherwise, I would
continue with 2.0.23 as it seems to be more stable and fully functional
concerning GSSAPI.

I compiled OpenLDAP against MIT Kerberos 5-1.2.4 and against cyrus-sasl
1.5.27. The server is core dumping when I attempt an authenticated bind
against the server. It appears there is a problem with the sasl-regexp
functionality as the server does NOT crash when I remove this directive.
The tail of the debug (set to level 129) is:

==> sasl_bind: dn="" mech=<continuing> datalen=65
SASL Authorize [conn=0]: authcid="abrock" authzid="<empty>"
slap_sasl_getdn: id=abrock
getdn: u:id converted to uid=abrock,cn=GSSAPI,cn=auth
==>slap_sasl2dn: Converting SASL name uid=abrock,cn=GSSAPI,cn=auth to a DN
slap_sasl_regexp: converting SASL name uid=abrock,cn=GSSAPI,cn=auth
slap_sasl_regexp: converted SASL name to uid=abrock,dc=GEORGEFOX,dc=EDU
slap_parseURI: parsing uid=abrock,dc=GEORGEFOX,dc=EDU
 >>> dnNormalize: <uid=abrock,dc=GEORGEFOX,dc=EDU>
=> ldap_bv2dn(uid=abrock,dc=GEORGEFOX,dc=EDU,0)
<= ldap_bv2dn(uid=abrock,dc=GEORGEFOX,dc=EDU,0)=0
Assertion failed: strlen( val->bv_val ) == val->bv_len, file dn.c, line 381

Advise is appreciated!

Tony


****************************************************************************** * Anthony Brock abrock@georgefox.edu * * Director of Network Services George Fox University * ******************************************************************************

****************************************************************************** * Anthony Brock abrock@georgefox.edu * * Director of Network Services George Fox University * ******************************************************************************

Attachment: saslauthz.patch
Description: Binary data