#include "libmapi/libmapi.h"
#include "libmapi/libmapi_private.h"
#include "mapiproxy/libmapiproxy/libmapiproxy.h"
#include <tevent.h>
#include <fcntl.h>
#include <util/debug.h>
Data Structures | |
struct | emsabp_context |
struct | emsabp_MId |
struct | EphemeralEntryID |
EphemeralEntryID structure. More... | |
struct | exchange_nsp_session |
struct | PermanentEntryID |
PermanentEntryID structure. More... | |
Macros | |
#define | __BEGIN_DECLS |
#define | __END_DECLS |
#define | AB_RECIPIENTS 0x1 |
NSPI PR_CONTAINER_FLAGS values. More... | |
#define | AB_SUBCONTAINERS 0x2 |
#define | AB_UNMODIFIABLE 0x8 |
#define | DCESRV_NSP_RETURN(r, c, ctx) { r->out.result = c; return; if (ctx) talloc_free(ctx); } |
#define | EMSABP_ADDRTYPE "EX" |
#define | EMSABP_DN "/guid=%08X%04X%04X%02X%02X%02X%02X%02X%02X%02X%02X" |
#define | EMSABP_TDB_DATA_REC "MId_index" |
#define | EMSABP_TDB_MID_START 0x1b28 |
#define | EMSABP_TDB_TMP_MID_START 0x5000 |
Functions | |
enum MAPISTATUS | emsabp_ab_container_by_id (TALLOC_CTX *, struct emsabp_context *, uint32_t, struct ldb_message **) |
enum MAPISTATUS | emsabp_ab_container_enum (TALLOC_CTX *, struct emsabp_context *, uint32_t, struct ldb_result **) |
bool | emsabp_destructor (void *) |
enum MAPISTATUS | emsabp_EphemeralEntryID_to_Binary_r (TALLOC_CTX *, struct EphemeralEntryID *, struct Binary_r *) |
enum MAPISTATUS | emsabp_fetch_attrs (TALLOC_CTX *, struct emsabp_context *, struct PropertyRow_r *, uint32_t, uint32_t, struct SPropTagArray *) |
enum MAPISTATUS | emsabp_fetch_attrs_from_msg (TALLOC_CTX *, struct emsabp_context *, struct PropertyRow_r *, struct ldb_message *, uint32_t, uint32_t, struct SPropTagArray *) |
enum MAPISTATUS | emsabp_get_account_info (TALLOC_CTX *, struct emsabp_context *, const char *, struct ldb_message **) |
enum MAPISTATUS | emsabp_get_CreationTemplatesTable (TALLOC_CTX *, struct emsabp_context *, uint32_t, struct PropertyRowSet_r **) |
enum MAPISTATUS | emsabp_get_HierarchyTable (TALLOC_CTX *, struct emsabp_context *, uint32_t, struct PropertyRowSet_r **) |
struct emsabp_context * | emsabp_init (struct loadparm_context *, TDB_CONTEXT *) |
enum MAPISTATUS | emsabp_PermanentEntryID_to_Binary_r (TALLOC_CTX *, struct PermanentEntryID *, struct Binary_r *) |
const char * | emsabp_property_get_attribute (uint32_t) |
const char * | emsabp_property_get_ref_attr (uint32_t) |
uint32_t | emsabp_property_get_ulPropTag (const char *) |
int | emsabp_property_is_ref (uint32_t) |
void * | emsabp_query (TALLOC_CTX *, struct emsabp_context *, struct ldb_message *, uint32_t, uint32_t, uint32_t) |
enum MAPISTATUS | emsabp_search (TALLOC_CTX *, struct emsabp_context *, struct PropertyTagArray_r *, struct Restriction_r *, struct STAT *, uint32_t) |
enum MAPISTATUS | emsabp_search_dn (struct emsabp_context *, const char *, struct ldb_message **) |
enum MAPISTATUS | emsabp_search_legacyExchangeDN (struct emsabp_context *, const char *, struct ldb_message **, bool *) |
enum MAPISTATUS | emsabp_set_EphemeralEntryID (struct emsabp_context *, uint32_t, uint32_t, struct EphemeralEntryID *) |
enum MAPISTATUS | emsabp_set_PermanentEntryID (struct emsabp_context *, uint32_t, struct ldb_message *, struct PermanentEntryID *) |
enum MAPISTATUS | emsabp_table_fetch_attrs (TALLOC_CTX *, struct emsabp_context *, struct PropertyRow_r *, uint32_t, struct PermanentEntryID *, struct PermanentEntryID *, struct ldb_message *, bool) |
enum MAPISTATUS | emsabp_tdb_close (TDB_CONTEXT *) |
enum MAPISTATUS | emsabp_tdb_fetch (TDB_CONTEXT *, const char *, TDB_DATA *) |
enum MAPISTATUS | emsabp_tdb_fetch_dn_from_MId (TALLOC_CTX *, TDB_CONTEXT *, uint32_t, char **) |
enum MAPISTATUS | emsabp_tdb_fetch_MId (TDB_CONTEXT *, const char *, uint32_t *) |
TDB_CONTEXT * | emsabp_tdb_init (TALLOC_CTX *, struct loadparm_context *) |
TDB_CONTEXT * | emsabp_tdb_init_tmp (TALLOC_CTX *) |
enum MAPISTATUS | emsabp_tdb_insert (TDB_CONTEXT *, const char *) |
bool | emsabp_tdb_lookup_MId (TDB_CONTEXT *, uint32_t) |
bool | emsabp_verify_codepage (struct emsabp_context *, uint32_t) |
bool | emsabp_verify_lcid (struct emsabp_context *, uint32_t) |
bool | emsabp_verify_user (struct dcesrv_call_state *, struct emsabp_context *) |
__BEGIN_DECLS NTSTATUS | samba_init_module (void) |
struct ldb_context * | samdb_connect (TALLOC_CTX *, struct tevent_context *, struct loadparm_context *, struct auth_session_info *, int) |
struct GUID * | samdb_ntds_objectGUID (struct ldb_context *) |
#define __BEGIN_DECLS |
#define __END_DECLS |
#define AB_RECIPIENTS 0x1 |
NSPI PR_CONTAINER_FLAGS values.
Referenced by emsabp_table_fetch_attrs().
#define AB_SUBCONTAINERS 0x2 |
Referenced by emsabp_table_fetch_attrs().
#define AB_UNMODIFIABLE 0x8 |
Referenced by emsabp_table_fetch_attrs().
#define DCESRV_NSP_RETURN | ( | r, | |
c, | |||
ctx | |||
) | { r->out.result = c; return; if (ctx) talloc_free(ctx); } |
Referenced by dcesrv_NspiBind(), dcesrv_NspiCompareMIds(), dcesrv_NspiDeleteEntries(), dcesrv_NspiDNToMId(), dcesrv_NspiGetIDsFromNames(), dcesrv_NspiGetMatches(), dcesrv_NspiGetNamesFromIDs(), dcesrv_NspiGetPropList(), dcesrv_NspiGetProps(), dcesrv_NspiGetSpecialTable(), dcesrv_NspiGetTemplateInfo(), dcesrv_NspiModLinkAtt(), dcesrv_NspiModProps(), dcesrv_NspiQueryColumns(), dcesrv_NspiQueryRows(), dcesrv_NspiResolveNames(), dcesrv_NspiResolveNamesW(), dcesrv_NspiResortRestriction(), dcesrv_NspiSeekEntries(), dcesrv_NspiUnbind(), and dcesrv_NspiUpdateStat().
#define EMSABP_ADDRTYPE "EX" |
Referenced by emsabp_query().
#define EMSABP_DN "/guid=%08X%04X%04X%02X%02X%02X%02X%02X%02X%02X%02X" |
Referenced by emsabp_set_PermanentEntryID().
#define EMSABP_TDB_DATA_REC "MId_index" |
Referenced by emsabp_tdb_init(), emsabp_tdb_init_tmp(), and emsabp_tdb_insert().
#define EMSABP_TDB_MID_START 0x1b28 |
Referenced by emsabp_tdb_init().
#define EMSABP_TDB_TMP_MID_START 0x5000 |
Referenced by emsabp_tdb_init_tmp().
enum MAPISTATUS emsabp_ab_container_by_id | ( | TALLOC_CTX * | mem_ctx, |
struct emsabp_context * | emsabp_ctx, | ||
uint32_t | ContainerID, | ||
struct ldb_message ** | ldb_msg | ||
) |
Fetch Address Book container record for given ContainerID
mem_ctx | memory context for allocation |
emsabp_ctx | pointer to the EMSABP context |
ContainerID | id of the container to fetch |
ldb_msg | pointer on pointer to the LDB message returned by the function |
References emsabp_search_dn(), emsabp_tdb_fetch_dn_from_MId(), emsabp_context::samdb_ctx, and emsabp_context::tdb_ctx.
Referenced by dcesrv_NspiResolveNames(), dcesrv_NspiResolveNamesW(), and emsabp_ab_container_enum().
enum MAPISTATUS emsabp_ab_container_enum | ( | TALLOC_CTX * | mem_ctx, |
struct emsabp_context * | emsabp_ctx, | ||
uint32_t | ContainerID, | ||
struct ldb_result ** | ldb_resp | ||
) |
Enumerate AB container entries
mem_ctx | pointer to the memory context |
emsabp_ctx | pointer to the EMSABP context |
ContainerID | id of the container to fetch |
ldb_res | pointer on pointer to the LDB result returned by the function |
References emsabp_ab_container_by_id(), and emsabp_context::samdb_ctx.
Referenced by dcesrv_NspiQueryRows().
bool emsabp_destructor | ( | void * | ) |
References emsabp_context::mem_ctx, and emsabp_context::ttdb_ctx.
Referenced by dcesrv_NspiBind().
enum MAPISTATUS emsabp_EphemeralEntryID_to_Binary_r | ( | TALLOC_CTX * | mem_ctx, |
struct EphemeralEntryID * | ephEntryID, | ||
struct Binary_r * | bin | ||
) |
Map an EphemeralEntryID structure into a Binary_r structure
mem_ctx | pointer to the memory context |
ephEntryID | pointer to the Ephemeral EntryID structure |
bin | pointer to the Binary_r structure the server will return |
References EphemeralEntryID::DisplayType, EphemeralEntryID::ID_type, EphemeralEntryID::MId, EphemeralEntryID::ProviderUID, EphemeralEntryID::R1, EphemeralEntryID::R2, EphemeralEntryID::R3, and EphemeralEntryID::R4.
Referenced by emsabp_query().
enum MAPISTATUS emsabp_fetch_attrs | ( | TALLOC_CTX * | mem_ctx, |
struct emsabp_context * | emsabp_ctx, | ||
struct PropertyRow_r * | aRow, | ||
uint32_t | MId, | ||
uint32_t | dwFlags, | ||
struct SPropTagArray * | pPropTags | ||
) |
Builds the SRow array entry for the specified MId.
The function retrieves the DN associated to the specified MId within its on-memory TDB database. It next fetches the LDB record matching the DN and finally retrieve the requested properties for this record.
mem_ctx | pointer to the memory context |
emsabp_ctx | pointer to the EMSABP context |
aRow | pointer to the SRow structure where results will be stored |
MId | MId to fetch properties for |
dwFlags | bit flags specifying whether or not the server must return the values of the property PidTagEntryId in the Ephemeral or Permanent Entry ID format |
pPropTags | pointer to the property tags array |
References emsabp_query(), emsabp_tdb_fetch_dn_from_MId(), emsabp_context::mem_ctx, emsabp_context::samdb_ctx, emsabp_context::tdb_ctx, and emsabp_context::ttdb_ctx.
Referenced by dcesrv_NspiGetMatches(), dcesrv_NspiGetProps(), dcesrv_NspiQueryRows(), and dcesrv_NspiSeekEntries().
enum MAPISTATUS emsabp_fetch_attrs_from_msg | ( | TALLOC_CTX * | mem_ctx, |
struct emsabp_context * | emsabp_ctx, | ||
struct PropertyRow_r * | aRow, | ||
struct ldb_message * | ldb_msg, | ||
uint32_t | MId, | ||
uint32_t | dwFlags, | ||
struct SPropTagArray * | pPropTags | ||
) |
Build the SRow array entry for the specified ldb_message.
mem_ctx | pointer to the memory context |
emsabp_ctx | pointer to the EMSABP context |
aRow | pointer to the SRow structure where results will be stored |
ldb_msg | ldb_message record to fetch results from |
MId | MId of the entry to fetch (may be 0) |
dwFlags | input call flags (default to 0) |
pPropTags | pointer to the property tags array |
References emsabp_query(), emsabp_tdb_fetch_MId(), emsabp_tdb_insert(), and emsabp_context::ttdb_ctx.
Referenced by dcesrv_NspiQueryRows(), dcesrv_NspiResolveNames(), and dcesrv_NspiResolveNamesW().
enum MAPISTATUS emsabp_get_account_info | ( | TALLOC_CTX * | mem_ctx, |
struct emsabp_context * | emsabp_ctx, | ||
const char * | username, | ||
struct ldb_message ** | ldb_msg | ||
) |
Get AD record for Mail-enabled account
mem_ctx | pointer to the session context |
emsabp_ctx | pointer to the EMSABP context |
username | User common name |
ldb_msg | Pointer on pointer to ldb_message to return result to |
References emsabp_context::samdb_ctx.
Referenced by emsabp_verify_user().
enum MAPISTATUS emsabp_get_CreationTemplatesTable | ( | TALLOC_CTX * | mem_ctx, |
struct emsabp_context * | emsabp_ctx, | ||
uint32_t | dwFlags, | ||
struct PropertyRowSet_r ** | SRowSet | ||
) |
Retrieve and build the CreationTemplates Table requested by GetSpecialTable NSPI call
mem_ctx | pointer to the memory context |
emsabp_ctx | pointer to the EMSABP context |
dwFlags | flags controlling whether strings should be UNICODE or not |
SRowSet | pointer on pointer to the output SRowSet array |
Referenced by dcesrv_NspiGetSpecialTable().
enum MAPISTATUS emsabp_get_HierarchyTable | ( | TALLOC_CTX * | mem_ctx, |
struct emsabp_context * | emsabp_ctx, | ||
uint32_t | dwFlags, | ||
struct PropertyRowSet_r ** | SRowSet | ||
) |
Retrieve and build the HierarchyTable requested by GetSpecialTable NSPI call
mem_ctx | pointer to the memory context |
emsabp_ctx | pointer to the EMSABP context |
dwFlags | flags controlling whether strings should be UNICODE or not |
SRowSet | pointer on pointer to the output SRowSet array |
References PermanentEntryID::dn, emsabp_set_PermanentEntryID(), emsabp_table_fetch_attrs(), emsabp_context::mem_ctx, and emsabp_context::samdb_ctx.
Referenced by dcesrv_NspiGetSpecialTable().
struct emsabp_context* emsabp_init | ( | struct loadparm_context * | lp_ctx, |
TDB_CONTEXT * | tdb_ctx | ||
) |
Initialize the EMSABP context and open connections to Samba databases.
lp_ctx | pointer to the loadparm context |
tdb_ctx | pointer to the EMSABP TDB context |
References emsabp_tdb_init_tmp(), emsabp_context::lp_ctx, emsabp_context::mem_ctx, samdb_connect(), emsabp_context::samdb_ctx, emsabp_context::tdb_ctx, and emsabp_context::ttdb_ctx.
Referenced by dcesrv_NspiBind().
enum MAPISTATUS emsabp_PermanentEntryID_to_Binary_r | ( | TALLOC_CTX * | mem_ctx, |
struct PermanentEntryID * | permEntryID, | ||
struct Binary_r * | bin | ||
) |
Map a PermanentEntryID structure into a Binary_r structure (for PR_ENTRYID and PR_EMS_AB_PARENT_ENTRYID properties)
mem_ctx | pointer to the memory context |
permEntryID | pointer to the Permanent EntryID structure |
bin | pointer to the Binary_r structure the server will return |
References PermanentEntryID::DisplayType, PermanentEntryID::dn, PermanentEntryID::ID_type, PermanentEntryID::ProviderUID, PermanentEntryID::R1, PermanentEntryID::R2, PermanentEntryID::R3, and PermanentEntryID::R4.
Referenced by emsabp_query(), and emsabp_table_fetch_attrs().
const char* emsabp_property_get_attribute | ( | uint32_t | ulPropTag) |
Return the AD attribute name associated to a property tag
ulPropTag | the property tag to lookup |
Referenced by emsabp_query(), and emsabp_search().
const char* emsabp_property_get_ref_attr | ( | uint32_t | ulPropTag) |
Returns the reference attr for a given attribute
ulPropTag | property tag to lookup |
Referenced by emsabp_query().
uint32_t emsabp_property_get_ulPropTag | ( | const char * | attribute) |
Return the property tag associated to AD attribute name
attribute | the AD attribute name to lookup |
int emsabp_property_is_ref | ( | uint32_t | ulPropTag) |
Returns whether the given attribute's value references another AD record
ulPropTag | the property tag to lookup |
Referenced by emsabp_query().
void* emsabp_query | ( | TALLOC_CTX * | mem_ctx, |
struct emsabp_context * | emsabp_ctx, | ||
struct ldb_message * | msg, | ||
uint32_t | ulPropTag, | ||
uint32_t | MId, | ||
uint32_t | dwFlags | ||
) |
Find the attribute matching the specified property tag and return the associated data.
mem_ctx | pointer to the memory context |
emsabp_ctx | pointer to the EMSABP context |
msg | pointer to the LDB message |
ulPropTag | the property tag to lookup |
MId | Minimal Entry ID associated to the current message |
dwFlags | bit flags specifying whether or not the server must return the values of the property PidTagEntryId in the Ephemeral or Permanent Entry ID format |
References EMSABP_ADDRTYPE, emsabp_EphemeralEntryID_to_Binary_r(), emsabp_PermanentEntryID_to_Binary_r(), emsabp_property_get_attribute(), emsabp_property_get_ref_attr(), emsabp_property_is_ref(), emsabp_search_dn(), emsabp_set_EphemeralEntryID(), and emsabp_set_PermanentEntryID().
Referenced by emsabp_fetch_attrs(), and emsabp_fetch_attrs_from_msg().
enum MAPISTATUS emsabp_search | ( | TALLOC_CTX * | mem_ctx, |
struct emsabp_context * | emsabp_ctx, | ||
struct PropertyTagArray_r * | MIds, | ||
struct Restriction_r * | restriction, | ||
struct STAT * | pStat, | ||
uint32_t | limit | ||
) |
Search Active Directory given input search criterias. The function associates for each records returned by the search a unique session Minimal Entry ID and a LDB message.
mem_ctx | pointer to the memory context |
emsabp_ctx | pointer to the EMSABP context |
MIds | pointer to the list of MIds the function returns |
restriction | pointer to restriction rules to apply to the search |
pStat | pointer the STAT structure associated to the search |
limit | the limit number of results the function can return |
References emsabp_property_get_attribute(), emsabp_tdb_fetch_MId(), emsabp_tdb_insert(), emsabp_tdb_lookup_MId(), emsabp_context::samdb_ctx, emsabp_context::tdb_ctx, and emsabp_context::ttdb_ctx.
Referenced by dcesrv_NspiGetMatches(), dcesrv_NspiSeekEntries(), and dcesrv_NspiUpdateStat().
enum MAPISTATUS emsabp_search_dn | ( | struct emsabp_context * | emsabp_ctx, |
const char * | dn, | ||
struct ldb_message ** | ldb_res | ||
) |
Search for a given DN within AD and return the associated LDB message.
emsabp_ctx | pointer to the EMSABP context |
dn | pointer to the DN string to search for |
ldb_res | pointer on pointer to the LDB message returned by the function |
References emsabp_context::mem_ctx, and emsabp_context::samdb_ctx.
Referenced by emsabp_ab_container_by_id(), and emsabp_query().
enum MAPISTATUS emsabp_search_legacyExchangeDN | ( | struct emsabp_context * | emsabp_ctx, |
const char * | legacyDN, | ||
struct ldb_message ** | ldb_res, | ||
bool * | pbUseConfPartition | ||
) |
Search for a given AD record given its legacyDN parameter and return the associated LDB message.
emsabp_ctx | pointer to the EMSABP context |
legacyDN | pointer to the legacyDN attribute value to lookup |
ldb_res | pointer on pointer to the LDB message returned by the function |
pbUseConfPartition | pointer on boolean specifying whether the legacyExchangeDN was retrieved from the Configuration parition or not |
References emsabp_context::mem_ctx, and emsabp_context::samdb_ctx.
Referenced by dcesrv_NspiDNToMId().
enum MAPISTATUS emsabp_set_EphemeralEntryID | ( | struct emsabp_context * | emsabp_ctx, |
uint32_t | DisplayType, | ||
uint32_t | MId, | ||
struct EphemeralEntryID * | ephEntryID | ||
) |
Build an EphemeralEntryID structure
emsabp_ctx | pointer to the EMSABP context |
DisplayType | the AB object display type |
MId | the MId value |
ephEntryID | pointer to the EphemeralEntryID returned by the function |
References EphemeralEntryID::DisplayType, EphemeralEntryID::ID_type, EphemeralEntryID::MId, EphemeralEntryID::ProviderUID, EphemeralEntryID::R1, EphemeralEntryID::R2, EphemeralEntryID::R3, EphemeralEntryID::R4, emsabp_context::samdb_ctx, and samdb_ntds_objectGUID().
Referenced by emsabp_query().
enum MAPISTATUS emsabp_set_PermanentEntryID | ( | struct emsabp_context * | emsabp_ctx, |
uint32_t | DisplayType, | ||
struct ldb_message * | msg, | ||
struct PermanentEntryID * | permEntryID | ||
) |
Build a PermanentEntryID structure
emsabp_ctx | pointer to the EMSABP context |
DisplayType | the AB object display type |
msg | pointer to the LDB message |
permEntryID | pointer to the PermanentEntryID returned by the function |
References PermanentEntryID::DisplayType, PermanentEntryID::dn, EMSABP_DN, GUID_NSPI, PermanentEntryID::ID_type, emsabp_context::mem_ctx, PermanentEntryID::ProviderUID, PermanentEntryID::R1, PermanentEntryID::R2, PermanentEntryID::R3, and PermanentEntryID::R4.
Referenced by emsabp_get_HierarchyTable(), and emsabp_query().
enum MAPISTATUS emsabp_table_fetch_attrs | ( | TALLOC_CTX * | mem_ctx, |
struct emsabp_context * | emsabp_ctx, | ||
struct PropertyRow_r * | aRow, | ||
uint32_t | dwFlags, | ||
struct PermanentEntryID * | permEntryID, | ||
struct PermanentEntryID * | parentPermEntryID, | ||
struct ldb_message * | msg, | ||
bool | child | ||
) |
Builds the SRow array entry for the specified table record.
mem_ctx | pointer to the memory context |
emsabp_ctx | pointer to the EMSABP context |
aRow | pointer to the SRow structure where results will be stored |
dwFlags | flags controlling whether strings should be unicode encoded or not |
permEntryID | pointer to the current record Permanent EntryID |
parentPermEntryID | pointer to the parent record Permanent EntryID |
msg | pointer to the LDB message for current record |
child | boolean value specifying whether current record is root or child within containers hierarchy |
References AB_RECIPIENTS, AB_SUBCONTAINERS, AB_UNMODIFIABLE, emsabp_PermanentEntryID_to_Binary_r(), emsabp_tdb_fetch_MId(), emsabp_tdb_insert(), and emsabp_context::tdb_ctx.
Referenced by emsabp_get_HierarchyTable().
enum MAPISTATUS emsabp_tdb_close | ( | TDB_CONTEXT * | tdb_ctx) |
Close EMSABP TDB database
enum MAPISTATUS emsabp_tdb_fetch | ( | TDB_CONTEXT * | tdb_ctx, |
const char * | keyname, | ||
TDB_DATA * | result | ||
) |
Fetch an element within a TDB database given its key
tdb_ctx | pointer to the EMSABP TDB context |
keyname | pointer to the TDB key to fetch |
result | pointer on TDB results |
Referenced by emsabp_tdb_init(), and emsabp_tdb_insert().
enum MAPISTATUS emsabp_tdb_fetch_dn_from_MId | ( | TALLOC_CTX * | mem_ctx, |
TDB_CONTEXT * | tdb_ctx, | ||
uint32_t | MId, | ||
char ** | dn | ||
) |
Traverse the EMSABP TDB and fetch the DN associated with the MId
mem_ctx | pointer to the memory context |
tdb_ctx | pointer to the EMSABP TDB context |
MId | MID to search |
dn | pointer on pointer to the dn to return |
References emsabp_MId::dn, emsabp_tdb_traverse_MId_DN(), and emsabp_MId::MId.
Referenced by emsabp_ab_container_by_id(), and emsabp_fetch_attrs().
enum MAPISTATUS emsabp_tdb_fetch_MId | ( | TDB_CONTEXT * | tdb_ctx, |
const char * | keyname, | ||
uint32_t * | MId | ||
) |
Retrieve the Minimal EntryID associated to a given DN
tdb_ctx | pointer to the EMSABP TDB context |
keyname | pointer to the TDB key to search for |
MId | pointer on the integer the function returns |
Referenced by dcesrv_NspiDNToMId(), emsabp_fetch_attrs_from_msg(), emsabp_search(), and emsabp_table_fetch_attrs().
TDB_CONTEXT* emsabp_tdb_init | ( | TALLOC_CTX * | mem_ctx, |
struct loadparm_context * | lp_ctx | ||
) |
Open EMSABP TDB database
mem_ctx | pointer to the memory context |
lp_ctx | pointer to the loadparm context |
References EMSABP_TDB_DATA_REC, emsabp_tdb_fetch(), EMSABP_TDB_MID_START, and mapiproxy_server_emsabp_tdb_init().
Referenced by dcesrv_exchange_nsp_init().
TDB_CONTEXT* emsabp_tdb_init_tmp | ( | TALLOC_CTX * | mem_ctx) |
Initialize a temporary (on-memory) TDB database. This database is used to store temporary MId used within a session lifetime.
mem_ctx | pointer to the memory context |
References EMSABP_TDB_DATA_REC, and EMSABP_TDB_TMP_MID_START.
Referenced by emsabp_init().
enum MAPISTATUS emsabp_tdb_insert | ( | TDB_CONTEXT * | tdb_ctx, |
const char * | keyname | ||
) |
Insert an element into TDB database
tdb_ctx | pointer to the EMSABP TDB context |
keyname | pointer to the TDB key name string |
References EMSABP_TDB_DATA_REC, and emsabp_tdb_fetch().
Referenced by dcesrv_NspiDNToMId(), emsabp_fetch_attrs_from_msg(), emsabp_search(), and emsabp_table_fetch_attrs().
bool emsabp_tdb_lookup_MId | ( | TDB_CONTEXT * | tdb_ctx, |
uint32_t | MId | ||
) |
Traverse the EMSABP TDB database and look for the input MId
tdb_ctx | pointer to the EMSABP TDB context |
MId | MID to lookup |
References emsabp_tdb_traverse_MId().
Referenced by dcesrv_NspiGetProps(), dcesrv_NspiQueryRows(), dcesrv_NspiSeekEntries(), dcesrv_NspiUpdateStat(), and emsabp_search().
bool emsabp_verify_codepage | ( | struct emsabp_context * | emsabp_ctx, |
uint32_t | CodePage | ||
) |
Check if the provided codepage is correct
emsabp_ctx | pointer to the EMSABP context |
CodePage | the codepage identifier |
Referenced by dcesrv_NspiBind().
bool emsabp_verify_lcid | ( | struct emsabp_context * | , |
uint32_t | |||
) |
bool emsabp_verify_user | ( | struct dcesrv_call_state * | dce_call, |
struct emsabp_context * | emsabp_ctx | ||
) |
Check if the authenticated user belongs to the Exchange organization
dce_call | pointer to the session context |
emsabp_ctx | pointer to the EMSABP context |
References emsabp_context::account_name, emsabp_get_account_info(), and emsabp_context::mem_ctx.
Referenced by dcesrv_NspiBind().
__BEGIN_DECLS NTSTATUS samba_init_module | ( | void | ) |
Register mapiproxy dynamic shared object modules
This function registers mapiproxy modules located
Entry point of mapiproxy dynamic shared object.
This function first registers exchange endpoints and ndr tables, then attempts to register the mapiproxy interface.
Entry point for the pack mapiproxy module
Entry point for the cache mapiproxy module
Entry point for the downgrade mapiproxy module
Register mapiproxy dynamic shared object modules
This function registers mapiproxy modules located
Entry point of mapiproxy dynamic shared object.
This function first registers exchange endpoints and ndr tables, then attempts to register the mapiproxy interface.
Entry point for the pack mapiproxy module
Entry point for the cache mapiproxy module
Entry point for the downgrade mapiproxy module
Entry point for the pack mapiproxy module
Entry point for the default OpenChange EMSMDB server
Entry point for the default OpenChange NSPI server
Entry point for the default OpenChange RFR server
struct ldb_context* samdb_connect | ( | TALLOC_CTX * | , |
struct tevent_context * | , | ||
struct loadparm_context * | , | ||
struct auth_session_info * | , | ||
int | |||
) |
struct GUID* samdb_ntds_objectGUID | ( | struct ldb_context * | ) |
Referenced by dcesrv_NspiBind(), and emsabp_set_EphemeralEntryID().
![]() ![]() ![]() |
This content is licensed under the Creative Commons Attribution ShareAlike License v. 3.0: http://creativecommons.org/licenses/by-sa/3.0/ |