]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/filterentry.c
Set peeraddr also for IPv6, fixes ITS#1918
[openldap] / servers / slapd / filterentry.c
index 94724f8da5c3604e3e357ca34794411de5b19df3..af513e29c565ca7035d0529a0ca3db57d1ab9c12 100644 (file)
@@ -228,22 +228,11 @@ static int test_mra_filter(
        Attribute       *a;
 
        if( !access_allowed( be, conn, op, e,
-               mra->ma_desc, &mra->ma_value, ACL_SEARCH ) )
+               mra->ma_desc, &mra->ma_value, ACL_SEARCH, NULL ) )
        {
                return LDAP_INSUFFICIENT_ACCESS;
        }
 
-       if( strcmp(mra->ma_rule->smr_syntax->ssyn_oid,
-               mra->ma_desc->ad_type->sat_syntax->ssyn_oid) != 0)
-       {
-               return LDAP_INVALID_SYNTAX;
-       }
-
-       if( mra->ma_rule == NULL )
-       {
-               return LDAP_INAPPROPRIATE_MATCHING;
-       }
-
        for(a = attrs_find( e->e_attrs, mra->ma_desc );
                a != NULL;
                a = attrs_find( a->a_next, mra->ma_desc ) )
@@ -263,7 +252,7 @@ static int test_mra_filter(
                                return rc;
                        }
 
-                       if ( ret ) {
+                       if ( ret == 0 ) {
                                return LDAP_COMPARE_TRUE;
                        }
                }
@@ -285,7 +274,7 @@ test_ava_filter(
        Attribute       *a;
 
        if ( !access_allowed( be, conn, op, e,
-               ava->aa_desc, &ava->aa_value, ACL_SEARCH ) )
+               ava->aa_desc, &ava->aa_value, ACL_SEARCH, NULL ) )
        {
                return LDAP_INSUFFICIENT_ACCESS;
        }
@@ -370,7 +359,7 @@ test_presence_filter(
        AttributeDescription *desc
 )
 {
-       if ( !access_allowed( be, conn, op, e, desc, NULL, ACL_SEARCH ) )
+       if ( !access_allowed( be, conn, op, e, desc, NULL, ACL_SEARCH, NULL ) )
        {
                return LDAP_INSUFFICIENT_ACCESS;
        }
@@ -491,7 +480,7 @@ test_substrings_filter(
 
 
        if ( !access_allowed( be, conn, op, e,
-               f->f_sub_desc, NULL, ACL_SEARCH ) )
+               f->f_sub_desc, NULL, ACL_SEARCH, NULL ) )
        {
                return LDAP_INSUFFICIENT_ACCESS;
        }