mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
ITS#4218 streamline frontend/overlay access_allowed. Probably need to
do the same for acl_group and acl_attribute.
This commit is contained in:
parent
48cb85865d
commit
b831ebba7d
@ -310,8 +310,9 @@ fe_access_allowed(
|
||||
*/
|
||||
be_orig = op->o_bd;
|
||||
|
||||
op->o_bd = select_backend( &op->o_req_ndn, 0, 0 );
|
||||
if ( op->o_bd == NULL ) {
|
||||
op->o_bd = select_backend( &op->o_req_ndn, 0, 0 );
|
||||
if ( op->o_bd == NULL )
|
||||
op->o_bd = frontendDB;
|
||||
}
|
||||
rc = slap_access_allowed( op, e, desc, val, access, state, maskp );
|
||||
@ -423,14 +424,10 @@ access_allowed_mask(
|
||||
desc, val, access, state, &mask );
|
||||
|
||||
} else {
|
||||
BackendDB *be_orig = op->o_bd;
|
||||
|
||||
/* use default (but pass through frontend
|
||||
* for global ACL overlays) */
|
||||
op->o_bd = frontendDB;
|
||||
ret = frontendDB->bd_info->bi_access_allowed( op, e,
|
||||
desc, val, access, state, &mask );
|
||||
op->o_bd = be_orig;
|
||||
}
|
||||
|
||||
if ( !ret ) {
|
||||
|
@ -252,7 +252,7 @@ over_access_allowed(
|
||||
{
|
||||
slap_overinfo *oi;
|
||||
slap_overinst *on;
|
||||
BackendInfo *bi = op->o_bd->bd_info;
|
||||
BackendInfo *bi;
|
||||
BackendDB *be = op->o_bd, db;
|
||||
int rc = SLAP_CB_CONTINUE;
|
||||
|
||||
@ -260,7 +260,13 @@ over_access_allowed(
|
||||
* when global overlays are used... */
|
||||
assert( op->o_bd != NULL );
|
||||
|
||||
bi = op->o_bd->bd_info;
|
||||
/* Were we invoked on the frontend? */
|
||||
if ( !bi->bi_access_allowed ) {
|
||||
oi = frontendDB->bd_info->bi_private;
|
||||
} else {
|
||||
oi = op->o_bd->bd_info->bi_private;
|
||||
}
|
||||
on = oi->oi_list;
|
||||
|
||||
for ( ; on; on = on->on_next ) {
|
||||
|
Loading…
Reference in New Issue
Block a user