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

Re: escaping double-quotes in dn

Scott Kelley wrote:
> i've been wrestling with an dn that has a double-quote in it:
> dn: cn=first last"bla,ou=bla,o=bla,c=bla
> i can't seem to find the right escape sequence that ldapmodrdn will accept.
> any thoughts on how to get this dn back to:
> dn: cn=first last,ou=bla,o=bla,c=bla
> ldap version: slapd 1.2.13

I'm afraid 1.2.X dn parsing is broken; modrdn is especially
broken so I'm afraid there's little you can do.  Note that 
also 2.0.X was broken somewhere (at least not really consistent
throughout the code).  Things are fixed in HEAD (and 2.1 
which is now in alpha release, beta expected soon).

The correct escaping sequence and ldif format would be

dn: cn=first last\"bla,ou=bla,o=bla,c=bla
changetype: modrdn
newrdn: cn=first last
deleteoldrdn: 1

but I really doubt you'll get anything sane.

Note that this is not the main reason to upgrade your system :)


Dr. Pierangelo Masarati               | voice: +39 02 2399 8309
Dip. Ing. Aerospaziale                | fax:   +39 02 2399 8334
Politecnico di Milano                 |
via La Masa 34, 20156 Milano, Italy   |