Skip to content
Snippets Groups Projects
Commit 34fde825 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

fix in-directory retcode lookup

parent d130b742
Branches
Tags
No related merge requests found
......@@ -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 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment