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

Re: My schema : syntaxes



>Sometimes I see web pages saying :
>"if want to create new objectClasses & attrs,
>the syntax is :
>objectClass
>	requires
>		(...)
>	allows
>		(...)
> etc.
>attribute
>cis / ces / ...
> and this is to be added in slapd.conf"
>On OpenLDAP 2.0.23, I wrote a .schema file
>with LDAPv3's syntax and #included it.
>So it seems to me that the first way to create a 
>schema refers to OpenLDAP 1.x, and the second one 
>(#include a .schema file) to OpenLDAP 2.x.

?  Actually both examples look like OpenLDAP 1.x.  One defines an
objectclass, the other an attribute.

>Can someone confirm this ?

The LDAPv3/OpenLDAP 2.x schema definitions look like:

      AttributeTypeDescription = "(" whsp
            numericoid whsp              ; AttributeType identifier
          [ "NAME" qdescrs ]             ; name used in AttributeType
          [ "DESC" qdstring ]            ; description
          [ "OBSOLETE" whsp ]
          [ "SUP" woid ]                 ; derived from this other
                                         ; AttributeType
          [ "EQUALITY" woid              ; Matching Rule name
          [ "ORDERING" woid              ; Matching Rule name
          [ "SUBSTR" woid ]              ; Matching Rule name
          [ "SYNTAX" whsp noidlen whsp ] ; see section 4.3
          [ "SINGLE-VALUE" whsp ]        ; default multi-valued
          [ "COLLECTIVE" whsp ]          ; default not collective
          [ "NO-USER-MODIFICATION" whsp ]; default user modifiable
          [ "USAGE" whsp AttributeUsage ]; default userApplications
          whsp ")"

        ObjectClassDescription = "(" whsp
                numericoid whsp      ; ObjectClass identifier
                [ "NAME" qdescrs ]
                [ "DESC" qdstring ]
                [ "OBSOLETE" whsp ]
                [ "SUP" oids ]       ; Superior ObjectClasses
                [ ( "ABSTRACT" / "STRUCTURAL" / "AUXILIARY" ) whsp ]
                        ; default structural
                [ "MUST" oids ]      ; AttributeTypes
                [ "MAY" oids ]       ; AttributeTypes
                whsp ")"

See http://www.openldap.org/doc/admin20/schema.html available from the
***DOCUMENTATION*** link on the OpenLDAP web site.