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

Re: Leading spaces in DN



> On Tue, May 06, 2003 at 09:33:16AM -0700, Kurt D. Zeilenga wrote:
>
>> At 07:59 AM 5/6/2003, Marian Eichholz wrote:
>
>> >The following two entries don't work, because they are called
>> identical by slapadd (2.1.17):
>> >
>> >dn: cn=EMO,dc=addressbook,o=mehome
>> >dn: cn=\20EMO,dc=addressbook,o=mehome
>>
>> They are considered equal because they are equal per the
>> applicable matching rules.  This is not OpenLDAP Software
>> bug.
>>
>> Kurt
>
> Thank You Kurt.
>
> So I have contradicting interpretations, how leading significant spaces
> have to be quoted in DNs.

There is no contradiction:

a) if you need to quote a space in a DN you may use "\ " or "\20";

b) matching rules for the "cn" value ignore the leading/trailing
spaces.

So,

dn: cn=EMO

and

dn: cn=\ EMO

are different DNs as per the DN string representation,
but when their value is compared, they are equal as per the
"cn" value matching.

Point (a) has to do with string representations of DNs; it says
how a DN may legally contain a value, regardless of its semantics

Point (b) has to do with how the type "cn" is compared, so is
not related to DN string representation, but rather to attribute
matching rules, something a DN string representation has nothing
to deal with.

>
> What is Your interpretation of that issue?
>
> We just need to have a leading space in a DN attribute value, top
> specify it in the LDIF file and to retrieve it in an LDAP lookup.

Then, use

dn: cn=\ EMO

and don't use

dn: cn=EMO

p.

-- 
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it