From: Howard Chu Date: Sun, 9 Oct 2005 21:17:18 +0000 (+0000) Subject: ITS#4035 let underlying backend know about updated rootdn X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~297 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8204cbc21232720c867c571c7e5295ae1af13989;p=openldap ITS#4035 let underlying backend know about updated rootdn --- diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index a36a236e1e..770b57ce8a 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -3437,6 +3437,11 @@ config_back_add( Operation *op, SlapReply *rs ) BackendDB *be = op->o_bd; slap_callback sc = { NULL, slap_null_cb, NULL, NULL }; op->o_bd = &cfb->cb_db; + /* FIXME: there must be a better way. */ + if ( op->o_bd->be_rootndn.bv_val != be->be_rootndn.bv_val ) { + op->o_bd->be_rootdn = be->be_rootdn; + op->o_bd->be_rootndn= be->be_rootndn; + } sc.sc_next = op->o_callback; op->o_callback = ≻ op->o_bd->be_add( op, rs ); @@ -3761,6 +3766,10 @@ config_back_modify( Operation *op, SlapReply *rs ) BackendDB *be = op->o_bd; slap_callback sc = { NULL, slap_null_cb, NULL, NULL }; op->o_bd = &cfb->cb_db; + if ( op->o_bd->be_rootndn.bv_val != be->be_rootndn.bv_val ) { + op->o_bd->be_rootdn = be->be_rootdn; + op->o_bd->be_rootndn= be->be_rootndn; + } sc.sc_next = op->o_callback; op->o_callback = ≻ op->o_bd->be_modify( op, rs );