]> git.sur5r.net Git - openldap/commitdiff
More backglue fix: do not return NO_SUCH_OBJECT when the base object is located above...
authorJong Hyuk Choi <jongchoi@openldap.org>
Mon, 14 Jun 2004 23:41:13 +0000 (23:41 +0000)
committerJong Hyuk Choi <jongchoi@openldap.org>
Mon, 14 Jun 2004 23:41:13 +0000 (23:41 +0000)
servers/slapd/backglue.c

index c7e9543e33f6f39702ea5253cfd0c10c27754a35..c7f10b058f41afb908b4c13d90fe9ece53f0e504 100644 (file)
@@ -349,12 +349,20 @@ glue_back_search ( Operation *op, SlapReply *rs )
                                op->o_req_ndn = op->o_bd->be_nsuffix[0];
                                rs->sr_err = op->o_bd->be_search(op, rs);
 
+                       } else if (scope0 == LDAP_SCOPE_SUBTREE &&
+                               dn_match(&op->o_bd->be_nsuffix[0], &ndn))
+                       {
+                               rs->sr_err = op->o_bd->be_search( op, rs );
+
                        } else if (scope0 == LDAP_SCOPE_SUBTREE &&
                                dnIsSuffix(&op->o_bd->be_nsuffix[0], &ndn))
                        {
                                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 (dnIsSuffix(&ndn, &op->o_bd->be_nsuffix[0])) {
                                rs->sr_err = op->o_bd->be_search( op, rs );