From 8ff00e1d5fd4580b592d0b42c5512cdfda7ad1f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Wed, 30 Sep 2020 19:31:40 +0100 Subject: [PATCH] ITS#9295 Do not replace 'op' --- servers/slapd/syncrepl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 7e8a172825..9f2d57c9d5 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -1956,8 +1956,6 @@ syncrepl_accesslog_mods( if ( !mod || ad != mod->sml_desc || op != mod->sml_op ) { mod = (Modifications *) ch_malloc( sizeof( Modifications ) ); - if ( op == LDAP_MOD_ADD && is_at_single_value( ad->ad_type )) - op = LDAP_MOD_REPLACE; mod->sml_flags = 0; mod->sml_op = op; mod->sml_next = NULL; @@ -1967,6 +1965,10 @@ syncrepl_accesslog_mods( mod->sml_nvalues = NULL; mod->sml_numvals = 0; + /* Keep 'op' to reflect what we read out from accesslog */ + if ( op == LDAP_MOD_ADD && is_at_single_value( ad->ad_type )) + mod->sml_op = LDAP_MOD_REPLACE; + *modtail = mod; modtail = &mod->sml_next; } -- 2.47.2