From: Ondřej Kuzník Date: Mon, 27 Apr 2026 10:44:06 +0000 (+0100) Subject: ITS#10497 Correct meaning of ctrlflag check to match intention X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=74329ff00a5e42f70995ff8ec0499c02110d66de;p=thirdparty%2Fopenldap.git ITS#10497 Correct meaning of ctrlflag check to match intention --- 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 {