[Date Prev][Date Next]
(ITS#5339) wrong referral from back-bdb
Full_Name: Hallvard B Furuseth
Submission from: (NULL) (184.108.40.206)
Submitted by: hallvard
If a referral object's "ref" DN differs from the entry DN, and
you update a subordinate of the referral object, the DN part
of the referral from back-bdb is wrong.
bash$ cat ref.ldif
bash$ ldapadd ... < ref.ldif
adding new entry "o=we"
adding new entry "cn=me,o=we"
ldap_add: Referral (10)
matched DN: o=we
It works if NULL is changed to &e->e_name at back-bdb/referral.c line 96:
rs->sr_ref = referral_rewrite( ref, NULL,
&op->o_req_dn, LDAP_SCOPE_DEFAULT );
I don't quite understand that function though:
Why does it use default_referral (slapd.conf 'referral')? That is for
use when no local backend database handles the operation, which I would
think means no database's be_chk_referrals() gets be called. And indeed
the function uses it if
!be_issuffix( op->o_bd, &op->o_req_ndn )
which looks to me like a test for whether this function is _not_ to be
called for this database.