mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
partially revert previous commit (ITS#3652)
This commit is contained in:
parent
4a5cef7472
commit
a6f8cd07f6
@ -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,
|
||||
|
@ -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 */
|
||||
|
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user