]> git.sur5r.net Git - openldap/commitdiff
Fix referral handling bug
authorKurt Zeilenga <kurt@openldap.org>
Thu, 12 Apr 2001 23:02:20 +0000 (23:02 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 12 Apr 2001 23:02:20 +0000 (23:02 +0000)
servers/slapd/back-ldbm/search.c

index 18c89e8384e7126af235eb7b139f468d8338a496..49bd4b2777dcdd87dfc99b8bcc3d6cd86207a1bf 100644 (file)
@@ -78,6 +78,8 @@ ldbm_back_search(
                /* deref dn and get entry with reader lock */
                e = deref_dn_r( be, nbase, &err, &matched, &text );
 
+               if( err == LDAP_NO_SUCH_OBJECT ) err = LDAP_REFERRAL;
+
        } else {
                /* get entry with reader lock */
                e = dn2entry_r( be, nbase, &matched );
@@ -97,6 +99,7 @@ ldbm_back_search(
                                : NULL;
 
                        cache_return_entry_r( &li->li_cache, matched );
+
                } else {
                        refs = default_referral;
                }