https://bugs.openldap.org/show_bug.cgi?id=10492
Issue ID: 10492 Summary: slapd: send_ldap_result must massage return code before handling abandon Product: OpenLDAP Version: 2.6.13 Hardware: All OS: All Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: slapd Assignee: bugs@openldap.org Reporter: hyc@openldap.org Target Milestone: ---
send_ldap_result checks if rs->sr_err == LDAP_REFERRAL and rs->sr_ref == NULL. In that case, there's no actual referral to send so it changes rs->sr_err to LDAP_NO_SUCH_OBJECT. Later send_ldap_response checks if rs->sr_ref == NULL and asserts if rs->sr_err == LDAP_REFERRAL.
If an op was abandoned, the adjustment in send_ldap_result was being skipped, allowing the assert in send_ldap_response to get triggered. The fix is to move the check for abandon to after the error code adjustment has occurred.
https://bugs.openldap.org/show_bug.cgi?id=10492
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.6.14 Status|UNCONFIRMED |RESOLVED Resolution|--- |TEST Keywords|needs_review |
--- Comment #1 from Howard Chu hyc@openldap.org --- Fixed in master a73d539730e43e1ddf4f6adee2c2e87243b3fd15
https://bugs.openldap.org/show_bug.cgi?id=10492
--- Comment #2 from Howard Chu hyc@openldap.org --- Note - the previous code is only a problem when the op was actually cancelled, not abandoned. In the abandon case response processing stops and send_ldap_response never gets invoked. But in the cancel case, processing continues and send_ldap_response gets an assert failure.
https://bugs.openldap.org/show_bug.cgi?id=10492
--- Comment #3 from Quanah Gibson-Mount quanah@openldap.org --- head:
• a73d5397 by Howard Chu at 2026-04-09T16:02:00+01:00 ITS#10492 slapd: fix send_ldap_result abandon/error code munging
• 264bfa2f by Howard Chu at 2026-04-09T19:54:35+01:00 ITS#10492 fix previous commit
https://bugs.openldap.org/show_bug.cgi?id=10492
--- Comment #4 from Quanah Gibson-Mount quanah@openldap.org --- RE26:
• b10dcfe3 by Howard Chu at 2026-04-10T21:47:06+00:00 ITS#10492 slapd: fix send_ldap_result abandon/error code munging