directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Howard Chu <>
Subject Re: [Shared] Relaxing the schema parsers
Date Thu, 05 Jun 2008 16:30:56 GMT
Stefan Seelmann wrote:
> Hi,
> I just want to ask, how we should handle OID macros in OpenLDAP schema
> files. Here is an example:
>    objectIdentifier NetscapeRoot 2.16.840.1.113730
>    objectIdentifier NetscapeLDAP NetscapeRoot:3
>    objectIdentifier NetscapeLDAPattributeType NetscapeLDAP:1
>    attributetype ( NetscapeLDAPattributeType:198
>          NAME 'memberURL'
>          DESC 'Identifies ...'
>          SUP labeledURI )
> Right now the parser just fails if it finds an objectIdentifier line. I
> see two ways:
> 1st)
> The parser substitutes those macros internally and returns attribute
> types and object classes with the resolved OIDs
> 2nd)
> Add a new data structure for those Object Identifiers, keep the symbolic
> names within attribute types and object classes and let the caller
> handle the macros.
> Any opinions?

Just to give you an idea of how we handle them...

In the subschema subentry that we publish from the rootDSE, we only publish 
fully resolved OIDs. That's the only conformant way to behave there.

In our cn=config tree, we preserve the OID macros as they're provided in the 
input. There's a tree of data structures to record the macro definitions, and 
an extra field in each schema structure to record where they're used.

Hm, with a slight flaw - we allow OID macros for the attribute syntax field 
too, but that's not being preserved in cn=config. I guess this discussion will 
prod me into fixing that. ;)

> Howard Chu wrote:
>> Emmanuel Lecharny wrote:
>>> I would like to add some more features, like accepting a name for
>>> syntaxes. Nothing is less painfull than to have an OID to express that
>>> an AttributeType is a IA5String !
>> I was going to suggest that as well; the OID macros we use in OpenLDAP
>> really make life a lot easier.

   -- Howard Chu
   CTO, Symas Corp. 
   Director, Highland Sun
   Chief Architect, OpenLDAP

View raw message