]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/bind.c
fix database operations in tool mode (ITS#3622)
[openldap] / servers / slapd / bind.c
index 84ae197eded45eb45730a56b961be2eac12111f4..c39caea9f64e37be8a26d0ead16d2685e5fa49bd 100644 (file)
@@ -464,7 +464,9 @@ fe_op_bind( Operation *op, SlapReply *rs )
                /* don't return referral for bind requests */
                /* noSuchObject is not allowed to be returned by bind */
                rs->sr_err = LDAP_INVALID_CREDENTIALS;
+               op->o_bd = frontendDB;
                send_ldap_result( op, rs );
+               op->o_bd = NULL;
                goto cleanup;
        }
 
@@ -594,6 +596,7 @@ fe_op_bind( Operation *op, SlapReply *rs )
 
                } else if ( !BER_BVISNULL( &op->orb_edn ) ) {
                        free( op->orb_edn.bv_val );
+                       BER_BVZERO( &op->orb_edn );
                }
 
        } else {