]> git.sur5r.net Git - openldap/commitdiff
Only set c_sasl_bindop on actual SASL binds
authorQuanah Gibson-Mount <quanah@openldap.org>
Wed, 20 Sep 2006 19:21:41 +0000 (19:21 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Wed, 20 Sep 2006 19:21:41 +0000 (19:21 +0000)
servers/slapd/bind.c

index 7be6f499adf4d72924373f50acfae73b271a0ff3..f98618c2df092e4ea2dff89bf21a5ec2e81596c3 100644 (file)
@@ -233,9 +233,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",
@@ -270,6 +267,10 @@ fe_op_bind( Operation *op, SlapReply *rs )
                } else {
                        ber_dupbv(&op->o_conn->c_sasl_bind_mech, &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 );