]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Import ACL be==NULL changes
authorKurt Zeilenga <kurt@openldap.org>
Wed, 29 Aug 2001 19:45:10 +0000 (19:45 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 29 Aug 2001 19:45:10 +0000 (19:45 +0000)
servers/slapd/acl.c
servers/slapd/filterentry.c

index baaf23df44491d122df779d5194d9bfac4e6e046..015f406f5754f371e69230399fa24e6b2753da1e 100644 (file)
@@ -97,11 +97,18 @@ access_allowed(
            access2str( access ),
                e->e_dn, attr );
 
-       assert( be != NULL );
        assert( e != NULL );
        assert( attr != NULL );
        assert( access > ACL_NONE );
 
+       if ( op == NULL ) {
+               /* no-op call */
+               return 1;
+       }
+
+       if ( be == NULL ) be = &backends[0];
+       assert( be != NULL );
+
        /* grant database root access */
        if ( be != NULL && be_isroot( be, op->o_ndn ) ) {
                Debug( LDAP_DEBUG_ACL,
index 6c310a0e7d10a72b76fa6a5e455ad490891cab00..13ae1a1fbb9622d2650db4146a7b5794c000413a 100644 (file)
@@ -157,7 +157,7 @@ test_ava_filter(
        int             i;
        Attribute       *a;
 
-       if ( be != NULL && ! access_allowed( be, conn, op, e,
+       if ( !access_allowed( be, conn, op, e,
                ava->aa_desc, ava->aa_value, ACL_SEARCH ) )
        {
                return LDAP_INSUFFICIENT_ACCESS;
@@ -242,8 +242,7 @@ test_presence_filter(
        AttributeDescription *desc
 )
 {
-       if ( be != NULL && ! access_allowed( be, conn, op, e,
-               desc, NULL, ACL_SEARCH ) )
+       if ( !access_allowed( be, conn, op, e, desc, NULL, ACL_SEARCH ) )
        {
                return LDAP_INSUFFICIENT_ACCESS;
        }
@@ -333,7 +332,7 @@ test_substrings_filter(
 
        Debug( LDAP_DEBUG_FILTER, "begin test_substrings_filter\n", 0, 0, 0 );
 
-       if ( be != NULL && ! access_allowed( be, conn, op, e,
+       if ( !access_allowed( be, conn, op, e,
                f->f_sub_desc, NULL, ACL_SEARCH ) )
        {
                return LDAP_INSUFFICIENT_ACCESS;