mpm_pack.c File Reference

Pack/Unpack specified MAPI calls into/from a custom MAPI call. More...

#include "mapiproxy/dcesrv_mapiproxy.h"
#include "mapiproxy/libmapiproxy/libmapiproxy.h"
#include <util/debug.h>

Macros

#define MPM_NAME   "mpm_pack"
 
#define MPM_PACK_ERROR   "[ERROR] mpm_pack:"
 

Functions

static bool pack (TALLOC_CTX *mem_ctx, struct EcDoRpc *EcDoRpc)
 
static NTSTATUS pack_init (struct dcesrv_context *dce_ctx)
 
static NTSTATUS pack_ndr_pull (struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull)
 
static NTSTATUS pack_pull (struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
 
static NTSTATUS pack_push (struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
 
static uint32_t proxypack (TALLOC_CTX *mem_ctx, struct EcDoRpc_MAPI_REQ *mapi_req, struct ndr_push *ndr)
 
NTSTATUS samba_init_module (void)
 
static bool unpack (TALLOC_CTX *mem_ctx, struct EcDoRpc *EcDoRpc)
 

Variables

static struct mpm_pack * mpm = NULL
 

Detailed Description

Pack/Unpack specified MAPI calls into/from a custom MAPI call.

Macro Definition Documentation

#define MPM_NAME   "mpm_pack"

Referenced by pack_init().

#define MPM_PACK_ERROR   "[ERROR] mpm_pack:"

Referenced by pack_init().

Function Documentation

static bool pack ( TALLOC_CTX *  mem_ctx,
struct EcDoRpc *  EcDoRpc 
)
static

pack EcDoRpc calls into proxypack

References mpm, and proxypack().

Referenced by pack_pull().

static NTSTATUS pack_init ( struct dcesrv_context *  dce_ctx)
static

Initialize the pack module and retrieve configuration from smb.conf.

Possible parameters: mpm_pack:opnums = 0x1, 0x2, 0x3 mpm_pack:lasthop = true|false

References mpm, MPM_NAME, and MPM_PACK_ERROR.

static NTSTATUS pack_ndr_pull ( struct dcesrv_call_state *  dce_call,
TALLOC_CTX *  mem_ctx,
struct ndr_pull *  pull 
)
static
static NTSTATUS pack_pull ( struct dcesrv_call_state *  dce_call,
TALLOC_CTX *  mem_ctx,
void *  r 
)
static

pack EcDoRpc MAPI requests

This function searches for MAPI opnums to pack in the requests, add this opnums to the mapiproxy opnum DATA blob and refactor the request to remove references to these calls in the original request.

References mpm, pack(), and unpack().

static NTSTATUS pack_push ( struct dcesrv_call_state *  dce_call,
TALLOC_CTX *  mem_ctx,
void *  r 
)
static
static uint32_t proxypack ( TALLOC_CTX *  mem_ctx,
struct EcDoRpc_MAPI_REQ *  mapi_req,
struct ndr_push *  ndr 
)
static

Referenced by pack().

NTSTATUS samba_init_module ( void  )

Entry point for the pack mapiproxy module

Returns
NT_STATUS_OK on success, otherwise NTSTATUS error
static bool unpack ( TALLOC_CTX *  mem_ctx,
struct EcDoRpc *  EcDoRpc 
)
static

unpack proxypack contents and restore the original EcDoRpc request

Referenced by pack_pull().

Variable Documentation

struct mpm_pack * mpm = NULL
static

Creative Commons License
Creative Commons Attribution icon Creative Commons Share Alike icon
This content is licensed under the Creative Commons
Attribution ShareAlike License v. 3.0:
http://creativecommons.org/licenses/by-sa/3.0/