[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#5397) syncrepl badly processes modify rdn operation

emmanuel.duru@atosorigin.com wrote:
> Full_Name: Emmanuel Duru
> Version: 2.3.39
> OS: Windows
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (
> When the provider server receives a modify RDN operation, syncrepl replicates it
> with the full new DN as new RDN.
> Trying to investigate it, I see that syncrepl.c:syncrepl_entry() gets the newrdn
> from a call to dnRdn() function, which only modifies the bv_len of the ber
> struct, but not the value itself. Following this, the backend:be_modrdn()
> function does not check the length, and gets the full DN as RDN value (at least
> back_ldap does this).

I see.  In fact, while slapd internally uses bervals consistently, and
honors their length, it is usually accepted that string bervals are
NUL-terminated.  Probably the "right" fix is in syncrepl code, although
the real right fix would consist in rewriting the client API to
consistently use bervals.


Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it