]> git.sur5r.net Git - openldap/commitdiff
Fix ITS#4084, onelevel searches cannot return NO_SUCH_OBJECT if the base
authorHoward Chu <hyc@openldap.org>
Fri, 9 Dec 2005 01:20:05 +0000 (01:20 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 9 Dec 2005 01:20:05 +0000 (01:20 +0000)
was already found.

servers/slapd/backglue.c

index ec2f78ac17d95fd5643cd55ad65b15cbefdbd69b..5102fac5d18edfcae5bc5d7f04eb6e7be369882c 100644 (file)
@@ -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))