From 74329ff00a5e42f70995ff8ec0499c02110d66de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Mon, 27 Apr 2026 11:44:06 +0100 Subject: [PATCH] ITS#10497 Correct meaning of ctrlflag check to match intention --- servers/slapd/overlays/ppolicy.c | 2 +- servers/slapd/overlays/syncprov.c | 2 +- servers/slapd/result.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c index 2adf462a1c..9a3144517f 100644 --- a/servers/slapd/overlays/ppolicy.c +++ b/servers/slapd/overlays/ppolicy.c @@ -2082,7 +2082,7 @@ ppolicy_operational( Operation *op, SlapReply *rs ) * the DB (and syncrepl clients not to commit our generated copy), callers * need to make sure they don't copy the control from their op if they need * it resolved anyway */ - if ( op->o_managedsait != SLAP_CONTROL_NONE ) + if ( wants_manageDSAit( op ) ) return SLAP_CB_CONTINUE; /* No entry or attribute already set? Nothing to do */ diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 80b64d0972..461cba7add 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -3606,7 +3606,7 @@ syncprov_operational( /* This prevents generating unnecessarily; frontend will strip * any statically stored copy. */ - if ( op->o_sync != SLAP_CONTROL_NONE ) + if ( wants_sync( op ) ) return SLAP_CB_CONTINUE; if ( rs->sr_entry && diff --git a/servers/slapd/result.c b/servers/slapd/result.c index a2bd712610..32599e236d 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -1212,7 +1212,7 @@ slap_send_search_entry( Operation *op, SlapReply *rs ) if ( !SLAP_OPATTRS( rs->sr_attr_flags )) continue; /* if DSA-specific and replicating, skip */ - if ( op->o_sync != SLAP_CONTROL_NONE && + if ( wants_sync( op ) && desc->ad_type->sat_usage == LDAP_SCHEMA_DSA_OPERATION ) continue; } @@ -1378,7 +1378,7 @@ slap_send_search_entry( Operation *op, SlapReply *rs ) continue; } /* if DSA-specific and replicating, skip */ - if ( op->o_sync != SLAP_CONTROL_NONE && + if ( wants_sync( op ) && desc->ad_type->sat_usage == LDAP_SCHEMA_DSA_OPERATION ) continue; } else {