https://bugs.openldap.org/show_bug.cgi?id=10497
Issue ID: 10497 Summary: o_ctrlflags usage confused Product: OpenLDAP Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: slapd Assignee: bugs@openldap.org Reporter: ondra@mistotebe.net Target Milestone: ---
There is widespread confusion about what is stored in o_ctrlflags (and retrieved with get_<control> macros.)
Some code is spot on e.g., get_pagedresults() and checks for SLAP_CONTROL_NON/CRITICAL/IGNORED as it should, most of them expect 0/1 (assert, manageDSAiT, ...)
We could correct all the get_* tests to check for > IGNORED or just add a has_ variant if we want to keep the code simple for those that don't need to bother.
And we want to fix autogroup to set o.o_permissive_modify correctly.
https://bugs.openldap.org/show_bug.cgi?id=10497
Ondřej Kuzník ondra@mistotebe.net changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.openldap.org/s | |how_bug.cgi?id=6198
https://bugs.openldap.org/show_bug.cgi?id=10497
--- Comment #1 from Ondřej Kuzník ondra@mistotebe.net --- The problem with adding has_* is that outside code still using get_* or doing what autogroup does will still do the wrong thing.
We have changed the control surface already in 2.7 (slap_add_ctrls has a different signature) and people using controls on the sending side are the ones most likely to be dealing with controls on the receiving side. Maybe we just need to put this in the upgrade docs.
https://bugs.openldap.org/show_bug.cgi?id=10497
Ondřej Kuzník ondra@mistotebe.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |IN_PROGRESS Assignee|bugs@openldap.org |ondra@mistotebe.net
--- Comment #2 from Ondřej Kuzník ondra@mistotebe.net --- https://git.openldap.org/openldap/openldap/-/merge_requests/863
https://bugs.openldap.org/show_bug.cgi?id=10497
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.7.0 Keywords|needs_review |
https://bugs.openldap.org/show_bug.cgi?id=10497
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |TEST
--- Comment #3 from Quanah Gibson-Mount quanah@openldap.org --- head:
• 4fa1530c by Ondřej Kuzník at 2026-04-29T00:09:35+00:00 ITS#10497 slap.h: Introduce o_ctrlflag related macros
• e1619027 by Ondřej Kuzník at 2026-04-29T00:09:35+00:00 ITS#10497 autogroup: use the right value for permissive_modify
• 9e396fb4 by Ondřej Kuzník at 2026-04-29T00:09:35+00:00 ITS#10497 bconfig: use the right value for noop
• eb2629b0 by Ondřej Kuzník at 2026-04-29T00:09:35+00:00 ITS#10497 Use the wants_ as a shorthand where already good
• 18a87a00 by Ondřej Kuzník at 2026-04-29T00:09:35+00:00 ITS#10497 Mask ctrlflag value where missing
• 74329ff0 by Ondřej Kuzník at 2026-04-29T00:09:35+00:00 ITS#10497 Correct meaning of ctrlflag check to match intention
• 4b16061c by Ondřej Kuzník at 2026-04-29T00:09:35+00:00 ITS#10497 Update checks to distinguish IGNORED vs. (NON-)CRITICAL controls
• 24afb5a2 by Ondřej Kuzník at 2026-04-29T00:09:35+00:00 ITS#10497 slapo-chain: Introduce wants_ macros