mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 16:49:39 -05:00
Remainder of fix for ITS#4615 - stop processing overlay stack at glue
boundary
This commit is contained in:
parent
6350fad63f
commit
1f35a953a1
3 changed files with 23 additions and 1 deletions
|
|
@ -199,13 +199,26 @@ glue_op_func ( Operation *op, SlapReply *rs )
|
|||
if ( func[which] )
|
||||
rc = func[which]( op, rs );
|
||||
else
|
||||
rc = SLAP_CB_CONTINUE;
|
||||
rc = SLAP_CB_BYPASS;
|
||||
|
||||
op->o_bd = b0;
|
||||
op->o_bd->bd_info = bi0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int
|
||||
glue_response ( Operation *op, SlapReply *rs )
|
||||
{
|
||||
slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
|
||||
BackendDB *be = op->o_bd;
|
||||
be = glue_back_select (op->o_bd, &op->o_req_ndn);
|
||||
|
||||
/* If we're on the master backend, let overlay framework handle it.
|
||||
* Otherwise, bail out.
|
||||
*/
|
||||
return ( op->o_bd == be ) ? SLAP_CB_CONTINUE : SLAP_CB_BYPASS;
|
||||
}
|
||||
|
||||
static int
|
||||
glue_chk_referrals ( Operation *op, SlapReply *rs )
|
||||
{
|
||||
|
|
@ -1012,6 +1025,7 @@ glue_sub_init()
|
|||
|
||||
glue.on_bi.bi_chk_referrals = glue_chk_referrals;
|
||||
glue.on_bi.bi_chk_controls = glue_chk_controls;
|
||||
glue.on_response = glue_response;
|
||||
|
||||
return overlay_register( &glue );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -238,6 +238,11 @@ over_back_response ( Operation *op, SlapReply *rs )
|
|||
if ( rc != SLAP_CB_CONTINUE ) break;
|
||||
}
|
||||
}
|
||||
/* Bypass the remaining on_response layers, but allow
|
||||
* normal execution to continue.
|
||||
*/
|
||||
if ( rc == SLAP_CB_BYPASS )
|
||||
rc = SLAP_CB_CONTINUE;
|
||||
op->o_bd = be;
|
||||
return rc;
|
||||
}
|
||||
|
|
@ -493,6 +498,8 @@ int overlay_op_walk(
|
|||
if ( rc != SLAP_CB_CONTINUE ) break;
|
||||
}
|
||||
}
|
||||
if ( rc == SLAP_CB_BYPASS )
|
||||
rc = SLAP_CB_CONTINUE;
|
||||
|
||||
func = &oi->oi_orig->bi_op_bind;
|
||||
if ( func[which] && rc == SLAP_CB_CONTINUE ) {
|
||||
|
|
|
|||
|
|
@ -2261,6 +2261,7 @@ typedef struct slap_overinfo {
|
|||
|
||||
/* Should successive callbacks in a chain be processed? */
|
||||
#define SLAP_CB_FREEME 0x04000
|
||||
#define SLAP_CB_BYPASS 0x08800
|
||||
#define SLAP_CB_CONTINUE 0x08000
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue