From 8409c5496437ee66d5a7e68b39dedc6f741c3678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Wed, 1 Apr 2026 12:52:50 +0100 Subject: [PATCH 1/6] ITS#9888 fix regression test --- tests/data/regressions/its9888/its9888 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/data/regressions/its9888/its9888 b/tests/data/regressions/its9888/its9888 index 3b094ceece..e06293e452 100755 --- a/tests/data/regressions/its9888/its9888 +++ b/tests/data/regressions/its9888/its9888 @@ -21,7 +21,7 @@ if test $SYNCPROV = syncprovno; then exit 0 fi -ITS=9288 +ITS=9888 CFPRO=$TESTDIR/cfpro.d CFCON=$TESTDIR/cfcon.d @@ -226,6 +226,13 @@ add: olcUpdateRef olcUpdateRef: $URI1 EOF +RC=$? +if test $RC != 0 ; then + echo "ldapmodify failed ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit $RC +fi + sleep 1 echo "Using ldapsearch to check that syncrepl received config changes..." @@ -482,7 +489,7 @@ timestamp=`date --utc +"%Y%m%d%H%M%S.%6NZ"` newcsn="${timestamp}#000000#001#000000" sed -i -e "s/entryCSN:.*/entryCSN: $newcsn/" testrun/config-consumer.ldif -sed -i -e 's/contextCSN: .*#001#.*/contextCSN: 20230724180831.311873Z#000000#001#000000/' testrun/config-consumer.ldif +sed -i -e 's/contextCSN: .*#001#.*/contextCSN: $newcsn/' testrun/config-consumer.ldif mv testrun/db.1.a testrun/db.1.a.orig mkdir -p testrun/db.1.a From ae924d51c3a24c2083f8e2ffb3ff320d2971e47e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Tue, 31 Mar 2026 17:35:14 +0100 Subject: [PATCH 2/6] ITS#10250 syncrepl: contextCSN can now be the last attribute in the list --- servers/slapd/syncrepl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 0303a2e82e..4a94773686 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -5992,8 +5992,15 @@ void syncrepl_diff_entry( Operation *op, Attribute *old, Attribute *new, /* These are all missing from provider */ while ( old ) { - Modifications *mod = ch_malloc( sizeof( Modifications ) ); + Modifications *mod; + /* Skip contextCSN we screen ourselves */ + if ( is_ctx && old->a_desc == slap_schema.si_ad_contextCSN ) { + old = old->a_next; + continue; + } + + mod = ch_malloc( sizeof( Modifications ) ); mod->sml_op = LDAP_MOD_DELETE; mod->sml_flags = 0; mod->sml_desc = old->a_desc; From 4e2377cc3f7fe8f6b9fde0e4d5f2e147cdf668cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Fri, 10 Apr 2026 11:19:45 +0100 Subject: [PATCH 3/6] ITS#10250 tests: Accept changes in attribute ordering in here as well --- tests/scripts/test045-syncreplication-proxied | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/scripts/test045-syncreplication-proxied b/tests/scripts/test045-syncreplication-proxied index d84fbd8cc2..d81eaafb28 100755 --- a/tests/scripts/test045-syncreplication-proxied +++ b/tests/scripts/test045-syncreplication-proxied @@ -844,9 +844,9 @@ if test $RC != 0 ; then fi #echo "Filtering provider results..." -$LDIFFILTER < "${PROVIDEROUT}.$CHECK" > $PROVIDERFLT +$LDIFFILTER -s a < "${PROVIDEROUT}.$CHECK" > $PROVIDERFLT #echo "Filtering consumer results..." -$LDIFFILTER < "${CONSUMEROUT}.$CHECK" > $CONSUMERFLT +$LDIFFILTER -s a < "${CONSUMEROUT}.$CHECK" > $CONSUMERFLT echo "$CHECK < Comparing retrieved entries from provider and consumer..." $CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT From 2aca8945a1a5ccd8ee85a0f1466e52e4f53e4b2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Fri, 10 Apr 2026 11:20:24 +0100 Subject: [PATCH 4/6] ITS#10250 tests: Do not silently succeed anymore --- tests/scripts/test045-syncreplication-proxied | 57 ++----------------- 1 file changed, 6 insertions(+), 51 deletions(-) diff --git a/tests/scripts/test045-syncreplication-proxied b/tests/scripts/test045-syncreplication-proxied index d81eaafb28..8f935bfc25 100755 --- a/tests/scripts/test045-syncreplication-proxied +++ b/tests/scripts/test045-syncreplication-proxied @@ -712,53 +712,9 @@ echo "$CHECK < Comparing retrieved entries from provider and consumer..." $CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT if test $? != 0 ; then - # FIXME: keep the original workaround in place, in case we needed again - if test 1 = 1 ; then - echo "test failed - provider and consumer databases differ" - test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit 1 - fi - - echo " test failed - provider and consumer databases differ (ignored by now)" - echo " Stopping proxy to see if it auto-recovers..." - kill -HUP $PROXYPID - wait $PROXYPID - - echo " ${CHECK}.1 > Restarting proxy..." - echo "======================= RESTART =======================" >> $LOG3 - $SLAPD -f $CONF3 -h $URI3 -d $LVL >> $LOG3 2>&1 & - PROXYPID=$! - if test $WAIT != 0 ; then - echo PROXYPID $PROXYPID - read foo - fi - KILLPIDS="$PROVIDERPID $CONSUMERPID $PROXYPID" - - echo " Waiting $SLEEP2 seconds for syncrepl to receive changes..." - sleep $SLEEP2 - - #echo "Using ldapsearch to read all the entries from the consumer..." - $LDAPSEARCH -S "" -b "$BASEDN" -H $URI2 \ - '(objectClass=*)' > "${CONSUMEROUT}.5.1" 2>&1 - RC=$? - - if test $RC != 0 ; then - echo " ldapsearch failed at consumer ($RC)!" - test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC - fi - - #echo "Filtering consumer results..." - $LDIFFILTER < "${CONSUMEROUT}.5.1" > $CONSUMERFLT - - echo " ${CHECK}.1 < Comparing retrieved entries from provider and consumer..." - $CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT - - if test $? != 0 ; then - echo " test failed - provider and consumer databases differ" - test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit 1 - fi + echo "test failed - provider and consumer databases differ" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit 1 fi # @@ -852,10 +808,9 @@ echo "$CHECK < Comparing retrieved entries from provider and consumer..." $CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT if test $? != 0 ; then - echo "test failed - provider and consumer databases differ (ignored by now)" - #echo "test failed - provider and consumer databases differ" - #test $KILLSERVERS != no && kill -HUP $KILLPIDS - #exit 1 + echo "test failed - provider and consumer databases differ" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit 1 fi test $KILLSERVERS != no && kill -HUP $KILLPIDS From 4f643c12bc54b636a1a1412dc112731c289d0101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Wed, 1 Apr 2026 09:57:04 +0100 Subject: [PATCH 5/6] ITS#10229 docs: Document limitations in ldap_result return code usefulness --- doc/man/man3/ldap_result.3 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/man/man3/ldap_result.3 b/doc/man/man3/ldap_result.3 index 87143a800e..248af676ec 100644 --- a/doc/man/man3/ldap_result.3 +++ b/doc/man/man3/ldap_result.3 @@ -128,6 +128,18 @@ timeout specified was exceeded. and .B ldap_msgid() return \-1 on error. +.SH BUGS +When there are multiple messages in +.BR **result +including a result message (common with searches), the return value of +.B ldap_result +will vary depending on various factors. Some implementations have started +depending on this behaviour and as such it is unlikely to be be fixed in the +2.x release series. To get the actual message type you're interested, use +.B ldap_first_message +or +.B ldap_parse_result +as needed. .SH SEE ALSO .BR ldap (3), .BR ldap_first_message (3), From b01d768449d7802be93a9e846f17e9605451f4b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Thu, 2 Apr 2026 14:10:40 +0100 Subject: [PATCH 6/6] ITS#10266 lloadd: Correct NoD handling --- servers/lloadd/upstream.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/servers/lloadd/upstream.c b/servers/lloadd/upstream.c index 25ff2dd314..78ffcc0f4a 100644 --- a/servers/lloadd/upstream.c +++ b/servers/lloadd/upstream.c @@ -148,7 +148,6 @@ handle_unsolicited( LloadConnection *c, BerElement *ber ) assert( c->c_state != LLOAD_C_INVALID ); if ( c->c_state == LLOAD_C_DYING ) { - CONNECTION_UNLOCK(c); goto out; } c->c_state = LLOAD_C_CLOSING; @@ -208,12 +207,6 @@ handle_unsolicited( LloadConnection *c, BerElement *ber ) RELEASE_REF( client, c_refcnt, client->c_destroy ); } - if ( c->c_state == LLOAD_C_CLOSING && c->c_ops ) { - CONNECTION_UNLOCK(c); - } else { - CONNECTION_DESTROY(c); - } - out: ber_free( ber, 1 ); if ( c->c_state == LLOAD_C_CLOSING && c->c_ops ) {