X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fschema_prep.c;h=e05f5d63c5eede6a5753359cc07ca41078f41bc2;hb=8da81d42c7b31191c175aa0a8a9439b66594f3c3;hp=e81009a57b8da271d0d1c40acd35736cb770d82b;hpb=7e87f547160f78690b4fe2a6bdf7f67505de8ee4;p=openldap diff --git a/servers/slapd/schema_prep.c b/servers/slapd/schema_prep.c index e81009a57b..e05f5d63c5 100644 --- a/servers/slapd/schema_prep.c +++ b/servers/slapd/schema_prep.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2004 The OpenLDAP Foundation. + * Copyright 1998-2005 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -370,13 +370,17 @@ static struct slap_schema_oc_map { "matchingRuleUse ) )", subentryObjectClass, SLAP_OC_OPERATIONAL, offsetof(struct slap_internal_schema, si_oc_subschema) }, -#ifdef LDAP_DEVEL +#ifdef LDAP_COLLECTIVE_ATTRIBUTES { "collectiveAttributeSubentry", "( 2.5.17.2 " "NAME 'collectiveAttributeSubentry' " + "DESC 'RFC3671: collective attribute subentry' " "AUXILIARY )", subentryObjectClass, SLAP_OC_COLLECTIVEATTRIBUTESUBENTRY|SLAP_OC_OPERATIONAL|SLAP_OC_HIDE, - offsetof(struct slap_internal_schema, si_oc_collectiveAttributeSubentry) }, + offsetof( struct slap_internal_schema, + si_oc_collectiveAttributeSubentry) }, +#endif +#ifdef LDAP_DYNAMIC_OBJECTS { "dynamicObject", "( 1.3.6.1.4.1.1466.101.119.2 " "NAME 'dynamicObject' " "DESC 'RFC2589: Dynamic Object' " @@ -506,9 +510,10 @@ static struct slap_schema_ad_map { NULL, NULL, NULL, NULL, NULL, NULL, NULL, offsetof(struct slap_internal_schema, si_ad_subschemaSubentry) }, -#ifdef LDAP_DEVEL +#ifdef LDAP_COLLECTIVE_ATTRIBUTES { "collectiveAttributeSubentries", "( 2.5.18.12 " "NAME 'collectiveAttributeSubentries' " + "DESC 'RFC3671: collective attribute subentries' " "EQUALITY distinguishedNameMatch " "SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 " "NO-USER-MODIFICATION USAGE directoryOperation )", @@ -517,6 +522,7 @@ static struct slap_schema_ad_map { NULL, NULL, NULL, NULL, NULL, offsetof(struct slap_internal_schema, si_ad_collectiveSubentries) }, { "collectiveExclusions", "( 2.5.18.7 NAME 'collectiveExclusions' " + "DESC 'RFC3671: collective attribute exclusions' " "EQUALITY objectIdentifierMatch " "SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 " "USAGE directoryOperation )", @@ -547,9 +553,9 @@ static struct slap_schema_ad_map { offsetof(struct slap_internal_schema, si_ad_entryUUID) }, { "entryCSN", "( 1.3.6.1.4.1.4203.666.1.7 NAME 'entryCSN' " "DESC 'change sequence number of the entry content' " - "EQUALITY octetStringMatch " - "ORDERING octetStringOrderingMatch " - "SYNTAX 1.3.6.1.4.1.1466.115.121.1.40{64} " + "EQUALITY CSNMatch " + "ORDERING CSNOrderingMatch " + "SYNTAX 1.3.6.1.4.1.4203.666.11.2.1{64} " "SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )", NULL, SLAP_AT_HIDE, NULL, NULL, @@ -557,16 +563,16 @@ static struct slap_schema_ad_map { offsetof(struct slap_internal_schema, si_ad_entryCSN) }, { "namingCSN", "( 1.3.6.1.4.1.4203.666.1.13 NAME 'namingCSN' " "DESC '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} " + "EQUALITY CSNMatch " + "ORDERING CSNOrderingMatch " + "SYNTAX 1.3.6.1.4.1.4203.666.11.2.1{64} " "SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )", NULL, SLAP_AT_HIDE, NULL, NULL, NULL, NULL, NULL, NULL, NULL, offsetof(struct slap_internal_schema, si_ad_namingCSN) }, -#if 0 +#ifdef LDAP_SUPERIOR_UUID { "superiorUUID", "( 1.3.6.1.4.1.4203.666.1.11 NAME 'superiorUUID' " "DESC 'UUID of the superior entry' " "EQUALITY octetStringMatch " @@ -593,16 +599,16 @@ static struct slap_schema_ad_map { { "contextCSN", "( 1.3.6.1.4.1.4203.666.1.25 " "NAME 'contextCSN' " "DESC 'the largest committed CSN of a context' " - "EQUALITY octetStringMatch " - "ORDERING octetStringOrderingMatch " - "SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 " + "EQUALITY CSNMatch " + "ORDERING CSNOrderingMatch " + "SYNTAX 1.3.6.1.4.1.4203.666.11.2.1{64} " "SINGLE-VALUE NO-USER-MODIFICATION USAGE dSAOperation )", NULL, SLAP_AT_HIDE, NULL, NULL, NULL, NULL, NULL, NULL, NULL, offsetof(struct slap_internal_schema, si_ad_contextCSN) }, -#ifdef LDAP_DEVEL +#ifdef LDAP_SYNC_TIMESTAMP { "syncTimestamp", "( 1.3.6.1.4.1.4203.666.1.26 NAME 'syncTimestamp' " "DESC 'Time which object was replicated' " "EQUALITY generalizedTimeMatch " @@ -683,6 +689,16 @@ static struct slap_schema_ad_map { NULL, NULL, NULL, NULL, NULL, NULL, NULL, offsetof(struct slap_internal_schema, si_ad_monitorContext) }, + { "configContext", "( 1.3.6.1.4.1.4203.666.11.1.1 " + "NAME 'configContext' " + "DESC 'config context' " + "SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 " + "SINGLE-VALUE NO-USER-MODIFICATION " + "USAGE dSAOperation )", + rootDseAttribute, SLAP_AT_HIDE, + NULL, NULL, + NULL, NULL, NULL, NULL, NULL, + offsetof(struct slap_internal_schema, si_ad_configContext) }, { "vendorName", "( 1.3.6.1.1.4 NAME 'vendorName' " "DESC 'RFC3045: name of implementation vendor' " "EQUALITY caseExactMatch " @@ -862,7 +878,7 @@ static struct slap_schema_ad_map { offsetof(struct slap_internal_schema, si_ad_aci) }, #endif -#ifdef LDAP_DEVEL +#ifdef LDAP_DYNAMIC_OBJECTS { "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 " @@ -907,6 +923,15 @@ static struct slap_schema_ad_map { NULL, NULL, NULL, NULL, NULL, NULL, NULL, offsetof(struct slap_internal_schema, si_ad_cn) }, + { "uid", "( 0.9.2342.19200300.100.1.1 NAME ( 'uid' 'userid' ) " + "DESC 'RFC1274: user identifier' " + "EQUALITY caseIgnoreMatch " + "SUBSTR caseIgnoreSubstringsMatch " + "SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} )", + NULL, 0, + NULL, NULL, + NULL, NULL, NULL, NULL, NULL, + offsetof(struct slap_internal_schema, si_ad_uid) }, { "userPassword", "( 2.5.4.35 NAME 'userPassword' " "DESC 'RFC2256/2307: password of user' " "EQUALITY octetStringMatch " @@ -1020,7 +1045,6 @@ static struct slap_schema_syn_map { 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) }, - { "1.3.6.1.4.1.1466.115.121.1.3", offsetof(struct slap_internal_schema, si_syn_attributeTypeDesc) }, { "1.3.6.1.4.1.1466.115.121.1.16", @@ -1035,10 +1059,8 @@ static struct slap_schema_syn_map { offsetof(struct slap_internal_schema, si_syn_nameFormDesc) }, { "1.3.6.1.4.1.1466.115.121.1.37", offsetof(struct slap_internal_schema, si_syn_objectClassDesc) }, - { "1.3.6.1.4.1.1466.115.121.1.17", offsetof(struct slap_internal_schema, si_syn_ditStructureRuleDesc) }, - { NULL, 0 } }; @@ -1102,7 +1124,7 @@ slap_schema_load( void ) return LDAP_OTHER; } - code = at_add( at, &err ); + code = at_add( at, 0, NULL, &err ); if ( code ) { fprintf( stderr, "slap_schema_load: AttributeType " "\"%s\": %s: \"%s\"\n", @@ -1215,7 +1237,7 @@ slap_schema_load( void ) return LDAP_OTHER; } - code = oc_add(oc,0,&err); + code = oc_add(oc,0,NULL,&err); if ( code ) { fprintf( stderr, "slap_schema_load: ObjectClass " "\"%s\": %s: \"%s\"\n", @@ -1248,7 +1270,7 @@ slap_schema_load( void ) } } - slap_at_undefined.sat_syntax = slap_schema.si_syn_distinguishedName; + slap_at_undefined.sat_syntax = slap_schema.si_syn_octetString; slap_schema.si_at_undefined = &slap_at_undefined; return LDAP_SUCCESS;