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

Re: commit: ldap/servers/slapd/overlays constraint.c

Howard Chu writes:
> Just as an aside, I'll note that back-ndb already requires maximum
> sizes to be configured for all attribute types. Currently it uses the
> {size} defined in the schema,

What?  This sounds bad, if you mean the 'SYNTAX syntaxoid{size}' part
of attribute definitions.  That's the minimum allowed max size.
Using that is the equivalent of a a C90 compiler which rejects string
literals and logical source lines > 509 characters (of which OpenLDAP
has several), and objects (such as malloc sizes) > 32767 bytes.

Most attribute type definitions do not set a {size} though, so since
one would need to do the following for most attrs I suggest to drop
the bad default for the ones which do use {size}:

> and it also allows an explicit attrlen to be configured for specific
> attributes. It might be useful to write the size constraints
> configured here into the schema structure as well.

Not as regular ASN.1 SIZE constrains, I think, since that'd differ
from the attribute's standard schema definition.  But an X-SIZE would
be OK, OpenLDAP is already adding private 'X-' extensions to standard
schema elements.