]> git.sur5r.net Git - openldap/commitdiff
partially revert previous commit (ITS#3652)
authorPierangelo Masarati <ando@openldap.org>
Wed, 13 Apr 2005 01:03:46 +0000 (01:03 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 13 Apr 2005 01:03:46 +0000 (01:03 +0000)
servers/slapd/acl.c
servers/slapd/backend.c
servers/slapd/frontend.c

index c4ac1d9acf2c981885d7a75d6e4c504054e026fc..d51ffa37d2aa4db425f7d98ceab7c04e2e39a34b 100644 (file)
@@ -303,13 +303,13 @@ slap_access_allowed(
                                ( state->as_recorded & ACL_STATE_RECORDED_NV ) )
                        {
                                Debug( LDAP_DEBUG_ACL,
-                                       "slap_access_allowed: result from state (%s)\n",
+                                       "=> slap_access_allowed: result from state (%s)\n",
                                        attr, 0, 0 );
                                ret = state->as_result;
                                goto done;
                        } else {
                                Debug( LDAP_DEBUG_ACL,
-                                       "slap_access_allowed: no res from state (%s)\n",
+                                       "=> slap_access_allowed: no res from state (%s)\n",
                                        attr, 0, 0 );
                        }
                }
@@ -442,10 +442,15 @@ access_allowed_mask(
        assert( op->o_bd != NULL );
 
        /* this is enforced in backend_add() */
-       assert( op->o_bd->bd_info->bi_access_allowed );
+       if ( op->o_bd->bd_info->bi_access_allowed ) {
+               /* delegate to backend */
+               ret = op->o_bd->bd_info->bi_access_allowed( op, e, desc, val, access, state, &mask );
+
+       } else {
+               /* use default */
+               ret = slap_access_allowed( op, e, desc, val, access, state, &mask );
+       }
 
-       /* delegate to backend */
-       ret = op->o_bd->bd_info->bi_access_allowed( op, e, desc, val, access, state, &mask );
        if ( !ret ) {
                if ( ACL_IS_INVALID( mask ) ) {
                        Debug( LDAP_DEBUG_ACL,
index 26c9d452fae807da8b66fd3ab9e68ba256a6406b..e7009867f13a6f6c70f02c4d6650669ace5a4d27 100644 (file)
@@ -123,12 +123,6 @@ int backend_init(void)
                        return rc;
                }
 
-#ifdef SLAP_OVERLAY_ACCESS
-               if ( bi->bi_access_allowed == NULL ) {
-                       bi->bi_access_allowed = slap_access_allowed;
-               }
-#endif /* SLAP_OVERLAY_ACCESS */
-
                LDAP_STAILQ_INSERT_TAIL(&backendInfo, bi, bi_next);
        }
 
@@ -167,12 +161,6 @@ int backend_add(BackendInfo *aBackendInfo)
                return rc;
        }
 
-#ifdef SLAP_OVERLAY_ACCESS
-       if ( aBackendInfo->bi_access_allowed == NULL ) {
-               aBackendInfo->bi_access_allowed = slap_access_allowed;
-       }
-#endif /* SLAP_OVERLAY_ACCESS */
-
        (void)backend_init_controls( aBackendInfo );
 
        /* now add the backend type to the Backend Info List */
index 1d20ed7cc03507127a3ebf1215ba561aae26219a..f9cfe6f466137c0110dc178e324dc7c27704b8ae 100644 (file)
@@ -117,10 +117,6 @@ frontend_init( void )
        frontendDB->bd_info->bi_op_search = fe_op_search;
        frontendDB->bd_info->bi_extended = fe_extended;
 
-#ifdef SLAP_OVERLAY_ACCESS
-       frontendDB->bd_info->bi_access_allowed = slap_access_allowed;
-#endif /* SLAP_OVERLAY_ACCESS */
-
 #if 0
        /* FIXME: is this too early? */
        return backend_startup_one( frontendDB );