op.o_callback = &cb;
op.o_time = slap_get_time();
op.o_do_not_cache = 1;
+ op.o_is_auth_check = 1;
op.o_threadctx = conn->c_sasl_bindop->o_threadctx;
(*be->be_search)( be, conn, &op, /*base=*/NULL, &searchbase,
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_is_auth_check = 1;
+ 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,
}
/* Allow the manager to authorize as any DN. */
- if( be_isroot( conn->c_authz_backend, authcDN )) {
+ if( conn->c_authz_backend && be_isroot( conn->c_authz_backend, authcDN )) {
rc = LDAP_SUCCESS;
goto DONE;
}