}
}
+ *matchp = match;
+ return LDAP_SUCCESS;
+
+ }
+
+ if( mr == slap_schema.si_mr_dnSuperiorMatch ) {
+ asserted = value;
+ value = (struct berval *) assertedValue;
+ mr = slap_schema.si_mr_dnSubordinateMatch;
+ }
+
+ if( mr == slap_schema.si_mr_dnSubordinateMatch ) {
+ if( asserted->bv_len >= value->bv_len ) {
+ match = -1;
+ } else {
+ if( DN_SEPARATOR(
+ value->bv_val[value->bv_len - asserted->bv_len - 1] ))
+ {
+ match = memcmp(
+ &value->bv_val[value->bv_len - asserted->bv_len],
+ asserted->bv_val,
+ asserted->bv_len );
+ } else {
+ return 1;
+ }
+ }
+
+ *matchp = match;
+ return LDAP_SUCCESS;
+ }
+
+ if( mr == slap_schema.si_mr_dnOneLevelMatch ) {
+ if( asserted->bv_len >= value->bv_len ) {
+ match = -1;
+ } else {
+ if( DN_SEPARATOR(
+ value->bv_val[value->bv_len - asserted->bv_len - 1] ))
+ {
+ match = memcmp(
+ &value->bv_val[value->bv_len - asserted->bv_len],
+ asserted->bv_val,
+ asserted->bv_len );
+
+ if( !match ) {
+ struct berval rdn;
+ rdn.bv_val = value->bv_val;
+ rdn.bv_len = value->bv_len - asserted->bv_len - 1;
+ match = dnIsOneLevelRDN( &rdn ) ? 0 : 1;
+ }
+ } else {
+ return 1;
+ }
+ }
+
*matchp = match;
return LDAP_SUCCESS;
}
+ /* should not be reachable */
+ assert( 0 );
return LDAP_OTHER;
}
NULL, NULL,
NULL },
-#if 0
{"( 1.3.6.1.4.1.4203.666.4.8 NAME 'dnOneLevelMatch' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )",
SLAP_MR_HIDE | SLAP_MR_EXT, NULL,
NULL, dnNormalize, dnRelativeMatch,
NULL, NULL,
NULL },
-#endif
{"( 1.2.36.79672281.1.13.3 NAME 'rdnMatch' "
"SYNTAX 1.2.36.79672281.1.5.0 )",
offsetof(struct slap_internal_schema, si_mr_distinguishedNameMatch) },
{ "dnSubtreeMatch",
offsetof(struct slap_internal_schema, si_mr_dnSubtreeMatch) },
-
-#if 0
{ "dnOneLevelMatch",
offsetof(struct slap_internal_schema, si_mr_dnOneLevelMatch) },
{ "dnSubordinateMatch",
offsetof(struct slap_internal_schema, si_mr_dnSubordinateMatch) },
{ "dnSuperiorMatch",
offsetof(struct slap_internal_schema, si_mr_dnSuperiorMatch) },
-#endif
-
{ "integerMatch",
offsetof(struct slap_internal_schema, si_mr_integerMatch) },
{ "integerFirstComponentMatch",
/* Matching Rules */
MatchingRule *si_mr_distinguishedNameMatch;
MatchingRule *si_mr_dnSubtreeMatch;
-#if 0
MatchingRule *si_mr_dnOneLevelMatch;
MatchingRule *si_mr_dnSubordinateMatch;
MatchingRule *si_mr_dnSuperiorMatch;
-#endif
MatchingRule *si_mr_caseExactMatch;
MatchingRule *si_mr_caseExactSubstringsMatch;
MatchingRule *si_mr_caseExactIA5Match;