]> git.sur5r.net Git - openldap/commitdiff
Add entryDN MRA support. This is intended to be used:
authorKurt Zeilenga <kurt@openldap.org>
Tue, 7 Sep 2004 21:10:28 +0000 (21:10 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 7 Sep 2004 21:10:28 +0000 (21:10 +0000)
(entryDN:isSubordinate:=dc=example,dc=net)
isSubordinate should be implemented in component matching terms

servers/slapd/filterentry.c

index 29cb5b908578e5c47ff2caa55acb9800424c76ee..96d856dca14f18e4fe0d5b8210b6a7916e2573fa 100644 (file)
@@ -182,6 +182,25 @@ static int test_mra_filter(
                        return LDAP_INSUFFICIENT_ACCESS;
                }
 
+               if ( mra->ma_desc == slap_schema.si_ad_entryDN ) {
+                       struct berval *bv;
+                       int ret, rc;
+                       const char *text;
+
+                       if( mra->ma_rule == a->a_desc->ad_type->sat_equality ) {
+                               bv = &e->e_nname;
+                       } else {
+                               bv = &e->e_name;
+                       }
+
+                       rc = value_match( &ret, a->a_desc, mra->ma_rule, 0,
+                               bv, &mra->ma_value, &text );
+       
+                       if( rc != LDAP_SUCCESS ) return rc;
+                       if ( ret == 0 ) return LDAP_COMPARE_TRUE;
+                       return LDAP_COMPARE_FALSE;
+               }
+
                for(a = attrs_find( e->e_attrs, mra->ma_desc );
                        a != NULL;
                        a = attrs_find( a->a_next, mra->ma_desc ) )