[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: servers/slapd/bind.c, development tree
Sorry for getting back to you sooner... but I've been busy.
I think this assert is fine... but I could be wrong. If your hitting it,
I suggest posting to -devel with details.
Kurt
At 08:14 PM 6/20/00 +0000, Mei-Hui Su wrote:
>Hi,
>
> In servers/slapd/bind.c, for the case for doing sasl_bind, shouldn't the last
>assertion be "== NULL" instead of "!= NULL" because around #360 of sasl.c
>
> if ( sc != SASL_CONTINUE && conn->c_sasl_bind_context != NULL ) {
> sasl_dispose( &conn->c_sasl_bind_context );
> conn->c_sasl_bind_context = NULL;
> }
>
>
>servers/slapd/bind.c:
> ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
>
> edn = NULL;
> rc = sasl_bind( conn, op, dn, ndn, mech, &cred, &edn );
>
> if( rc == LDAP_SUCCESS ) {
> ldap_pvt_thread_mutex_lock( &conn->c_mutex );
>#ifdef HAVE_CYRUS_SASL
> assert( conn->c_sasl_bind_context == NULL );
>#endif
> conn->c_dn = edn;
> if(dn!=NULL) {
> conn->c_cdn = ch_malloc( sizeof( "dn" ) );
> strcpy( conn->c_cdn, dn );
> }
> ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
>
> } else if ( rc == LDAP_SASL_BIND_IN_PROGRESS ) {
>#ifdef HAVE_CYRUS_SASL
> assert( conn->c_sasl_bind_context != NULL );
>#endif
> conn->c_sasl_bind_mech = mech;
> mech = NULL;
>
>#ifdef HAVE_CYRUS_SASL
> } else {
> assert( conn->c_sasl_bind_context != NULL ); <<<----
>#endif
> }
>
> goto cleanup;
>
>mei