dcesrv_mapiproxy_nspi.c File Reference

NSPI hook functions. More...

#include "mapiproxy/dcesrv_mapiproxy.h"
#include "mapiproxy/dcesrv_mapiproxy_proto.h"
#include "libmapi/mapidefs.h"
#include "libmapi/property_altnames.h"

Functions

bool mapiproxy_NspiDNToMId (struct dcesrv_call_state *dce_call, struct NspiDNToMId *r)
 
bool mapiproxy_NspiGetProps (struct dcesrv_call_state *dce_call, struct NspiGetProps *r)
 
bool mapiproxy_NspiQueryRows (struct dcesrv_call_state *dce_call, struct NspiQueryRows *r)
 
static char * x500_get_servername (const char *dn)
 

Detailed Description

NSPI hook functions.

Function Documentation

bool mapiproxy_NspiDNToMId ( struct dcesrv_call_state *  dce_call,
struct NspiDNToMId *  r 
)

This function looks if the server DN string in the request holds the mapiproxy netbios name and replaces it with the original Exchange server one fetched from NspiQueryRows or NspiGetProps.

Parameters
dce_callpointer to the session context
rpointer to the NspiDNToMId structure
Returns
true on success or false if no occurrence of the mapiproxy netbios name was found.

Referenced by mapiproxy_op_dispatch().

bool mapiproxy_NspiGetProps ( struct dcesrv_call_state *  dce_call,
struct NspiGetProps *  r 
)

This function replaces network address from the binding strings returned by Exchange for the PR_EMS_AB_NETWORK_ADDRESS property and limit the binding strings scope to ncacn_ip_tcp.

Parameters
dce_callpointer to the session context
rpointer to the NspiGetProps structure
Returns
true on success, otherwise false

Referenced by mapiproxy_op_ndr_push().

bool mapiproxy_NspiQueryRows ( struct dcesrv_call_state *  dce_call,
struct NspiQueryRows *  r 
)

This function replaces the Exchange server name with mapiproxy netbios name for the PR_EMS_AB_HOME_MDB property and saves the original name in a global variable for further usage - such as mapiproxy_NspiDNToMId.

Parameters
dce_callpointer to the session context
rpointer to the NspiQueryRows structure
See Also
mapiproxy_NspiDNToMId

References x500_get_servername().

Referenced by mapiproxy_op_ndr_push().

static char* x500_get_servername ( const char *  dn)
static

Retrieve the servername from a DN string

Parameters
dnthe DN string
Returns
a talloc'd server name

References SERVERNAME.

Referenced by mapiproxy_NspiQueryRows().


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/