diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 9fcdc17112831ec23eb743e35f7c3f8503b24a13..901e65433c107b16ade6b1cd16ea921864656cdc 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -1749,6 +1749,22 @@ syncrepl_entry( ber_memfree( a->a_vals[0].bv_val ); ber_dupbv( &a->a_vals[0], &syncUUID_strrep ); } + /* Don't save the contextCSN on the inooming context entry, + * we'll write it when syncrepl_updateCookie eventually + * gets called. (ITS#4622) + */ + if ( syncstate == LDAP_SYNC_ADD && dn_match( &entry->e_nname, + &be->be_nsuffix[0] )) { + Attribute **ap; + for ( ap = &entry->e_attrs; *ap; ap=&(*ap)->a_next ) { + a = *ap; + if ( a->a_desc == slap_schema.si_ad_contextCSN ) { + *ap = a->a_next; + attr_free( a ); + break; + } + } + } } slap_op_time( &op->o_time, &op->o_tincr );