From e8f1038de04af4d7ce490eb132bb04f63d6ee4bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Wed, 13 Oct 2021 16:11:43 +0100 Subject: [PATCH] ITS#9647 Treat glue entries as missing We're using MANAGE_DSAIT control so we get to see them, but they don't really exist (except for their CSN sometimes). --- servers/slapd/overlays/syncprov.c | 6 +++++- servers/slapd/syncrepl.c | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 75ef1ae4a7..e60884d7e0 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -1411,7 +1411,8 @@ syncprov_matchops( Operation *op, opcookie *opc, int saveit ) } } - if ( fc.fscope ) { + rc = LDAP_COMPARE_FALSE; + if ( !is_entry_glue( e ) && fc.fscope ) { ldap_pvt_thread_mutex_lock( &ss->s_mutex ); op2 = *ss->s_op; oh = *op->o_hdr; @@ -2949,6 +2950,9 @@ syncprov_search_response( Operation *op, SlapReply *rs ) "bogus referral in context\n", op->o_log_prefix ); return SLAP_CB_CONTINUE; } + if ( is_entry_glue( rs->sr_entry ) ) { + return LDAP_SUCCESS; + } a = attr_find( rs->sr_entry->e_attrs, slap_schema.si_ad_entryCSN ); if ( a == NULL && rs->sr_operational_attrs != NULL ) { a = attr_find( rs->sr_operational_attrs, slap_schema.si_ad_entryCSN ); diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 4600f50bce..9f72b33bcc 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -5719,6 +5719,10 @@ nonpresent_callback( if ( a == NULL ) return 0; } + if ( is_entry_glue( rs->sr_entry ) ) { + return LDAP_SUCCESS; + } + if ( present_uuid == NULL ) { int covered = 1; /* covered by our new contextCSN? */