be_rootdn_bind( Operation *op, SlapReply *rs )
{
int rc;
+#ifdef SLAPD_SPASSWD
+ void *old_authctx = NULL;
+#endif
assert( op->o_tag == LDAP_REQ_BIND );
assert( op->orb_method == LDAP_AUTH_SIMPLE );
}
#ifdef SLAPD_SPASSWD
- ldap_pvt_thread_pool_setkey( op->o_threadctx, slap_sasl_bind,
- op->o_conn->c_sasl_authctx, NULL );
+ ldap_pvt_thread_pool_setkey_x( op->o_threadctx, slap_sasl_bind,
+ op->o_conn->c_sasl_authctx, NULL, &old_authctx, NULL );
#endif
rc = lutil_passwd( &op->o_bd->be_rootpw, &op->orb_cred, NULL, NULL );
#ifdef SLAPD_SPASSWD
- ldap_pvt_thread_pool_setkey( op->o_threadctx, slap_sasl_bind, NULL, NULL );
+ ldap_pvt_thread_pool_setkey( op->o_threadctx, slap_sasl_bind,
+ old_authctx, NULL );
#endif
rc = ( rc == 0 ? LDAP_SUCCESS : LDAP_INVALID_CREDENTIALS );
AccessControlState acl_state = ACL_STATE_INIT;
#ifdef SLAPD_SPASSWD
- ldap_pvt_thread_pool_setkey( op->o_threadctx, slap_sasl_bind,
- op->o_conn->c_sasl_authctx, NULL );
+ void *old_authctx = NULL;
+
+ ldap_pvt_thread_pool_setkey_x( op->o_threadctx, slap_sasl_bind,
+ op->o_conn->c_sasl_authctx, NULL, &old_authctx, NULL );
#endif
for ( bv = a->a_vals; bv->bv_val != NULL; bv++ ) {
#ifdef SLAPD_SPASSWD
ldap_pvt_thread_pool_setkey( op->o_threadctx, slap_sasl_bind,
- NULL, NULL );
+ old_authctx, NULL );
#endif
return result;