X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fbind.c;h=646b72f657ceec50b444242951c51e4818898a6e;hb=b4e1ea15f3081a065318f5ee99336494c8765bca;hp=9d8f6ba159786fa900a97ebddd1d28411befb35f;hpb=6f8a3919a19f64c0837679a7c865ba7f50502b1b;p=openldap diff --git a/servers/slapd/bind.c b/servers/slapd/bind.c index 9d8f6ba159..646b72f657 100644 --- a/servers/slapd/bind.c +++ b/servers/slapd/bind.c @@ -232,7 +232,6 @@ do_bind( } /* 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 ) { @@ -278,7 +277,7 @@ do_bind( 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); } @@ -311,7 +310,7 @@ do_bind( } 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 ); } @@ -542,7 +541,7 @@ do_bind( 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 ); } @@ -574,10 +573,7 @@ do_bind( } 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 );