]> git.sur5r.net Git - openldap/commitdiff
fix referral rewriting (ITS#4548)
authorPierangelo Masarati <ando@openldap.org>
Tue, 16 May 2006 00:57:46 +0000 (00:57 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 16 May 2006 00:57:46 +0000 (00:57 +0000)
servers/slapd/back-bdb/referral.c

index 97305f9f54ea0d0b0bf2560cc2b749c610aaf065..168da4677d54275fcad90ddae900b930be368ef7 100644 (file)
@@ -91,8 +91,11 @@ dn2entry_retry:
                                (long) op->o_tag, op->o_req_dn.bv_val, e->e_name.bv_val );
 
                        if( is_entry_referral( e ) ) {
+                               BerVarray ref = get_entry_referrals( op, e );
                                rc = LDAP_OTHER;
-                               rs->sr_ref = get_entry_referrals( op, e );
+                               rs->sr_ref = referral_rewrite( ref, NULL,
+                                       &op->o_req_dn, LDAP_SCOPE_DEFAULT );
+                               ber_bvarray_free( ref );
                                if ( rs->sr_ref ) {
                                        rs->sr_matched = ber_strdup_x(
                                        e->e_name.bv_val, op->o_tmpmemctx );