X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fschema_prep.c;h=a703f1cb11ac22ae77993d413c8e62283e312882;hb=19838fe2ef8161be435454490284baf98d73df88;hp=54d16095e674bde82eea7eff2b7bb9535dff79c3;hpb=0a3a04a9ccb9b8d520e7f7f4227ecf22e85c6ad6;p=openldap diff --git a/servers/slapd/schema_prep.c b/servers/slapd/schema_prep.c index 54d16095e6..a703f1cb11 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-2005 The OpenLDAP Foundation. + * Copyright 1998-2006 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -545,13 +545,13 @@ static struct slap_schema_ad_map { NULL, NULL, NULL, NULL, NULL, NULL, NULL, offsetof(struct slap_internal_schema, si_ad_entryDN) }, - { "entryUUID", "( 1.3.6.1.4.1.4203.666.1.6 NAME 'entryUUID' " + { "entryUUID", "( 1.3.6.1.1.16.4 NAME 'entryUUID' " "DESC 'UUID of the entry' " "EQUALITY UUIDMatch " "ORDERING UUIDOrderingMatch " - "SYNTAX 1.3.6.1.4.1.4203.666.2.6 " + "SYNTAX 1.3.6.1.1.16.1 " "SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )", - NULL, SLAP_AT_HIDE|SLAP_AT_MANAGEABLE, + NULL, SLAP_AT_MANAGEABLE, NULL, NULL, NULL, NULL, NULL, NULL, NULL, offsetof(struct slap_internal_schema, si_ad_entryUUID) }, @@ -579,8 +579,9 @@ static struct slap_schema_ad_map { #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 " - "SYNTAX 1.3.6.1.4.1.1466.115.121.1.40{64} " + "EQUALITY UUIDMatch " + "ORDERING UUIDOrderingMatch " + "SYNTAX 1.3.6.1.1.16.1 " "SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )", NULL, SLAP_AT_HIDE, NULL, NULL, @@ -942,6 +943,26 @@ static struct slap_schema_ad_map { NULL, NULL, NULL, NULL, NULL, NULL, NULL, offsetof(struct slap_internal_schema, si_ad_uid) }, + { "uidNumber", /* for ldapi:// */ + "( 1.3.6.1.1.1.1.0 NAME 'uidNumber' " + "DESC 'An integer uniquely identifying a user " + "in an administrative domain' " + "EQUALITY integerMatch " + "SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )", + NULL, 0, + NULL, NULL, + NULL, NULL, NULL, NULL, NULL, + offsetof(struct slap_internal_schema, si_ad_uidNumber) }, + { "gidNumber", /* for ldapi:// */ + "( 1.3.6.1.1.1.1.1 NAME 'gidNumber' " + "DESC 'An integer uniquely identifying a group " + "in an administrative domain' " + "EQUALITY integerMatch " + "SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )", + NULL, 0, + NULL, NULL, + NULL, NULL, NULL, NULL, NULL, + offsetof(struct slap_internal_schema, si_ad_gidNumber) }, { "userPassword", "( 2.5.4.35 NAME 'userPassword' " "DESC 'RFC2256/2307: password of user' " "EQUALITY octetStringMatch " @@ -1023,7 +1044,24 @@ static AttributeType slap_at_undefined = { NULL, /* sup */ NULL, /* subtypes */ NULL, NULL, NULL, NULL, /* matching rules routines */ - NULL, /* syntax (this may need to be defined) */ + NULL, /* syntax (will be set later to "octetString") */ + NULL, /* schema check function */ + NULL, /* oidmacro */ + SLAP_AT_ABSTRACT|SLAP_AT_FINAL, /* mask */ + { NULL }, /* next */ + NULL /* attribute description */ + /* mutex (don't know how to initialize it :) */ +}; + +static AttributeType slap_at_proxied = { + { "1.1.1", NULL, "Catchall for undefined proxied attribute types", 1, NULL, + NULL, NULL, NULL, NULL, + 0, 0, 0, 0, LDAP_SCHEMA_USER_APPLICATIONS, NULL }, /* LDAPAttributeType */ + BER_BVC("PROXIED"), /* cname */ + NULL, /* sup */ + NULL, /* subtypes */ + NULL, NULL, NULL, NULL, /* matching rules routines (will be set later) */ + NULL, /* syntax (will be set later to "octetString") */ NULL, /* schema check function */ NULL, /* oidmacro */ SLAP_AT_ABSTRACT|SLAP_AT_FINAL, /* mask */ @@ -1134,6 +1172,13 @@ slap_schema_load( void ) slap_at_undefined.sat_syntax = slap_schema.si_syn_octetString; slap_schema.si_at_undefined = &slap_at_undefined; + slap_at_proxied.sat_equality = mr_find( "octetStringMatch" ); + slap_at_proxied.sat_approx = mr_find( "octetStringMatch" ); + slap_at_proxied.sat_ordering = mr_find( "octetStringOrderingMatch" ); + slap_at_proxied.sat_substr = mr_find( "octetStringSubstringsMatch" ); + slap_at_proxied.sat_syntax = slap_schema.si_syn_octetString; + slap_schema.si_at_proxied = &slap_at_proxied; + ldap_pvt_thread_mutex_init( &ad_undef_mutex ); ldap_pvt_thread_mutex_init( &oc_undef_mutex ); @@ -1162,6 +1207,7 @@ slap_schema_load( void ) code = at_add( at, 0, NULL, &err ); if ( code ) { + ldap_attributetype_free( at ); fprintf( stderr, "slap_schema_load: AttributeType " "\"%s\": %s: \"%s\"\n", ad_map[i].ssam_name, scherr2str(code), err );