]> git.sur5r.net Git - openldap/commitdiff
More for ITS#6608 - don't replicate ppolicy state changes on replicas
authorHoward Chu <hyc@openldap.org>
Wed, 4 Aug 2010 08:14:59 +0000 (08:14 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 4 Aug 2010 08:14:59 +0000 (08:14 +0000)
servers/slapd/overlays/accesslog.c
servers/slapd/overlays/ppolicy.c

index aa165b7d0cecc46c06fb5464741d12147ad34d1e..a32b763207082f16f401ccda7b21035e93e55f83 100644 (file)
@@ -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 )
index 2b9f25f68a23ba2e77276132e25ccc29254b08c2..34d7ed6ad124fbeb1fa320eb13fb66c57fb369df 100644 (file)
@@ -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 );