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

Re: (ITS#5390) Error while parsing a schema



Howard Chu wrote:
> Emmanuel Lecharny wrote:
>> Howard Chu wrote:
>>> There's no bug here, and the schema parser isn't causing your problem.
>>> As documented in slapd.conf(5), directives must form a single logical
>>> line. Lines that are split must be continued by a leading space
>>> character.
>
>> Assuming this is not a bug, this is still really painfull... It would be
>> much better to consider that the AttributeType, being parenthesed, can
>> be scanned without taking into account the leading white space, until
>> the closing ')'.
>
> The config file parser breaks the input into lines before scanning to 
> see what keywords are actually on those lines. The syntax of the 
> config file has been documented to behave this way for over 10 years. 
> Nobody else has cared to change it until now...
FYI, before having RTFM, I thought that the only possible "include" I 
can use was for schema file. It made sense to me then that OpenLDAP was 
using a specific parser for schema, but I was wrong.

It seems that I have missed the part of the doc where this 'first space 
requirement' is mentionned...  We were lucky enough in ADS to be able to 
use a contextfull parser for  those schema file (we support the same 
format), so we were able to relax this constraint. Supposing that ADS 
behavior is to be expected by OpenLDAP is obviously a mistake ...

I wish I have some time to provide some patch for OpenLDAP to relax such 
a constraint, but, eh, if I say so, that would be a damn lie !

>
> Of course, all of that is going to be phased out as we move to pure 
> LDIF in the future. (Which again, requires a leading space character 
> for line continuations. And again, is a well documented feature of the 
> format.)
Yeah, the problem will remain, but at least, there is a RFC for idiot 
like me who don't do their homeworks... The *big* advantage to have LDIF 
formatted schemas is that you won't have anymore to care about ordering 
the elements inside attributeTypes and objectClasses...

Btw, we do have some LDIF format for Shcema, and I was wondering if it 
won't be a good idea to try to define a common format ? I would really 
appreciate if a LDIF schema file could be directly injected in both ADS 
and OpenLDAP !

Thanks.

-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org