]> git.sur5r.net Git - openldap/commitdiff
Extend checks to substrings rules. Need to kludge around
authorKurt Zeilenga <kurt@openldap.org>
Tue, 3 Sep 2002 07:28:57 +0000 (07:28 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 3 Sep 2002 07:28:57 +0000 (07:28 +0000)
LDAP's kludged builtin substrings rules.

servers/slapd/at.c

index 7e28fb6663fa0332a27e2cb82871d231153e0e76..238b91f68443d23c19ef5f722b5540f6db0c1a20 100644 (file)
@@ -526,15 +526,23 @@ at_add(
                        return SLAP_SCHERR_ATTR_BAD_MR;
                }
 
-#if 0
-               if( sat->sat_syntax != mr->smr_syntax ) {
-                       if( mr->smr_compat_syntaxes == NULL ) {
+               /* due to funky LDAP builtin substring rules, we
+                * we check against the equality rule assertion
+                * syntax and compat syntaxes instead of those
+                * associated with the substrings rule.
+                */
+               if( sat->sat_equality &&
+                       sat->sat_syntax != sat->sat_equality->smr_syntax )
+               {
+                       if( sat->sat_equality->smr_compat_syntaxes == NULL ) {
                                *err = sat->sat_substr_oid;
                                return SLAP_SCHERR_ATTR_BAD_MR;
                        }
 
-                       for(i=0; mr->smr_compat_syntaxes[i]; i++) {
-                               if( sat->sat_syntax == mr->smr_compat_syntaxes[i] ) {
+                       for(i=0; sat->sat_equality->smr_compat_syntaxes[i]; i++) {
+                               if( sat->sat_syntax ==
+                                       sat->sat_equality->smr_compat_syntaxes[i] )
+                               {
                                        i = -1;
                                        break;
                                }
@@ -545,7 +553,6 @@ at_add(
                                return SLAP_SCHERR_ATTR_BAD_MR;
                        }
                }
-#endif
 
                sat->sat_substr = mr;
        }