From: Howard Chu Date: Tue, 29 Aug 2006 01:19:34 +0000 (+0000) Subject: Only set c_sasl_bindop on actual SASL binds X-Git-Tag: OPENLDAP_REL_ENG_2_3_MP~246 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cf47d334590ac18e28502ddaed384e83550115c7;p=openldap Only set c_sasl_bindop on actual SASL binds --- diff --git a/servers/slapd/bind.c b/servers/slapd/bind.c index fb7aef6951..24074d36a9 100644 --- a/servers/slapd/bind.c +++ b/servers/slapd/bind.c @@ -232,9 +232,6 @@ fe_op_bind( Operation *op, SlapReply *rs ) goto cleanup; } - /* Set the bindop for the benefit of in-directory SASL lookups */ - op->o_conn->c_sasl_bindop = op; - if ( op->orb_method == LDAP_AUTH_SASL ) { if ( op->o_protocol < LDAP_VERSION3 ) { Debug( LDAP_DEBUG_ANY, "do_bind: sasl with LDAPv%ld\n", @@ -269,6 +266,10 @@ fe_op_bind( Operation *op, SlapReply *rs ) } else { ber_dupbv(&op->o_conn->c_sasl_bind_mech, &op->orb_tmp_mech); } + + /* Set the bindop for the benefit of in-directory SASL lookups */ + op->o_conn->c_sasl_bindop = op; + ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex ); rs->sr_err = slap_sasl_bind( op, rs );