]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/referral.c
ITS#4310 seems to affect also back-ldbm
[openldap] / servers / slapd / back-ldbm / referral.c
index 8c1e8a40882cfce264a2d4c44a9d7e9851f57636..ba3e5fb2ec68c91940337e4cf5c230b4bb9deaa5 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2005 The OpenLDAP Foundation.
+ * Copyright 1998-2006 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -63,7 +63,7 @@ ldbm_back_referrals(
 
                        cache_return_entry_r( &li->li_cache, matched );
 
-               } else if ( default_referral != NULL ) {
+               } else if ( !be_issuffix( op->o_bd, &op->o_req_ndn ) && default_referral != NULL ) {
                        rc = rs->sr_err = LDAP_OTHER;
                        rs->sr_ref = referral_rewrite( default_referral,
                                NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );