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

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

hyc@symas.com wrote:
> Michael Ströder wrote:
>> Howard Chu wrote:
>>> As for truncating the comments on input - kind of pointless. In
>>> particular, that means those comments won't be persisted in cn=config.
>> The comments wouldn't have to persist in cn=config.
> Perhaps not, but that makes the data in cn=config less comprehensible than it 
> would be in slapd.conf. On the other hand, OID macros *are* preserved in 
> cn=config, which is yet another reason to use them.
> Who benefits from this feature?

An admin copying&pasting a schema from an standard document which uses 
this format. I'm currently looking at such a document with ~500 
occurences of OIDs used in declarations instead of NAMEs.

> The comment is there for the benefit of a 
> human admin who has to read this definition. If the comment is stripped, then 
> the benefit is lost; anyone inspecting the schema remotely will just be faced 
> with the unwieldy numeric OIDs.

Well, in web2ldap's schema viewer I'm always trying to display the NAME 
instead of the OID if possible. slapd could also normalize the schema 
declarations to list the NAME instead of OID if available (but that 
would be another ITS).

> It still wouldn't persist because e.g. at_unparse() (which provides the value 
> that actually gets stored) works by constructing the string out of the LDAP 
> Attribute structure. So again, all of the comments would be gone, and there 
> would be no embedded line endings.

My request was simply to truncate and ignore the comments.

Ciao, Michael.