https://bugs.openldap.org/show_bug.cgi?id=9990
--- Comment #2 from subbarao@computer.org subbarao@computer.org --- Hi Ondrej,
It looks like we have a communication disconnect :-) Please note that there are *two* commits in this merge request:
1) commit #1 to ppolicy_text_cleanup() in ppolicy.c. This commit is fine -- it only cleans up its own callback, no problems there. (This is what I meant by "the rest of the ITS#8698 functionality...worked as expected")
2) commit #2 to passwd_extop() in passwd.c. This is the commit that is causing the problem. I am only asking to revert this part of the change.
Does this help clarify my request? If I'm missing something, please let me know.
Thanks,
-Kartik
On 1/31/23 7:16 AM, openldap-its@openldap.org wrote:
https://bugs.openldap.org/show_bug.cgi?id=9990
--- Comment #1 from Ondřej Kuzník ondra@mistotebe.net --- On Thu, Jan 26, 2023 at 10:55:26PM +0000, openldap-its@openldap.org wrote:
We have a password exop overlay that sets up a callback, which has stopped working when upgrading to 2.5.13. and I tracked it down to a change to servers/slapd/passwd.c implemented as part of the fix for ITS#8698:
https://git.openldap.org/openldap/openldap/-/merge_requests/304/diffs?commit...
It appears that the intent of this change was to loop through the o_callback list and only remove the cb callback created in this section of the code. But that isn't necessary because the cb callback never gets added to the original list. With this change, line 295 clobbers the original o_callback list which never gets restored -- that's why our exop overlay stopped working.
Fortunately, the fix is very simple -- just revert this part of the change. The original code already saved/restored the o_callback list properly.
When I reverted this part of the change, our exop overlay resumed working, and the rest of the ITS#8698 functionality (messages from the pwdCheckModule module being returned to the user) also worked as expected.
Hi, unfortunately that commit makes sure e.g. sr_text is not leaked by preserving other callbacks that might have been added in front of it (I have double checked now), so reverting it is not an option. Can you check whether ppolicy_text_cleanup is actually at fault, changing the line: op->o_callback = sc->sc_next;
To op->o_callback = NULL;
If that doesn't improve things, you might need to provide a stripped down version of your overlay that demonstrates the issue (you don't have to provide a password checking module alongside for now).
Thanks,