in slap_sasl2dn, make sure it's set for base DN searches as well.
in do_bind, don't zero it during multi-stage binds.
* Force to connection to "anonymous" until bind succeeds.
*/
ldap_pvt_thread_mutex_lock( &conn->c_mutex );
+ if ( conn->c_sasl_bind_in_progress ) be = conn->c_authz_backend;
connection2anonymous( conn );
+ if ( conn->c_sasl_bind_in_progress ) conn->c_authz_backend = be;
ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
if ( op->o_dn.bv_val != NULL ) {
uri.scope, LDAP_DEREF_NEVER, 1, 0,
filter, NULL, NULL, 1 );
+FINISHED:
if( dn->bv_len ) {
conn->c_authz_backend = be;
}
-
-FINISHED:
if( uri.dn.bv_len ) ch_free( uri.dn.bv_val );
if( uri.filter.bv_len ) ch_free( uri.filter.bv_val );
if( filter ) filter_free( filter );