]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/schema_prep.c
declare oc_bvfind_undef()
[openldap] / servers / slapd / schema_prep.c
index 56bef5e6f8db01379f898007c2a8367333caa6e8..948e8d1486f80a3324610226f2ec4abe50cad22f 100644 (file)
@@ -26,6 +26,8 @@
 
 #define OCDEBUG 0
 
+int schema_init_done = 0;
+
 struct slap_internal_schema slap_schema;
 
 static int
@@ -545,9 +547,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,
@@ -555,9 +557,9 @@ 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,
@@ -591,9 +593,9 @@ 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,
@@ -905,6 +907,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 "
@@ -1018,7 +1029,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",
@@ -1033,10 +1043,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 }
 };
 
@@ -1246,7 +1254,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;
@@ -1256,7 +1264,7 @@ int
 slap_schema_check( void )
 {
        /* we should only be called once after schema_init() was called */
-       assert( SLAPD_GLOBAL(schema_init_done) == 1 );
+       assert( schema_init_done == 1 );
 
        /*
         * cycle thru attributeTypes to build matchingRuleUse
@@ -1265,7 +1273,7 @@ slap_schema_check( void )
                return LDAP_OTHER;
        }
 
-       ++SLAPD_GLOBAL(schema_init_done);
+       ++schema_init_done;
        return LDAP_SUCCESS;
 }