]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/schema_init.c
ITS#4088 force cursors to use same locker
[openldap] / servers / slapd / schema_init.c
index 183d1875bfa45a3dcd3e7a546c402d6bde881c52..42f03d8f260a5d828e2939a3c4d0b52208d8aba6 100644 (file)
@@ -50,8 +50,6 @@
 #define HASH_Update(c,buf,len) lutil_HASHUpdate(c,buf,len)
 #define HASH_Final(d,c)                        lutil_HASHFinal(d,c)
 
-#define        OpenLDAPaciMatch                        octetStringMatch
-
 /* approx matching rules */
 #define directoryStringApproxMatchOID  "1.3.6.1.4.1.4203.666.4.4"
 #define directoryStringApproxMatch             approxMatch
@@ -79,6 +77,9 @@ unsigned int index_substr_if_maxlen = SLAP_INDEX_SUBSTR_IF_MAXLEN_DEFAULT;
 unsigned int index_substr_any_len = SLAP_INDEX_SUBSTR_ANY_LEN_DEFAULT;
 unsigned int index_substr_any_step = SLAP_INDEX_SUBSTR_ANY_STEP_DEFAULT;
 
+ldap_pvt_thread_mutex_t        ad_undef_mutex;
+ldap_pvt_thread_mutex_t        oc_undef_mutex;
+
 static int
 inValidate(
        Syntax *syntax,
@@ -126,7 +127,7 @@ static int certificateValidate( Syntax *syntax, struct berval *in )
 #define certificateValidate sequenceValidate
 #endif
 
-static int
+int
 octetStringMatch(
        int *matchp,
        slap_mask_t flags,
@@ -1065,7 +1066,7 @@ uniqueMemberMatch(
        struct berval *asserted = (struct berval *) assertedValue;
        struct berval assertedDN = *asserted;
        struct berval assertedUID = BER_BVNULL;
-       struct berval valueDN = BER_BVNULL;
+       struct berval valueDN = *value;
        struct berval valueUID = BER_BVNULL;
        int approx = ((flags & SLAP_MR_EQUALITY_APPROX) == SLAP_MR_EQUALITY_APPROX);
 
@@ -1086,7 +1087,6 @@ uniqueMemberMatch(
        }
 
        if ( !BER_BVISEMPTY( value ) ) {
-               valueDN = *value;
 
                valueUID.bv_val = strrchr( valueDN.bv_val, '#' );
                if ( !BER_BVISNULL( &valueUID ) ) {
@@ -3423,22 +3423,14 @@ static slap_syntax_defs_rec syntax_defs[] = {
                serialNumberAndIssuerValidate,
                serialNumberAndIssuerPretty},
 
-#ifdef SLAPD_ACI_ENABLED
-       /* OpenLDAP Experimental Syntaxes */
-       {"( 1.3.6.1.4.1.4203.666.2.1 DESC 'OpenLDAP Experimental ACI' )",
-               SLAP_SYNTAX_HIDE,
-               OpenLDAPaciValidate,
-               OpenLDAPaciPretty},
-#endif
-
 #ifdef SLAPD_AUTHPASSWD
        /* needs updating */
        {"( 1.3.6.1.4.1.4203.666.2.2 DESC 'OpenLDAP authPassword' )",
                SLAP_SYNTAX_HIDE, NULL, NULL},
 #endif
 
-       {"( 1.3.6.1.4.1.4203.666.2.6 DESC 'UUID' )",
-               SLAP_SYNTAX_HIDE, UUIDValidate, NULL},
+       {"( 1.3.6.1.1.16.1 DESC 'UUID' )",
+               0, UUIDValidate, NULL},
 
        {"( 1.3.6.1.4.1.4203.666.11.2.1 DESC 'CSN' )",
                SLAP_SYNTAX_HIDE, csnValidate, NULL},
@@ -3847,15 +3839,6 @@ static slap_mrule_defs_rec mrule_defs[] = {
                NULL},
 #endif
 
-#ifdef SLAPD_ACI_ENABLED
-       {"( 1.3.6.1.4.1.4203.666.4.2 NAME 'OpenLDAPaciMatch' "
-               "SYNTAX 1.3.6.1.4.1.4203.666.2.1 )",
-               SLAP_MR_HIDE | SLAP_MR_EQUALITY, NULL,
-               NULL, OpenLDAPaciNormalize, OpenLDAPaciMatch,
-               NULL, NULL,
-               NULL},
-#endif
-
        {"( 1.2.840.113556.1.4.803 NAME 'integerBitAndMatch' "
                "SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 )",
                SLAP_MR_EXT, NULL,
@@ -3870,16 +3853,16 @@ static slap_mrule_defs_rec mrule_defs[] = {
                NULL, NULL,
                "integerMatch" },
 
-       {"( 1.3.6.1.4.1.4203.666.4.6 NAME 'UUIDMatch' "
-               "SYNTAX 1.3.6.1.4.1.4203.666.2.6 )",
-               SLAP_MR_HIDE | SLAP_MR_EQUALITY, NULL,
+       {"( 1.3.6.1.1.16.2 NAME 'UUIDMatch' "
+               "SYNTAX 1.3.6.1.1.16.1 )",
+               SLAP_MR_EQUALITY, NULL,
                NULL, UUIDNormalize, octetStringMatch,
                octetStringIndexer, octetStringFilter,
                NULL},
 
-       {"( 1.3.6.1.4.1.4203.666.4.7 NAME 'UUIDOrderingMatch' "
-               "SYNTAX 1.3.6.1.4.1.4203.666.2.6 )",
-               SLAP_MR_HIDE | SLAP_MR_ORDERING, NULL,
+       {"( 1.3.6.1.1.16.3 NAME 'UUIDOrderingMatch' "
+               "SYNTAX 1.3.6.1.1.16.1 )",
+               SLAP_MR_ORDERING, NULL,
                NULL, UUIDNormalize, octetStringOrderingMatch,
                octetStringIndexer, octetStringFilter,
                "UUIDMatch"},
@@ -3966,4 +3949,7 @@ schema_destroy( void )
        mr_destroy();
        mru_destroy();
        syn_destroy();
+
+       ldap_pvt_thread_mutex_destroy( &ad_undef_mutex );
+       ldap_pvt_thread_mutex_destroy( &oc_undef_mutex );
 }