use dcesrv_call_account_name() instead of direct structure access master
authorAndrew Tridgell <tridge@samba.org>
Tue, 15 Mar 2011 03:44:01 +0000 (14:44 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 15 Mar 2011 03:57:10 +0000 (14:57 +1100)
trunk/mapiproxy/servers/default/emsmdb/dcesrv_exchange_emsmdb.c
trunk/mapiproxy/servers/default/emsmdb/emsmdbp.c
trunk/mapiproxy/servers/default/nspi/emsabp.c

index b0fbfb442592dfcc940ef5f3cde502a4a721e0ce..8173435dff1852c8a1e6872c5a777cd51becceb2 100644 (file)
@@ -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");
index 33e27490827fe8c905cd798eb9b1e51ef793a031..1684bbe56c767aa30f5849b39abcf596221cbcf4 100644 (file)
@@ -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),
index 2bbcfcc35c19958bb63cf11ae58867ede6ecbfb6..7067db2292fe320ceb466e65799944312dddb151 100644 (file)
@@ -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");