From 21d299e370134bd2b2adf1d70ccdb7ab79c660a8 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 4 Aug 2010 08:14:59 +0000 Subject: [PATCH] More for ITS#6608 - don't replicate ppolicy state changes on replicas --- servers/slapd/overlays/accesslog.c | 2 ++ servers/slapd/overlays/ppolicy.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/servers/slapd/overlays/accesslog.c b/servers/slapd/overlays/accesslog.c index aa165b7d0c..a32b763207 100644 --- a/servers/slapd/overlays/accesslog.c +++ b/servers/slapd/overlays/accesslog.c @@ -1388,6 +1388,8 @@ static int accesslog_response(Operation *op, SlapReply *rs) { } } ldap_pvt_thread_rmutex_unlock( &li->li_op_rmutex, op->o_tid ); + if ( op->o_dont_replicate && op->orm_no_opattrs ) + goto done; } if ( li->li_success && rs->sr_err != LDAP_SUCCESS ) diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c index 2b9f25f68a..34d7ed6ad1 100644 --- a/servers/slapd/overlays/ppolicy.c +++ b/servers/slapd/overlays/ppolicy.c @@ -1165,9 +1165,11 @@ locked: c.ldctl_iscritical = 1; c.ldctl_oid = LDAP_CONTROL_RELAX; } else { - /* If not forwarding, don't update opattrs */ - if ( SLAP_SINGLE_SHADOW( op->o_bd )) + /* If not forwarding, don't update opattrs and don't replicate */ + if ( SLAP_SINGLE_SHADOW( op->o_bd )) { op2.orm_no_opattrs = 1; + op2.o_dont_replicate = 1; + } op2.o_bd->bd_info = (BackendInfo *)on->on_info; } rc = op2.o_bd->be_modify( &op2, &r2 ); -- 2.39.5