return LDAP_UNWILLING_TO_PERFORM;
}
+typedef struct fe_extra {
+ OpExtra fe_oe;
+ BackendDB *fe_be;
+} fe_extra;
+
int
fe_acl_group(
Operation *op,
int freeattr = 0, i, j, rc = LDAP_SUCCESS;
AccessControlState acl_state = ACL_STATE_INIT;
Backend *be = op->o_bd;
+ fe_extra *fex;
- op->o_bd = select_backend( edn, 0 );
+ for ( fex = (fe_extra *)op->o_extra; fex; fex = (fe_extra *)fex->fe_oe.oe_next ) {
+ if ( fex->fe_oe.oe_key == (void *)frontend_init )
+ break;
+ }
+
+ if ( fex && fex->fe_be )
+ op->o_bd = fex->fe_be;
+ else
+ op->o_bd = select_backend( edn, 0 );
if ( target && dn_match( &target->e_nname, edn ) ) {
e = target;
slap_access_t access )
{
int rc;
- BackendDB *be_orig;
+ fe_extra fex;
+
+ fex.fe_be = op->o_bd;
+ fex.fe_oe.oe_key = (void *)frontend_init;
+ fex.fe_oe.oe_next = op->o_extra;
+ op->o_extra = (OpExtra *)&fex;
- be_orig = op->o_bd;
op->o_bd = frontendDB;
rc = frontendDB->be_attribute( op, target, edn,
entry_at, vals, access );
- op->o_bd = be_orig;
+ op->o_bd = fex.fe_be;
+ slap_op_popextra( op, (OpExtra *)&fex );
return rc;
}
return( op );
}
+void
+slap_op_popextra( Operation *op, OpExtra *oe )
+{
+ OpExtra **prev;
+
+ for ( prev = &op->o_extra; *prev; prev = &(*prev)->oe_next ) {
+ if ( *prev == oe ) {
+ *prev = oe->oe_next;
+ break;
+ }
+ }
+}
+
slap_op_t
slap_req2op( ber_tag_t tag )
{
BerElement *ber, ber_int_t msgid,
ber_tag_t tag, ber_int_t id, void *ctx ));
-LDAP_SLAPD_F (int) slap_op_add LDAP_P(( Operation **olist, Operation *op ));
-LDAP_SLAPD_F (int) slap_op_remove LDAP_P(( Operation **olist, Operation *op ));
-LDAP_SLAPD_F (Operation *) slap_op_pop LDAP_P(( Operation **olist ));
LDAP_SLAPD_F (slap_op_t) slap_req2op LDAP_P(( ber_tag_t tag ));
+LDAP_SLAPD_F (void) slap_op_popextra LDAP_P(( Operation *op, OpExtra *oe ));
/*
* operational.c