From: Howard Chu Date: Sun, 16 Feb 2003 19:34:29 +0000 (+0000) Subject: Revert previous kludge in controls.c, use ldap_pvt_thread_pool_context X-Git-Tag: NO_SLAP_OP_BLOCKS~342 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=979e5073cf49d840286c8e88bd76d06e3d3c9690;p=openldap Revert previous kludge in controls.c, use ldap_pvt_thread_pool_context instead if c_sasl_bindop is NULL. --- diff --git a/servers/slapd/controls.c b/servers/slapd/controls.c index a22876bce8..c4b726d79b 100644 --- a/servers/slapd/controls.c +++ b/servers/slapd/controls.c @@ -520,7 +520,6 @@ 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"; @@ -568,12 +567,9 @@ 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 ) { diff --git a/servers/slapd/saslauthz.c b/servers/slapd/saslauthz.c index 6726639f04..50225b1d17 100644 --- a/servers/slapd/saslauthz.c +++ b/servers/slapd/saslauthz.c @@ -634,7 +634,8 @@ void slap_sasl2dn( Connection *conn, op.o_callback = &cb; op.o_time = slap_get_time(); op.o_do_not_cache = 1; - op.o_threadctx = conn->c_sasl_bindop->o_threadctx; + op.o_threadctx = conn->c_sasl_bindop ? conn->c_sasl_bindop->o_threadctx: + ldap_pvt_thread_pool_context( &connection_pool ); (*be->be_search)( be, conn, &op, NULL, &dn, scope, LDAP_DEREF_NEVER, 1, 0,