( 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 );
}
}
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,
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);
}
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 */
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 );