From: Kurt Zeilenga Date: Thu, 12 Apr 2001 23:02:20 +0000 (+0000) Subject: Fix referral handling bug X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1475 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7537abfb06ab906d8cecf77cc3cac2e691063579;p=openldap Fix referral handling bug --- diff --git a/servers/slapd/back-ldbm/search.c b/servers/slapd/back-ldbm/search.c index 18c89e8384..49bd4b2777 100644 --- a/servers/slapd/back-ldbm/search.c +++ b/servers/slapd/back-ldbm/search.c @@ -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; }