From: Howard Chu Date: Fri, 9 Dec 2005 01:20:05 +0000 (+0000) Subject: Fix ITS#4084, onelevel searches cannot return NO_SUCH_OBJECT if the base X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~621 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b81ed2c106f062d1a8c22676f73f9e4c861bd8b1;p=openldap Fix ITS#4084, onelevel searches cannot return NO_SUCH_OBJECT if the base was already found. --- diff --git a/servers/slapd/backglue.c b/servers/slapd/backglue.c index ec2f78ac17..5102fac5d1 100644 --- a/servers/slapd/backglue.c +++ b/servers/slapd/backglue.c @@ -321,6 +321,9 @@ glue_op_search ( Operation *op, SlapReply *rs ) op->o_req_dn = op->o_bd->be_suffix[0]; op->o_req_ndn = op->o_bd->be_nsuffix[0]; rs->sr_err = op->o_bd->be_search(op, rs); + if ( rs->sr_err == LDAP_NO_SUCH_OBJECT ) { + gs.err = LDAP_SUCCESS; + } } else if (scope0 == LDAP_SCOPE_SUBTREE && dn_match(&op->o_bd->be_nsuffix[0], &ndn))