X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fschema_prep.c;h=6d6076b1f7032c4e19d7df8352f4d0e2f5b5e592;hb=4325d05ebc5ca096ee4a0d0177e7651c028c7449;hp=4ed8cc30543b32b2856cb14ed220f5683282d143;hpb=8a5b200c447a758d91805827593db72c54bea6e2;p=openldap diff --git a/servers/slapd/schema_prep.c b/servers/slapd/schema_prep.c index 4ed8cc3054..6d6076b1f7 100644 --- a/servers/slapd/schema_prep.c +++ b/servers/slapd/schema_prep.c @@ -1,7 +1,7 @@ /* schema_init.c - init builtin schema */ /* $OpenLDAP$ */ /* - * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved. + * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ @@ -90,7 +90,12 @@ objectSubClassMatch( return SLAPD_COMPARE_UNDEFINED; } - if( SLAP_IS_MR_VALUE_SYNTAX_MATCH( flags ) ) { +#ifdef SLAP_NVALUES + if( SLAP_MR_IS_VALUE_OF_ATTRIBUTE_SYNTAX( flags ) ) +#else + if( SLAP_IS_MR_ATTRIBUTE_SYNTAX_MATCH( flags ) ) +#endif + { *matchp = ( asserted != oc ); } else { *matchp = !is_object_subclass( asserted, oc ); @@ -301,7 +306,7 @@ static struct slap_schema_oc_map { "SUP top STRUCTURAL MAY cn )", rootDseObjectClass, SLAP_OC_OPERATIONAL, offsetof(struct slap_internal_schema, si_oc_rootdse) }, - { "subentry", "( 2.5.20.0 NAME 'subentry' " + { "subentry", "( 2.5.17.0 NAME 'subentry' " "SUP top STRUCTURAL " "MUST ( cn $ subtreeSpecification ) )", subentryObjectClass, SLAP_OC_SUBENTRY|SLAP_OC_OPERATIONAL, @@ -320,7 +325,8 @@ static struct slap_schema_oc_map { "MUST cn )", 0, SLAP_OC_OPERATIONAL, offsetof(struct slap_internal_schema, si_oc_monitor) }, - { "collectiveAttributeSubentry", "( 2.5.20.2 " +#ifdef LDAP_DEVEL + { "collectiveAttributeSubentry", "( 2.5.17.2 " "NAME 'collectiveAttributeSubentry' " "AUXILIARY )", subentryObjectClass, @@ -332,6 +338,7 @@ static struct slap_schema_oc_map { "SUP top AUXILIARY )", dynamicObjectClass, SLAP_OC_DYNAMICOBJECT, offsetof(struct slap_internal_schema, si_oc_dynamicObject) }, +#endif { NULL, NULL, NULL, 0, 0 } }; @@ -423,6 +430,7 @@ static struct slap_schema_ad_map { NULL, 0, NULL, NULL, NULL, NULL, NULL, offsetof(struct slap_internal_schema, si_ad_subschemaSubentry) }, +#ifdef LDAP_DEVEL { "collectiveAttributeSubentries", "( 2.5.18.12 " "NAME 'collectiveAttributeSubentries' " "EQUALITY distinguishedNameMatch " @@ -438,9 +446,10 @@ static struct slap_schema_ad_map { NULL, SLAP_AT_HIDE, NULL, NULL, NULL, NULL, NULL, offsetof(struct slap_internal_schema, si_ad_collectiveExclusions) }, +#endif { "entryUUID", "( 1.3.6.1.4.1.4203.666.1.6 NAME 'entryUUID' " - "DESC 'LCUP/LDUP: universally unique identifier' " + "DESC 'LCUP/LDUP: UUID of the entry' " "EQUALITY octetStringMatch " "SYNTAX 1.3.6.1.4.1.1466.115.121.1.40{64} " "SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )", @@ -448,13 +457,44 @@ static struct slap_schema_ad_map { NULL, NULL, NULL, NULL, NULL, offsetof(struct slap_internal_schema, si_ad_entryUUID) }, { "entryCSN", "( 1.3.6.1.4.1.4203.666.1.7 NAME 'entryCSN' " - "DESC 'LCUP/LDUP: change sequence number' " + "DESC 'LCUP/LDUP: change sequence number of the entry content' " "EQUALITY octetStringMatch " + "ORDERING octetStringOrderingMatch " "SYNTAX 1.3.6.1.4.1.1466.115.121.1.40{64} " "SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )", NULL, SLAP_AT_HIDE, NULL, NULL, NULL, NULL, NULL, offsetof(struct slap_internal_schema, si_ad_entryCSN) }, + { "namingCSN", "( 1.3.6.1.4.1.4203.666.1.13 NAME 'namingCSN' " + "DESC 'LCUP/LDUP: change sequence number of the entry naming (RDN)' " + "EQUALITY octetStringMatch " + "ORDERING octetStringOrderingMatch " + "SYNTAX 1.3.6.1.4.1.1466.115.121.1.40{64} " + "SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )", + NULL, SLAP_AT_HIDE, + NULL, NULL, NULL, NULL, NULL, + offsetof(struct slap_internal_schema, si_ad_namingCSN) }, + + { "superiorUUID", "( 1.3.6.1.4.1.4203.666.1.11 NAME 'superiorUUID' " + "DESC 'LCUP/LDUP: UUID of the superior entry' " + "EQUALITY octetStringMatch " + "SYNTAX 1.3.6.1.4.1.1466.115.121.1.40{64} " + "SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )", + NULL, SLAP_AT_HIDE, + NULL, NULL, NULL, NULL, NULL, + offsetof(struct slap_internal_schema, si_ad_superiorUUID) }, + +#ifdef LDAP_CACHING + /* LDAP cache specific operational attribute */ + { "queryid", "( 1.3.6.1.4.1.4203.666.1.12 NAME 'queryid' " + "DESC 'list of queries the entry belongs to' " + "EQUALITY octetStringMatch " + "SYNTAX 1.3.6.1.4.1.1466.115.121.1.40{64} " + "NO-USER-MODIFICATION USAGE directoryOperation )", + NULL, 0, /* SLAP_AT_HIDE or SLAP_AT_NONE ? */ + NULL, NULL, NULL, NULL, NULL, + offsetof(struct slap_internal_schema, si_ad_queryid) }, +#endif /* LDAP_CACHING */ /* root DSE attributes */ { "altServer", "( 1.3.6.1.4.1.1466.101.120.6 NAME 'altServer' " @@ -510,8 +550,7 @@ static struct slap_schema_ad_map { { "monitorContext", "( 1.3.6.1.4.1.4203.666.1.10 " "NAME 'monitorContext' " "DESC 'monitor context' " - "EQUALITY objectIdentifierMatch " - "SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 " + "SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 " "SINGLE-VALUE NO-USER-MODIFICATION " "USAGE dSAOperation )", rootDseAttribute, SLAP_AT_HIDE, @@ -677,6 +716,7 @@ static struct slap_schema_ad_map { offsetof(struct slap_internal_schema, si_ad_aci) }, #endif +#ifdef LDAP_DEVEL { "entryTtl", "( 1.3.6.1.4.1.1466.101.119.3 NAME 'entryTtl' " "DESC 'RFC2589: entry time-to-live' " "SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE " @@ -692,6 +732,7 @@ static struct slap_schema_ad_map { rootDseAttribute, 0, NULL, NULL, NULL, NULL, NULL, offsetof(struct slap_internal_schema, si_ad_dynamicSubtrees) }, +#endif /* userApplication attributes (which system schema depends upon) */ { "distinguishedName", "( 2.5.4.49 NAME 'distinguishedName' " @@ -754,13 +795,13 @@ static struct slap_schema_ad_map { offsetof(struct slap_internal_schema, si_ad_krbName) }, #endif - { NULL, NULL, NULL, 0, NULL, NULL, NULL, 0 } + { NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0 } }; static AttributeType slap_at_undefined = { { "1.1.1", NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, - 0, 0, 0, 1, 3 }, /* LDAPAttributeType */ + 0, 0, 0, 1, 3, NULL }, /* LDAPAttributeType */ { sizeof("UNDEFINED")-1, "UNDEFINED" }, /* cname */ NULL, /* sup */ NULL, /* subtypes */ @@ -768,7 +809,7 @@ static AttributeType slap_at_undefined = { NULL, /* syntax (this may need to be defined) */ (AttributeTypeSchemaCheckFN *) 0, /* schema check function */ SLAP_AT_ABSTRACT|SLAP_AT_FINAL, /* mask */ - NULL, /* next */ + { NULL }, /* next */ NULL /* attribute description */ /* mutex (don't know how to initialize it :) */ }; @@ -777,10 +818,19 @@ static struct slap_schema_mr_map { char *ssmm_name; size_t ssmm_offset; } mr_map[] = { + { "caseExactIA5Match", + offsetof(struct slap_internal_schema, si_mr_caseExactIA5Match) }, + { "caseExactMatch", + offsetof(struct slap_internal_schema, si_mr_caseExactMatch) }, + { "caseExactSubstringsMatch", + offsetof(struct slap_internal_schema, si_mr_caseExactSubstringsMatch) }, { "distinguishedNameMatch", offsetof(struct slap_internal_schema, si_mr_distinguishedNameMatch) }, { "integerMatch", offsetof(struct slap_internal_schema, si_mr_integerMatch) }, + { "integerFirstComponentMatch", + offsetof(struct slap_internal_schema, + si_mr_integerFirstComponentMatch) }, { NULL, 0 } }; @@ -788,12 +838,14 @@ static struct slap_schema_syn_map { char *sssm_name; size_t sssm_offset; } syn_map[] = { - { "1.3.6.1.4.1.1466.115.121.1.40", - offsetof(struct slap_internal_schema, si_syn_octetString) }, + { "1.3.6.1.4.1.1466.115.121.1.15", + offsetof(struct slap_internal_schema, si_syn_directoryString) }, { "1.3.6.1.4.1.1466.115.121.1.12", offsetof(struct slap_internal_schema, si_syn_distinguishedName) }, { "1.3.6.1.4.1.1466.115.121.1.27", offsetof(struct slap_internal_schema, si_syn_integer) }, + { "1.3.6.1.4.1.1466.115.121.1.40", + offsetof(struct slap_internal_schema, si_syn_octetString) }, { NULL, 0 } };