From: Pierangelo Masarati Date: Sat, 12 May 2007 13:07:17 +0000 (+0000) Subject: don't try to lookup a database when there's no request DN X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~493 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d12592ca3c2e981ae4c363f3488bb6260899563d;p=openldap don't try to lookup a database when there's no request DN --- diff --git a/servers/slapd/back-relay/op.c b/servers/slapd/back-relay/op.c index d082aeda44..f90c145a96 100644 --- a/servers/slapd/back-relay/op.c +++ b/servers/slapd/back-relay/op.c @@ -60,7 +60,7 @@ relay_back_select_backend( Operation *op, SlapReply *rs, int err ) relay_back_info *ri = (relay_back_info *)op->o_bd->be_private; BackendDB *bd = ri->ri_bd; - if ( bd == NULL ) { + if ( bd == NULL && !BER_BVISNULL( &op->o_req_ndn ) ) { bd = select_backend( &op->o_req_ndn, 0, 1 ); if ( bd == op->o_bd ) { if ( err > LDAP_SUCCESS ) { @@ -136,13 +136,12 @@ relay_back_op_bind( Operation *op, SlapReply *rs ) int relay_back_op_unbind( Operation *op, SlapReply *rs ) { - relay_back_info *ri = (relay_back_info *)op->o_bd->be_private; BackendDB *bd; int rc = 1; - bd = ri->ri_bd; + bd = relay_back_select_backend( op, rs, LDAP_SUCCESS ); if ( bd == NULL ) { - bd = select_backend( &op->o_req_ndn, 0, 1 ); + return 1; } if ( bd && bd->be_unbind ) {