[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Root DSE
Julio Sánchez Fernández wrote:
> I blush. I did not read the syntax carefully enough. From RFC2252,
> section 4.2:
>
> AttributeTypeDescription = "(" whsp
> numericoid whsp ; AttributeType identifier
> [ "NAME" qdescrs ] ; name used in AttributeType
> [etc.]
>
> And from 4.1:
>
> qdstrings = qdstring / ( whsp "(" qdstringlist ")" whsp )
>
> Scrap all that, we have a standard syntax for alias definition.
Good catch... teach me not to go back to the standard...
I suggest now using:
typedef struct ldap_attributetype {
char *at_oid; /* REQUIRED */
char **at_names; /* OPTIONAL */
char *at_desc; /* OPTIONAL */
char *at sup_oid; /* OPTIONAL */
char *at_equality_oid; /* OPTIONAL */
char *at_ordering_oid; /* OPTIONAL */
char *at_substr_oid; /* OPTIONAL */
char *at_syntax_oid; /* OPTIONAL */
int *at_single-value; /* 0=no, 1=yes */
} LDAP_ATTRIBUTE_TYPE;
> Notice, however, that NAME is optional.
Yes... life with OIDs! I suggest writing the parser per the spec.
Then, for now, when slapd builds it's internal structure, it can require
a name. We'll lift this restriction once we have OID support in place.
> I guess you want this because some tools don't need the whole syntax
> bang, right?
It to separate parsing/generation from use. Parsing/Generation of schema
specification in standard formats is something generally useful to both
LDAP clients and servers. However, each client/server will likely use
the schema information in different ways. If there is enough commonality
between uses, some additional utilities could be made sharable.
Kurt