}
/* Set the bindop for the benefit of in-directory SASL lookups */
- ldap_pvt_thread_mutex_lock( &conn->c_sasl_bindmutex );
conn->c_sasl_bindop = op;
if ( method == LDAP_AUTH_SASL ) {
ldap_pvt_thread_mutex_lock( &conn->c_mutex );
if ( conn->c_sasl_bind_in_progress ) {
- if((ber_bvcmp(&conn->c_sasl_bind_mech, &mech) != 0)) {
+ if( !bvmatch( &conn->c_sasl_bind_mech, &mech ) ) {
/* mechanism changed between bind steps */
slap_sasl_reset(conn);
}
}
if( conn->c_dn.bv_len != 0 ) {
- ber_len_t max = sockbuf_max_incoming;
+ ber_len_t max = sockbuf_max_incoming_auth;
ber_sockbuf_ctrl( conn->c_sb,
LBER_SB_OPT_SET_MAX_INCOMING, &max );
}
ndn.bv_len = 0;
if( conn->c_dn.bv_len != 0 ) {
- ber_len_t max = sockbuf_max_incoming;
+ ber_len_t max = sockbuf_max_incoming_auth;
ber_sockbuf_ctrl( conn->c_sb,
LBER_SB_OPT_SET_MAX_INCOMING, &max );
}
}
cleanup:
- if( conn->c_sasl_bindop != NULL ) {
- conn->c_sasl_bindop = NULL;
- ldap_pvt_thread_mutex_unlock( &conn->c_sasl_bindmutex );
- }
+ conn->c_sasl_bindop = NULL;
if( pdn.bv_val != NULL ) {
free( pdn.bv_val );