From 34fde82589585765d8192ca05e85d79151609a3c Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Wed, 21 Feb 2007 14:17:25 +0000 Subject: [PATCH] fix in-directory retcode lookup --- servers/slapd/overlays/retcode.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/servers/slapd/overlays/retcode.c b/servers/slapd/overlays/retcode.c index 4c8af88986..a1e655ed95 100644 --- a/servers/slapd/overlays/retcode.c +++ b/servers/slapd/overlays/retcode.c @@ -202,11 +202,11 @@ retcode_cb_response( Operation *op, SlapReply *rs ) { retcode_cb_t *rdc = (retcode_cb_t *)op->o_callback->sc_private; + op->o_tag = rdc->rdc_tag; if ( rs->sr_type == REP_SEARCH ) { ber_tag_t o_tag = op->o_tag; int rc; - op->o_tag = rdc->rdc_tag; if ( op->o_tag == LDAP_REQ_SEARCH ) { rs->sr_attrs = rdc->rdc_attrs; } @@ -216,7 +216,11 @@ retcode_cb_response( Operation *op, SlapReply *rs ) return rc; } - if ( rs->sr_err == LDAP_SUCCESS ) { + switch ( rs->sr_err ) { + case LDAP_SUCCESS: + case LDAP_NO_SUCH_OBJECT: + /* in case of noSuchObject, stop the internal search + * for in-directory error stuff */ if ( !op->o_abandon ) { rdc->rdc_flags = SLAP_CB_CONTINUE; } @@ -301,7 +305,7 @@ retcode_op_func( Operation *op, SlapReply *rs ) case LDAP_REQ_BIND: /* skip if rootdn */ if ( be_isroot_pw( op ) ) { - return SLAP_CB_CONTINUE; + return LDAP_SUCCESS; } return retcode_op_internal( op, rs ); -- 2.39.5