From: Howard Chu Date: Sun, 16 Feb 2003 12:23:00 +0000 (+0000) Subject: Kludge - set conn->c_sasl_bindop before calling slap_sasl_getdn, otherwise X-Git-Tag: NO_SLAP_OP_BLOCKS~343 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=09585ad3d0562dbb701292434b1e5123d3cefce0;p=openldap Kludge - set conn->c_sasl_bindop before calling slap_sasl_getdn, otherwise op->o_threadctx is inaccessible. --- 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 ) {