/* Step 1. Initialize the emsmdbp context */
emsmdbp_ctx = emsmdbp_init(dce_call->conn->dce_ctx->lp_ctx,
- dce_call->context->conn->auth_state.session_info->info->account_name,
+ dcesrv_call_account_name(dce_call),
openchange_ldb_ctx);
if (!emsmdbp_ctx) {
smb_panic("unable to initialize emsmdbp context");
/* Step 1. Initialize the emsmdbp context */
emsmdbp_ctx = emsmdbp_init(dce_call->conn->dce_ctx->lp_ctx,
- dce_call->context->conn->auth_state.session_info->info->account_name,
+ dcesrv_call_account_name(dce_call),
openchange_ldb_ctx);
if (!emsmdbp_ctx) {
smb_panic("Unable to initialize emsmdbp context");
struct ldb_result *res = NULL;
const char * const recipient_attrs[] = { "msExchUserAccountControl", NULL };
- username = dce_call->context->conn->auth_state.session_info->info->account_name;
+ username = dcesrv_call_account_name(dce_call);
ret = ldb_search(emsmdbp_ctx->samdb_ctx, emsmdbp_ctx, &res,
ldb_get_default_basedn(emsmdbp_ctx->samdb_ctx),
const char *username = NULL;
struct ldb_message *ldb_msg = NULL;
- username = dce_call->context->conn->auth_state.session_info->info->account_name;
+ username = dcesrv_call_account_name(dce_call);
mem_ctx = talloc_named(emsabp_ctx->mem_ctx, 0, "emsabp_verify_user");