[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: DN with semicolon does not work
> At 01:22 PM 5/6/2004, Pierangelo Masarati wrote:
>>The error is in back-bdb/cache.c:339 where a DN is "naively"
>>explored stopping at a DN_SEAPARTOR();
>
> Exploring normalized or unnormalized DN? The latter should
> never be natively explored.
normalized, but explored with an inappropriate test; see below.
>
>>the ';' is a valid
>>rdn separator, and, even in normalized mode, it is not escaped.
>>I see two solutions: use LDAPDN routines to run thru the DN,
>>or always expair escape ';' in DN.
>
> In normalized DNs, the semis in values should be hex escaped
> and the RDN separator should be a comma.
That's what I mean with "naive"; the DN_SEPARATOR() macro was probably
intended as a generic macro and not to be used for that purpose. I
suggest properly escaped semicolons to be left in "pretty" form; it is
guaranteed that a normalized DN will only use commas as rdn separators.
The ndn exploration in back-bdb should be done with LDAP_DN_RDN_SEP() as
defined in libraries/libldap/getdn.c (moved to an appropriate header as
well as those macros that should not be deemed private) instead of
DN_SEPARATOR() as defined in slap.h, which is inappropriate for a
normalized DN.
p.
>
>
>
>
>>p.
>>
>>> I suggest you hack one of the test scripts to demonstrate
>>> the problem and then file an ITS.
>>>
>>> At 12:26 AM 5/6/2004, Michael Ströder wrote:
>>>>HI!
>>>>
>>>>It seems it's not possible to add an entry containing a correctly
>>>> escaped semicolon and read it afterwards. Instead noSuchObject is
>>>> returned. Tested with OPENLDAP_REL_ENG_2_2.
>>>>
>>>>The very same operations work with other LDAP servers.
>>>>
>>>>Ciao, Michael.
>>
>>
>>--
>>Pierangelo Masarati
>>mailto:pierangelo.masarati@sys-net.it
>>
>>
>>
>>
>> SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax:
>> +390382476497
--
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it
SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497