From: Ondřej Kuzník Date: Wed, 30 Sep 2020 18:31:40 +0000 (+0100) Subject: ITS#9295 Do not replace 'op' X-Git-Tag: OPENLDAP_REL_ENG_2_5_0ALPHA~8^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efc23cddc35e063a3d76f1b798baa7ca554756fa;p=thirdparty%2Fopenldap.git ITS#9295 Do not replace 'op' --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index ab5251adda..b7607f5180 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -2287,8 +2287,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; @@ -2298,6 +2296,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; }