x500.c File Reference
#include "libmapi/libmapi.h"
#include "libmapi/libmapi_private.h"

Functions

_PUBLIC_ char * x500_get_dn_element (TALLOC_CTX *mem_ctx, const char *dn, const char *element)
 
_PUBLIC_ char * x500_get_servername (const char *dn)
 Retrieve the servername from a string We should definitively find a better way to handle this. More...
 
_PUBLIC_ char * x500_truncate_dn_last_elements (TALLOC_CTX *mem_ctx, const char *dn, uint32_t elcount)
 

Function Documentation

_PUBLIC_ char* x500_get_dn_element ( TALLOC_CTX *  mem_ctx,
const char *  dn,
const char *  element 
)

Extract a DN element from a given DN

Parameters
mem_ctxpointer to the memory context
dnpointer to a valid DN
elementpointer to the substring where extraction should start
Returns
pointer to an allocated substring on success, otherwise NULL

Referenced by GetUserFreeBusyData(), and ProcessNetworkProfile().

_PUBLIC_ char* x500_get_servername ( const char *  dn)

Retrieve the servername from a string We should definitively find a better way to handle this.

References SERVERNAME.

Referenced by ProcessNetworkProfile().

_PUBLIC_ char* x500_truncate_dn_last_elements ( TALLOC_CTX *  mem_ctx,
const char *  dn,
uint32_t  elcount 
)

Truncate a DN element

Parameters
mem_ctxpointer to the memory context
dnpointer to a valid DN
elcountthe number of elements to remove from the end of the DN
Returns
pointer to an allocated substring on success, otherwise NULL

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/