]> git.sur5r.net Git - openldap/commitdiff
Make defaulted backend available to ACL plugin pblock
authorLuke Howard <lukeh@openldap.org>
Thu, 1 Jan 2004 09:42:44 +0000 (09:42 +0000)
committerLuke Howard <lukeh@openldap.org>
Thu, 1 Jan 2004 09:42:44 +0000 (09:42 +0000)
servers/slapd/acl.c

index 95492f54cf26cd944930c12020eb2a7cd0d40041..4b4bd1c634d44dc763de1fd7bef6ae21c33e0d4e 100644 (file)
@@ -200,6 +200,14 @@ access_allowed(
                goto done;
        }
 
+       be = op->o_bd;
+       if ( be == NULL ) {
+               be = &backends[0];
+               be_null = 1;
+               op->o_bd = be;
+       }
+       assert( be != NULL );
+
 #ifdef LDAP_SLAPI
        if ( op->o_pb != NULL ) {
                ret = slapi_int_access_allowed( op, e, desc, val, access, state );
@@ -210,14 +218,6 @@ access_allowed(
        }
 #endif /* LDAP_SLAPI */
 
-       be = op->o_bd;
-       if ( be == NULL ) {
-               be = &backends[0];
-               be_null = 1;
-               op->o_bd = be;
-       }
-       assert( be != NULL );
-
        /* grant database root access */
        if ( be != NULL && be_isroot( be, &op->o_ndn ) ) {
 #ifdef NEW_LOGGING