ndn->bv_val = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG( TRANSPORT, DETAIL1,
- "slap_sasl2dn: search DN returned more than 1 entry\n", 0, 0, 0 );
+ LDAP_LOG( TRANSPORT, DETAIL1,
+ "slap_sasl2dn: search DN returned more than 1 entry\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"slap_sasl2dn: search DN returned more than 1 entry\n", 0,0,0 );
Filter *filter=NULL;
regex_t reg;
smatch_info sm;
- slap_callback cb = { slap_cb_null_response, slap_cb_null_sresult, sasl_sc_smatch, NULL };
+ slap_callback cb = {
+ slap_cb_null_response,
+ slap_cb_null_sresult,
+ sasl_sc_smatch,
+ NULL
+ };
Operation op = {0};
#ifdef NEW_LOGGING
rc = LDAP_INAPPROPRIATE_AUTH;
goto CONCLUDED;
}
- suffix_alias( be, &searchbase );
sm.dn = assertDN;
sm.match = 0;
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,
if(( be == NULL ) || ( be->be_search == NULL)) {
goto FINISHED;
}
- suffix_alias( be, &dn );
op.o_tag = LDAP_REQ_SEARCH;
op.o_protocol = LDAP_VERSION3;
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;
}