]> git.sur5r.net Git - openldap/commitdiff
Revert previous kludge in controls.c, use ldap_pvt_thread_pool_context
authorHoward Chu <hyc@openldap.org>
Sun, 16 Feb 2003 19:34:29 +0000 (19:34 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 16 Feb 2003 19:34:29 +0000 (19:34 +0000)
instead if c_sasl_bindop is NULL.

servers/slapd/controls.c
servers/slapd/saslauthz.c

index a22876bce807ade792a98f33b48dad46d26dd935..c4b726d79b62da009749adae3cd40267125cc3b1 100644 (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 ) {
index 6726639f043b8ad58d9a37407477a2650a576d89..50225b1d1712589797ffb93c778de14bcdb26cc7 100644 (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,