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

Re: (ITS#5662) Comments in schema declarations separated by semicolon

Michael Ströder wrote:
> hyc@symas.com wrote:
>> michael@stroeder.com wrote:
>>> It might be helpful if the schema config file parser would accept lines with
>>> comments at the end separated by semicolon.
>> The parser doesn't know anything about line endings. Remember, lines with
>> leading white space are continuations of the previous line. The schema parser
>> is just fed a single string as one long line, the line endings were removed
>> long before it ever got there.
> Maybe lines with ; could be truncated before passing it to the schema
> parser? I don't know if that has any impact on processing slapd.conf in
> general.

> The slapd.conf parser has to already know in advance that this
> part is a schema declaration (started by key-word objectclass etc.) and
> could change pre-processing?

Actually no, the parser doesn't know there's anything special about schema 
declarations. It doesn't parse the lines any differently than any other 
directives. Nor should it.

As for truncating the comments on input - kind of pointless. In particular, 
that means those comments won't be persisted in cn=config.

   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/