]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/aci.c
fix typo
[openldap] / servers / slapd / aci.c
index ac786ace756f4faad96051293d1125abf3ebd89d..de0b6c6ac39703bdd39eb0d180877c0572f5ed5e 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2007 The OpenLDAP Foundation.
+ * Copyright 1998-2008 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -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 ) );
 
@@ -592,11 +597,10 @@ aci_mask(
                                at != NULL;
                                at = attrs_find( at->a_next, ad ) )
                {
-                       if ( value_find_ex( ad,
+                       if ( attr_valfind( at, 
                                SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH |
                                        SLAP_MR_ASSERTED_VALUE_NORMALIZED_MATCH,
-                               at->a_nvals,
-                               &op->o_ndn, op->o_tmpmemctx ) == 0 )
+                               &op->o_ndn, NULL, op->o_tmpmemctx ) == 0 )
                        {
                                rc = 1;
                                break;
@@ -1739,6 +1743,12 @@ OpenLDAPaciPrettyNormal(
                }
 
                nsubject = ad->ad_cname;
+
+       } else if ( OpenLDAPacitypes[ idx ] == &aci_bv[ ACI_BV_SET ]
+               || OpenLDAPacitypes[ idx ] == &aci_bv[ ACI_BV_SET_REF ] )
+       {
+               /* NOTE: dunno how to normalize it... */
+               nsubject = subject;
        }