From bccf2a72825a7069fefbb0550b4c11117f0374a5 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 22 Jul 2005 17:22:51 +0000 Subject: [PATCH] backout previous commit: frontendDB doesn't have the right rootn, ACLs and so --- servers/slapd/acl.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/servers/slapd/acl.c b/servers/slapd/acl.c index e7dcc18ccd..7306baa294 100644 --- a/servers/slapd/acl.c +++ b/servers/slapd/acl.c @@ -359,7 +359,6 @@ access_allowed_mask( const char *attr; int st_same_attr = 0; static AccessControlState state_init = ACL_STATE_INIT; - BackendDB *be_orig; assert( e != NULL ); assert( desc != NULL ); @@ -430,15 +429,25 @@ access_allowed_mask( /* this is enforced in backend_add() */ 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 ); + ret = op->o_bd->bd_info->bi_access_allowed( op, e, + desc, val, access, state, &mask ); } else { - /* use default (but pass through frontend for global ACL overlays) */ - be_orig = op->o_bd; +#if 0 + /* FIXME: this doesn't work because frontendDB doesn't have + * the right rootn, ACLs and so. */ + BackendDB *be_orig; + /* use default (but pass through frontend + * for global ACL overlays) */ + be_orig = op->o_bd; op->o_bd = frontendDB; - ret = frontendDB->bd_info->bi_access_allowed( op, e, desc, val, access, state, &mask ); + ret = frontendDB->bd_info->bi_access_allowed( op, e, + desc, val, access, state, &mask ); op->o_bd = be_orig; +#endif + ret = slap_access_allowed( op, e, + desc, val, access, state, &mask ); } if ( !ret ) { -- 2.39.5