From: Howard Chu Date: Thu, 20 Apr 2006 22:20:25 +0000 (+0000) Subject: Make be_shadow_update more specific for syncrepl ops, since mirrormode X-Git-Tag: OPENLDAP_REL_ENG_2_4_1ALPHA~2^2~162 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c636f654a4f4f53a02278d7e4bfd6623f80910aa;p=openldap Make be_shadow_update more specific for syncrepl ops, since mirrormode lets normal users write to a syncrepl database --- diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index f054e50677..978f94649c 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -687,7 +687,10 @@ be_slurp_update( Operation *op ) int be_shadow_update( Operation *op ) { - return ( SLAP_SYNC_SHADOW( op->o_bd ) || + /* This assumes that all internal ops (connid == -1) on a syncrepl + * database are syncrepl operations. + */ + return (( SLAP_SYNC_SHADOW( op->o_bd ) && op->o_connid == -1 ) || ( SLAP_SHADOW( op->o_bd ) && be_isupdate_dn( op->o_bd, &op->o_ndn ) ) ); }