From 36e24ee95edec6fe1c9fad1ad00b4d75a82ee5a0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 15 Mar 2011 14:44:01 +1100 Subject: [PATCH] use dcesrv_call_account_name() instead of direct structure access --- .../mapiproxy/servers/default/emsmdb/dcesrv_exchange_emsmdb.c | 4 ++-- trunk/mapiproxy/servers/default/emsmdb/emsmdbp.c | 2 +- trunk/mapiproxy/servers/default/nspi/emsabp.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/trunk/mapiproxy/servers/default/emsmdb/dcesrv_exchange_emsmdb.c b/trunk/mapiproxy/servers/default/emsmdb/dcesrv_exchange_emsmdb.c index b0fbfb44..8173435d 100644 --- a/trunk/mapiproxy/servers/default/emsmdb/dcesrv_exchange_emsmdb.c +++ b/trunk/mapiproxy/servers/default/emsmdb/dcesrv_exchange_emsmdb.c @@ -93,7 +93,7 @@ static enum MAPISTATUS dcesrv_EcDoConnect(struct dcesrv_call_state *dce_call, /* 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"); @@ -921,7 +921,7 @@ static enum MAPISTATUS dcesrv_EcDoConnectEx(struct dcesrv_call_state *dce_call, /* 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"); diff --git a/trunk/mapiproxy/servers/default/emsmdb/emsmdbp.c b/trunk/mapiproxy/servers/default/emsmdb/emsmdbp.c index 33e27490..1684bbe5 100644 --- a/trunk/mapiproxy/servers/default/emsmdb/emsmdbp.c +++ b/trunk/mapiproxy/servers/default/emsmdb/emsmdbp.c @@ -200,7 +200,7 @@ _PUBLIC_ bool emsmdbp_verify_user(struct dcesrv_call_state *dce_call, 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), diff --git a/trunk/mapiproxy/servers/default/nspi/emsabp.c b/trunk/mapiproxy/servers/default/nspi/emsabp.c index 2bbcfcc3..7067db22 100644 --- a/trunk/mapiproxy/servers/default/nspi/emsabp.c +++ b/trunk/mapiproxy/servers/default/nspi/emsabp.c @@ -171,7 +171,7 @@ _PUBLIC_ bool emsabp_verify_user(struct dcesrv_call_state *dce_call, 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"); -- 2.34.1