From c636f654a4f4f53a02278d7e4bfd6623f80910aa Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 20 Apr 2006 22:20:25 +0000 Subject: [PATCH] Make be_shadow_update more specific for syncrepl ops, since mirrormode lets normal users write to a syncrepl database --- servers/slapd/backend.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 ) ) ); } -- 2.39.5