From 09585ad3d0562dbb701292434b1e5123d3cefce0 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 16 Feb 2003 12:23:00 +0000 Subject: [PATCH] Kludge - set conn->c_sasl_bindop before calling slap_sasl_getdn, otherwise op->o_threadctx is inaccessible. --- servers/slapd/controls.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/servers/slapd/controls.c b/servers/slapd/controls.c index c4b726d79b..a22876bce8 100644 --- a/servers/slapd/controls.c +++ b/servers/slapd/controls.c @@ -520,6 +520,7 @@ static int parseProxyAuthz ( { int rc; struct berval dn = { 0, NULL }; + Operation *tmp; if ( op->o_proxy_authz != SLAP_NO_CONTROL ) { *text = "proxy authorization control specified multiple times"; @@ -567,9 +568,12 @@ static int parseProxyAuthz ( return LDAP_SUCCESS; } + tmp = conn->c_sasl_bindop; + conn->c_sasl_bindop = op; rc = slap_sasl_getdn( conn, ctrl->ldctl_value.bv_val, ctrl->ldctl_value.bv_len, NULL, &dn, SLAP_GETDN_AUTHZID ); + conn->c_sasl_bindop = tmp; if( rc != LDAP_SUCCESS || !dn.bv_len ) { if ( dn.bv_val ) { -- 2.39.5