]> git.sur5r.net Git - openldap/commitdiff
optimize ACI check (ITS#5636)
authorPierangelo Masarati <ando@openldap.org>
Sat, 9 Aug 2008 12:26:17 +0000 (12:26 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 9 Aug 2008 12:26:17 +0000 (12:26 +0000)
servers/slapd/aci.c

index 580590f12218cf2d23ac4ed86f0b1de0e0bc588b..ee3c38f68dbf74d9589c153556cec964a001192c 100644 (file)
@@ -345,9 +345,12 @@ aci_list_get_rights(
                        continue;
                }
 
-               found = 1;
                *mask |= aci_list_get_attr_rights( &perm, attr, val );
                *mask |= aci_list_get_attr_rights( &perm, &aci_bv[ ACI_BV_BR_ALL ], NULL );
+
+               if ( *mask != ACL_PRIV_NONE ) { 
+                       found = 1;
+               }
        }
 
        return found;
@@ -439,7 +442,9 @@ aci_mask(
                                opts,
                                sdn;
        int                     rc;
-               
+
+       ACL_INIT( *grant );
+       ACL_INIT( *deny );
 
        assert( !BER_BVISNULL( &desc->ad_cname ) );