Revert previous kludge in controls.c, use ldap_pvt_thread_pool_context

instead if c_sasl_bindop is NULL.
This commit is contained in:
Howard Chu 2003-02-16 19:34:29 +00:00
parent 09585ad3d0
commit 979e5073cf
2 changed files with 2 additions and 5 deletions

View File

@ -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 ) {

View File

@ -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,