From 0df931b98b0dae988cf369b9726acc54ce550d23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Fri, 26 Mar 2021 11:49:24 +0000 Subject: [PATCH] ITS#8698 Only remove our own callback --- servers/slapd/passwd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/servers/slapd/passwd.c b/servers/slapd/passwd.c index 9a450fa0bd..17fb65a39e 100644 --- a/servers/slapd/passwd.c +++ b/servers/slapd/passwd.c @@ -289,7 +289,7 @@ old_good: rs->sr_err = LDAP_OTHER; } else { - slap_callback *sc = op->o_callback; + slap_callback **sc; op->o_tag = LDAP_REQ_MODIFY; op->o_callback = &cb; @@ -312,7 +312,12 @@ old_good: rsp = NULL; } op->o_tag = LDAP_REQ_EXTENDED; - op->o_callback = sc; + for ( sc = &op->o_callback; *sc; sc = &(*sc)->sc_next ) { + if ( *sc == &cb ) { + *sc = cb.sc_next; + break; + } + } } rc = rs->sr_err;