ReactOS 0.4.16-dev-297-gc569aee
winldap_private.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  berelement
 
struct  ldap
 
struct  ldapmodA
 
struct  ldapmodW
 
struct  l_timeval
 
struct  ldapmsg
 
struct  ldap_version_info
 
struct  WLDAP32_berval
 
struct  ldapcontrolA
 
struct  ldapcontrolW
 
struct  WLDAP32_ldapvlvinfo
 
struct  ldapsortkeyA
 
struct  ldapsortkeyW
 
struct  ldapapiinfoA
 
struct  ldapapiinfoW
 
struct  ldap_apifeature_infoA
 
struct  ldap_apifeature_infoW
 

Macros

#define WLDAP32_LDAP_OPT_API_INFO   0x00
 
#define WLDAP32_LDAP_OPT_DESC   0x01
 
#define WLDAP32_LDAP_OPT_DEREF   0x02
 
#define WLDAP32_LDAP_OPT_SIZELIMIT   0x03
 
#define WLDAP32_LDAP_OPT_TIMELIMIT   0x04
 
#define WLDAP32_LDAP_OPT_THREAD_FN_PTRS   0x05
 
#define WLDAP32_LDAP_OPT_REBIND_FN   0x06
 
#define WLDAP32_LDAP_OPT_REBIND_ARG   0x07
 
#define WLDAP32_LDAP_OPT_REFERRALS   0x08
 
#define WLDAP32_LDAP_OPT_RESTART   0x09
 
#define WLDAP32_LDAP_OPT_SSL   0x0a
 
#define WLDAP32_LDAP_OPT_IO_FN_PTRS   0x0b
 
#define WLDAP32_LDAP_OPT_CACHE_FN_PTRS   0x0d
 
#define WLDAP32_LDAP_OPT_CACHE_STRATEGY   0x0e
 
#define WLDAP32_LDAP_OPT_CACHE_ENABLE   0x0f
 
#define WLDAP32_LDAP_OPT_REFERRAL_HOP_LIMIT   0x10
 
#define WLDAP32_LDAP_OPT_VERSION   0x11
 
#define WLDAP32_LDAP_OPT_PROTOCOL_VERSION   WLDAP32_LDAP_OPT_VERSION
 
#define WLDAP32_LDAP_OPT_SERVER_CONTROLS   0x12
 
#define WLDAP32_LDAP_OPT_API_FEATURE_INFO   0x15
 
#define WLDAP32_LDAP_OPT_HOST_NAME   0x30
 
#define WLDAP32_LDAP_OPT_ERROR_NUMBER   0x31
 
#define WLDAP32_LDAP_OPT_ERROR_STRING   0x32
 
#define WLDAP32_LDAP_OPT_SERVER_ERROR   0x33
 
#define WLDAP32_LDAP_OPT_SERVER_EXT_ERROR   0x34
 
#define WLDAP32_LDAP_OPT_PING_KEEP_ALIVE   0x36
 
#define WLDAP32_LDAP_OPT_PING_WAIT_TIME   0x37
 
#define WLDAP32_LDAP_OPT_PING_LIMIT   0x38
 
#define WLDAP32_LDAP_OPT_DNSDOMAIN_NAME   0x3b
 
#define WLDAP32_LDAP_OPT_GETDSNAME_FLAGS   0x3d
 
#define WLDAP32_LDAP_OPT_HOST_REACHABLE   0x3e
 
#define WLDAP32_LDAP_OPT_PROMPT_CREDENTIALS   0x3f
 
#define WLDAP32_LDAP_OPT_TCP_KEEPALIVE   0x40
 
#define WLDAP32_LDAP_OPT_FAST_CONCURRENT_BIND   0x41
 
#define WLDAP32_LDAP_OPT_SEND_TIMEOUT   0x42
 
#define WLDAP32_LDAP_OPT_REFERRAL_CALLBACK   0x70
 
#define WLDAP32_LDAP_OPT_CLIENT_CERTIFICATE   0x80
 
#define WLDAP32_LDAP_OPT_SERVER_CERTIFICATE   0x81
 
#define WLDAP32_LDAP_OPT_AUTO_RECONNECT   0x91
 
#define WLDAP32_LDAP_OPT_SSPI_FLAGS   0x92
 
#define WLDAP32_LDAP_OPT_SSL_INFO   0x93
 
#define WLDAP32_LDAP_OPT_REF_DEREF_CONN_PER_MSG   0x94
 
#define WLDAP32_LDAP_OPT_TLS   WLDAP32_LDAP_OPT_SSL
 
#define WLDAP32_LDAP_OPT_TLS_INFO   WLDAP32_LDAP_OPT_SSL_INFO
 
#define WLDAP32_LDAP_OPT_SIGN   0x95
 
#define WLDAP32_LDAP_OPT_ENCRYPT   0x96
 
#define WLDAP32_LDAP_OPT_SASL_METHOD   0x97
 
#define WLDAP32_LDAP_OPT_AREC_EXCLUSIVE   0x98
 
#define WLDAP32_LDAP_OPT_SECURITY_CONTEXT   0x99
 
#define WLDAP32_LDAP_OPT_ROOTDSE_CACHE   0x9a
 
#define LAPI_MAJOR_VER1   1
 
#define LAPI_MINOR_VER1   1
 
#define LDAP_PAGED_RESULT_OID_STRING   "1.2.840.113556.1.4.319"
 
#define LDAP_SERVER_RESP_SORT_OID   "1.2.840.113556.1.4.474"
 
#define LDAP_CONTROL_VLVRESPONSE   "2.16.840.1.113730.3.4.10"
 

Typedefs

typedef struct berelement WLDAP32_BerElement
 
typedef struct ldap WLDAP32_LDAP
 
typedef struct ldapWLDAP32_PLDAP
 
typedef struct ldapmodA LDAPModA
 
typedef struct ldapmodAPLDAPModA
 
typedef struct ldapmodW LDAPModW
 
typedef struct ldapmodWPLDAPModW
 
typedef struct l_timeval LDAP_TIMEVAL
 
typedef struct l_timevalPLDAP_TIMEVAL
 
typedef struct ldapmsg WLDAP32_LDAPMessage
 
typedef struct ldapmsgWLDAP32_PLDAPMessage
 
typedef struct ldap_version_info LDAP_VERSION_INFO
 
typedef struct ldap_version_infoPLDAP_VERSION_INFO
 
typedef struct WLDAP32_berval LDAP_BERVAL
 
typedef struct WLDAP32_bervalPLDAP_BERVAL
 
typedef struct WLDAP32_berval BERVAL
 
typedef struct WLDAP32_bervalPBERVAL
 
typedef struct WLDAP32_berval WLDAP32_BerValue
 
typedef struct ldapcontrolA LDAPControlA
 
typedef struct ldapcontrolAPLDAPControlA
 
typedef struct ldapcontrolW LDAPControlW
 
typedef struct ldapcontrolWPLDAPControlW
 
typedef struct WLDAP32_ldapvlvinfo WLDAP32_LDAPVLVInfo
 
typedef struct WLDAP32_ldapvlvinfoWLDAP32_PLDAPVLVInfo
 
typedef struct ldapsearch LDAPSearch
 
typedef struct ldapsearch * PLDAPSearch
 
typedef struct ldapsortkeyA LDAPSortKeyA
 
typedef struct ldapsortkeyAPLDAPSortKeyA
 
typedef struct ldapsortkeyW LDAPSortKeyW
 
typedef struct ldapsortkeyWPLDAPSortKeyW
 
typedef struct ldapapiinfoA LDAPAPIInfoA
 
typedef struct ldapapiinfoW LDAPAPIInfoW
 
typedef struct ldap_apifeature_infoA LDAPAPIFeatureInfoA
 
typedef struct ldap_apifeature_infoW LDAPAPIFeatureInfoW
 

Enumerations

enum  LDAP_RETCODE {
  WLDAP32_LDAP_SUCCESS = 0x00 , WLDAP32_LDAP_UNWILLING_TO_PERFORM = 0x35 , WLDAP32_LDAP_SERVER_DOWN = 0x51 , WLDAP32_LDAP_LOCAL_ERROR = 0x52 ,
  WLDAP32_LDAP_ENCODING_ERROR = 0x53 , WLDAP32_LDAP_DECODING_ERROR = 0x54 , WLDAP32_LDAP_TIMEOUT = 0x55 , WLDAP32_LDAP_AUTH_UNKNOWN = 0x56 ,
  WLDAP32_LDAP_FILTER_ERROR = 0x57 , WLDAP32_LDAP_USER_CANCELLED = 0x58 , WLDAP32_LDAP_PARAM_ERROR = 0x59 , WLDAP32_LDAP_NO_MEMORY = 0x5a ,
  WLDAP32_LDAP_CONNECT_ERROR = 0x5b , WLDAP32_LDAP_NOT_SUPPORTED = 0x5c , WLDAP32_LDAP_NO_RESULTS_RETURNED = 0x5e , WLDAP32_LDAP_CONTROL_NOT_FOUND = 0x5d ,
  WLDAP32_LDAP_MORE_RESULTS_TO_RETURN = 0x5f , WLDAP32_LDAP_CLIENT_LOOP = 0x60 , WLDAP32_LDAP_REFERRAL_LIMIT_EXCEEDED = 0x61
}
 

Functions

WLDAP32_LDAP *CDECL cldap_openA (PCHAR, ULONG)
 
WLDAP32_LDAP *CDECL cldap_openW (PWCHAR, ULONG)
 
ULONG CDECL WLDAP32_ldap_abandon (WLDAP32_LDAP *, ULONG)
 
ULONG CDECL ldap_addA (WLDAP32_LDAP *, PCHAR, LDAPModA *[])
 
ULONG CDECL ldap_addW (WLDAP32_LDAP *, PWCHAR, LDAPModW *[])
 
ULONG CDECL ldap_add_extA (WLDAP32_LDAP *, PCHAR, LDAPModA *[], PLDAPControlA *, PLDAPControlA *, ULONG *)
 
ULONG CDECL ldap_add_extW (WLDAP32_LDAP *, PWCHAR, LDAPModW *[], PLDAPControlW *, PLDAPControlW *, ULONG *)
 
ULONG CDECL ldap_add_ext_sA (WLDAP32_LDAP *, PCHAR, LDAPModA *[], PLDAPControlA *, PLDAPControlA *)
 
ULONG CDECL ldap_add_ext_sW (WLDAP32_LDAP *, PWCHAR, LDAPModW *[], PLDAPControlW *, PLDAPControlW *)
 
ULONG CDECL ldap_add_sA (WLDAP32_LDAP *, PCHAR, LDAPModA *[])
 
ULONG CDECL ldap_add_sW (WLDAP32_LDAP *, PWCHAR, LDAPModW *[])
 
ULONG CDECL ldap_bindA (WLDAP32_LDAP *, PCHAR, PCHAR, ULONG)
 
ULONG CDECL ldap_bindW (WLDAP32_LDAP *, PWCHAR, PWCHAR, ULONG)
 
ULONG CDECL ldap_bind_sA (WLDAP32_LDAP *, PCHAR, PCHAR, ULONG)
 
ULONG CDECL ldap_bind_sW (WLDAP32_LDAP *, PWCHAR, PWCHAR, ULONG)
 
ULONG CDECL ldap_check_filterA (WLDAP32_LDAP *, PCHAR)
 
ULONG CDECL ldap_check_filterW (WLDAP32_LDAP *, PWCHAR)
 
ULONG CDECL ldap_cleanup (HANDLE)
 
ULONG CDECL ldap_close_extended_op (WLDAP32_LDAP *, ULONG)
 
ULONG CDECL ldap_compareA (WLDAP32_LDAP *, PCHAR, PCHAR, PCHAR)
 
ULONG CDECL ldap_compareW (WLDAP32_LDAP *, PWCHAR, PWCHAR, PWCHAR)
 
ULONG CDECL ldap_compare_extA (WLDAP32_LDAP *, PCHAR, PCHAR, PCHAR, struct WLDAP32_berval *, PLDAPControlA *, PLDAPControlA *, ULONG *)
 
ULONG CDECL ldap_compare_extW (WLDAP32_LDAP *, PWCHAR, PWCHAR, PWCHAR, struct WLDAP32_berval *, PLDAPControlW *, PLDAPControlW *, ULONG *)
 
ULONG CDECL ldap_compare_ext_sA (WLDAP32_LDAP *, PCHAR, PCHAR, PCHAR, struct WLDAP32_berval *, PLDAPControlA *, PLDAPControlA *)
 
ULONG CDECL ldap_compare_ext_sW (WLDAP32_LDAP *, PWCHAR, PWCHAR, PWCHAR, struct WLDAP32_berval *, PLDAPControlW *, PLDAPControlW *)
 
ULONG CDECL ldap_compare_sA (WLDAP32_LDAP *, PCHAR, PCHAR, PCHAR)
 
ULONG CDECL ldap_compare_sW (WLDAP32_LDAP *, PWCHAR, PWCHAR, PWCHAR)
 
ULONG CDECL ldap_connect (WLDAP32_LDAP *, LDAP_TIMEVAL *)
 
WLDAP32_LDAP *CDECL ldap_conn_from_msg (WLDAP32_LDAP *, WLDAP32_LDAPMessage *)
 
ULONG CDECL ldap_control_freeA (LDAPControlA *)
 
ULONG CDECL ldap_control_freeW (LDAPControlW *)
 
ULONG CDECL ldap_controls_freeA (LDAPControlA **)
 
ULONG CDECL ldap_controls_freeW (LDAPControlW **)
 
ULONG CDECL WLDAP32_ldap_count_entries (WLDAP32_LDAP *, WLDAP32_LDAPMessage *)
 
ULONG CDECL WLDAP32_ldap_count_references (WLDAP32_LDAP *, WLDAP32_LDAPMessage *)
 
ULONG CDECL ldap_count_valuesA (PCHAR *)
 
ULONG CDECL ldap_count_valuesW (PWCHAR *)
 
ULONG CDECL WLDAP32_ldap_count_values_len (PBERVAL *)
 
ULONG CDECL ldap_create_page_controlA (WLDAP32_PLDAP, ULONG, struct WLDAP32_berval *, UCHAR, PLDAPControlA *)
 
ULONG CDECL ldap_create_page_controlW (WLDAP32_PLDAP, ULONG, struct WLDAP32_berval *, UCHAR, PLDAPControlW *)
 
ULONG CDECL ldap_create_sort_controlA (WLDAP32_PLDAP, PLDAPSortKeyA *, UCHAR, PLDAPControlA *)
 
ULONG CDECL ldap_create_sort_controlW (WLDAP32_PLDAP, PLDAPSortKeyW *, UCHAR, PLDAPControlW *)
 
INT CDECL ldap_create_vlv_controlA (WLDAP32_LDAP *, WLDAP32_LDAPVLVInfo *, UCHAR, LDAPControlA **)
 
INT CDECL ldap_create_vlv_controlW (WLDAP32_LDAP *, WLDAP32_LDAPVLVInfo *, UCHAR, LDAPControlW **)
 
ULONG CDECL ldap_deleteA (WLDAP32_LDAP *, PCHAR)
 
ULONG CDECL ldap_deleteW (WLDAP32_LDAP *, PWCHAR)
 
ULONG CDECL ldap_delete_extA (WLDAP32_LDAP *, PCHAR, PLDAPControlA *, PLDAPControlA *, ULONG *)
 
ULONG CDECL ldap_delete_extW (WLDAP32_LDAP *, PWCHAR, PLDAPControlW *, PLDAPControlW *, ULONG *)
 
ULONG CDECL ldap_delete_ext_sA (WLDAP32_LDAP *, PCHAR, PLDAPControlA *, PLDAPControlA *)
 
ULONG CDECL ldap_delete_ext_sW (WLDAP32_LDAP *, PWCHAR, PLDAPControlW *, PLDAPControlW *)
 
ULONG CDECL ldap_delete_sA (WLDAP32_LDAP *, PCHAR)
 
ULONG CDECL ldap_delete_sW (WLDAP32_LDAP *, PWCHAR)
 
PCHAR CDECL ldap_dn2ufnA (PCHAR)
 
PWCHAR CDECL ldap_dn2ufnW (PWCHAR)
 
ULONG CDECL ldap_encode_sort_controlA (WLDAP32_PLDAP, PLDAPSortKeyA *, PLDAPControlA, BOOLEAN)
 
ULONG CDECL ldap_encode_sort_controlW (WLDAP32_PLDAP, PLDAPSortKeyW *, PLDAPControlW, BOOLEAN)
 
PCHAR CDECL ldap_err2stringA (ULONG)
 
PWCHAR CDECL ldap_err2stringW (ULONG)
 
ULONG CDECL ldap_escape_filter_elementA (PCHAR, ULONG, PCHAR, ULONG)
 
ULONG CDECL ldap_escape_filter_elementW (PCHAR, ULONG, PWCHAR, ULONG)
 
PCHAR *CDECL ldap_explode_dnA (PCHAR, ULONG)
 
PWCHAR *CDECL ldap_explode_dnW (PWCHAR, ULONG)
 
ULONG CDECL ldap_extended_operationA (WLDAP32_LDAP *, PCHAR, struct WLDAP32_berval *, PLDAPControlA *, PLDAPControlA *, ULONG *)
 
ULONG CDECL ldap_extended_operationW (WLDAP32_LDAP *, PWCHAR, struct WLDAP32_berval *, PLDAPControlW *, PLDAPControlW *, ULONG *)
 
ULONG CDECL ldap_extended_operation_sA (WLDAP32_LDAP *, PCHAR, struct WLDAP32_berval *, PLDAPControlA *, PLDAPControlA *, PCHAR *, struct WLDAP32_berval **)
 
ULONG CDECL ldap_extended_operation_sW (WLDAP32_LDAP *, PWCHAR, struct WLDAP32_berval *, PLDAPControlW *, PLDAPControlW *, PWCHAR *, struct WLDAP32_berval **)
 
PCHAR CDECL ldap_first_attributeA (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, WLDAP32_BerElement **)
 
PWCHAR CDECL ldap_first_attributeW (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, WLDAP32_BerElement **)
 
WLDAP32_LDAPMessage *CDECL WLDAP32_ldap_first_entry (WLDAP32_LDAP *, WLDAP32_LDAPMessage *)
 
WLDAP32_LDAPMessage *CDECL WLDAP32_ldap_first_reference (WLDAP32_LDAP *, WLDAP32_LDAPMessage *)
 
ULONG CDECL ldap_free_controlsA (LDAPControlA **)
 
ULONG CDECL ldap_free_controlsW (LDAPControlW **)
 
PCHAR CDECL ldap_get_dnA (WLDAP32_LDAP *, WLDAP32_LDAPMessage *)
 
PWCHAR CDECL ldap_get_dnW (WLDAP32_LDAP *, WLDAP32_LDAPMessage *)
 
ULONG CDECL ldap_get_next_page (WLDAP32_LDAP *, PLDAPSearch, ULONG, ULONG *)
 
ULONG CDECL ldap_get_next_page_s (WLDAP32_LDAP *, PLDAPSearch, struct l_timeval *, ULONG, ULONG *, WLDAP32_LDAPMessage **)
 
ULONG CDECL ldap_get_optionA (WLDAP32_LDAP *, int, void *)
 
ULONG CDECL ldap_get_optionW (WLDAP32_LDAP *, int, void *)
 
ULONG CDECL ldap_get_paged_count (WLDAP32_LDAP *, PLDAPSearch, ULONG *, WLDAP32_LDAPMessage *)
 
PCHAR *CDECL ldap_get_valuesA (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, PCHAR)
 
PWCHAR *CDECL ldap_get_valuesW (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, PWCHAR)
 
PBERVAL *CDECL ldap_get_values_lenA (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, PCHAR)
 
PBERVAL *CDECL ldap_get_values_lenW (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, PWCHAR)
 
WLDAP32_LDAP *CDECL ldap_initA (const PCHAR, ULONG)
 
WLDAP32_LDAP *CDECL ldap_initW (const PWCHAR, ULONG)
 
void CDECL ldap_memfreeA (PCHAR)
 
void CDECL ldap_memfreeW (PWCHAR)
 
ULONG CDECL ldap_modifyA (WLDAP32_LDAP *, PCHAR, LDAPModA *[])
 
ULONG CDECL ldap_modifyW (WLDAP32_LDAP *, PWCHAR, LDAPModW *[])
 
ULONG CDECL ldap_modify_extA (WLDAP32_LDAP *, PCHAR, LDAPModA *[], PLDAPControlA *, PLDAPControlA *, ULONG *)
 
ULONG CDECL ldap_modify_extW (WLDAP32_LDAP *, PWCHAR, LDAPModW *[], PLDAPControlW *, PLDAPControlW *, ULONG *)
 
ULONG CDECL ldap_modify_ext_sA (WLDAP32_LDAP *, PCHAR, LDAPModA *[], PLDAPControlA *, PLDAPControlA *)
 
ULONG CDECL ldap_modify_ext_sW (WLDAP32_LDAP *, PWCHAR, LDAPModW *[], PLDAPControlW *, PLDAPControlW *)
 
ULONG CDECL ldap_modify_sA (WLDAP32_LDAP *, PCHAR, LDAPModA *[])
 
ULONG CDECL ldap_modify_sW (WLDAP32_LDAP *, PWCHAR, LDAPModW *[])
 
ULONG CDECL ldap_modrdnA (WLDAP32_LDAP *, PCHAR, PCHAR)
 
ULONG CDECL ldap_modrdnW (WLDAP32_LDAP *, PWCHAR, PWCHAR)
 
ULONG CDECL ldap_modrdn2A (WLDAP32_LDAP *, PCHAR, PCHAR, INT)
 
ULONG CDECL ldap_modrdn2W (WLDAP32_LDAP *, PWCHAR, PWCHAR, INT)
 
ULONG CDECL ldap_modrdn2_sA (WLDAP32_LDAP *, PCHAR, PCHAR, INT)
 
ULONG CDECL ldap_modrdn2_sW (WLDAP32_LDAP *, PWCHAR, PWCHAR, INT)
 
ULONG CDECL ldap_modrdn_sA (WLDAP32_LDAP *, PCHAR, PCHAR)
 
ULONG CDECL ldap_modrdn_sW (WLDAP32_LDAP *, PWCHAR, PWCHAR)
 
ULONG CDECL WLDAP32_ldap_msgfree (WLDAP32_LDAPMessage *)
 
PCHAR CDECL ldap_next_attributeA (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, WLDAP32_BerElement *)
 
PWCHAR CDECL ldap_next_attributeW (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, WLDAP32_BerElement *)
 
WLDAP32_LDAPMessage *CDECL WLDAP32_ldap_next_entry (WLDAP32_LDAP *, WLDAP32_LDAPMessage *)
 
WLDAP32_LDAPMessage *CDECL WLDAP32_ldap_next_reference (WLDAP32_LDAP *, WLDAP32_LDAPMessage *)
 
WLDAP32_LDAP *CDECL ldap_openA (PCHAR, ULONG)
 
WLDAP32_LDAP *CDECL ldap_openW (PWCHAR, ULONG)
 
ULONG CDECL ldap_parse_extended_resultA (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, PCHAR *, struct WLDAP32_berval **, BOOLEAN)
 
ULONG CDECL ldap_parse_extended_resultW (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, PWCHAR *, struct WLDAP32_berval **, BOOLEAN)
 
ULONG CDECL ldap_parse_page_controlA (WLDAP32_LDAP *, PLDAPControlA *, ULONG *, struct WLDAP32_berval **)
 
ULONG CDECL ldap_parse_page_controlW (WLDAP32_LDAP *, PLDAPControlW *, ULONG *, struct WLDAP32_berval **)
 
ULONG CDECL ldap_parse_referenceA (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, PCHAR **)
 
ULONG CDECL ldap_parse_referenceW (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, PWCHAR **)
 
ULONG CDECL ldap_parse_resultA (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, ULONG *, PCHAR *, PCHAR *, PCHAR **, PLDAPControlA **, BOOLEAN)
 
ULONG CDECL ldap_parse_resultW (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, ULONG *, PWCHAR *, PWCHAR *, PWCHAR **, PLDAPControlW **, BOOLEAN)
 
ULONG CDECL ldap_parse_sort_controlA (WLDAP32_LDAP *, PLDAPControlA *, ULONG *, PCHAR *)
 
ULONG CDECL ldap_parse_sort_controlW (WLDAP32_LDAP *, PLDAPControlW *, ULONG *, PWCHAR *)
 
int CDECL ldap_parse_vlv_controlA (WLDAP32_LDAP *, LDAPControlA **, ULONG *, ULONG *, struct WLDAP32_berval **, INT *)
 
int CDECL ldap_parse_vlv_controlW (WLDAP32_LDAP *, LDAPControlW **, ULONG *, ULONG *, struct WLDAP32_berval **, INT *)
 
void CDECL WLDAP32_ldap_perror (WLDAP32_LDAP *, const PCHAR)
 
ULONG CDECL ldap_rename_extA (WLDAP32_LDAP *, PCHAR, PCHAR, PCHAR, INT, PLDAPControlA *, PLDAPControlA *, ULONG *)
 
ULONG CDECL ldap_rename_extW (WLDAP32_LDAP *, PWCHAR, PWCHAR, PWCHAR, INT, PLDAPControlW *, PLDAPControlW *, ULONG *)
 
ULONG CDECL ldap_rename_ext_sA (WLDAP32_LDAP *, PCHAR, PCHAR, PCHAR, INT, PLDAPControlA *, PLDAPControlA *)
 
ULONG CDECL ldap_rename_ext_sW (WLDAP32_LDAP *, PWCHAR, PWCHAR, PWCHAR, INT, PLDAPControlW *, PLDAPControlW *)
 
ULONG CDECL WLDAP32_ldap_result (WLDAP32_LDAP *, ULONG, ULONG, struct l_timeval *, WLDAP32_LDAPMessage **)
 
ULONG CDECL WLDAP32_ldap_result2error (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, ULONG)
 
ULONG CDECL ldap_sasl_bindA (WLDAP32_LDAP *, const PCHAR, const PCHAR, const BERVAL *, PLDAPControlA *, PLDAPControlA *, int *)
 
ULONG CDECL ldap_sasl_bindW (WLDAP32_LDAP *, const PWCHAR, const PWCHAR, const BERVAL *, PLDAPControlW *, PLDAPControlW *, int *)
 
ULONG CDECL ldap_sasl_bind_sA (WLDAP32_LDAP *, const PCHAR, const PCHAR, const BERVAL *, PLDAPControlA *, PLDAPControlA *, PBERVAL *)
 
ULONG CDECL ldap_sasl_bind_sW (WLDAP32_LDAP *, const PWCHAR, const PWCHAR, const BERVAL *, PLDAPControlW *, PLDAPControlW *, PBERVAL *)
 
ULONG CDECL ldap_search_abandon_page (WLDAP32_PLDAP, PLDAPSearch)
 
ULONG CDECL ldap_searchA (WLDAP32_LDAP *, PCHAR, ULONG, PCHAR, PCHAR[], ULONG)
 
ULONG CDECL ldap_searchW (WLDAP32_LDAP *, PWCHAR, ULONG, PWCHAR, PWCHAR[], ULONG)
 
ULONG CDECL ldap_search_extA (WLDAP32_LDAP *, PCHAR, ULONG, PCHAR, PCHAR[], ULONG, PLDAPControlA *, PLDAPControlA *, ULONG, ULONG, ULONG *)
 
ULONG CDECL ldap_search_extW (WLDAP32_LDAP *, PWCHAR, ULONG, PWCHAR, PWCHAR[], ULONG, PLDAPControlW *, PLDAPControlW *, ULONG, ULONG, ULONG *)
 
ULONG CDECL ldap_search_ext_sA (WLDAP32_LDAP *, PCHAR, ULONG, PCHAR, PCHAR[], ULONG, PLDAPControlA *, PLDAPControlA *, struct l_timeval *, ULONG, WLDAP32_LDAPMessage **)
 
ULONG CDECL ldap_search_ext_sW (WLDAP32_LDAP *, PWCHAR, ULONG, PWCHAR, PWCHAR[], ULONG, PLDAPControlW *, PLDAPControlW *, struct l_timeval *, ULONG, WLDAP32_LDAPMessage **)
 
PLDAPSearch CDECL ldap_search_init_pageA (WLDAP32_PLDAP, PCHAR, ULONG, PCHAR, PCHAR[], ULONG, PLDAPControlA *, PLDAPControlA *, ULONG, ULONG, PLDAPSortKeyA *)
 
PLDAPSearch CDECL ldap_search_init_pageW (WLDAP32_PLDAP, PWCHAR, ULONG, PWCHAR, PWCHAR[], ULONG, PLDAPControlW *, PLDAPControlW *, ULONG, ULONG, PLDAPSortKeyW *)
 
ULONG CDECL ldap_search_sA (WLDAP32_LDAP *, PCHAR, ULONG, PCHAR, PCHAR[], ULONG, WLDAP32_LDAPMessage **)
 
ULONG CDECL ldap_search_sW (WLDAP32_LDAP *, PWCHAR, ULONG, PWCHAR, PWCHAR[], ULONG, WLDAP32_LDAPMessage **)
 
ULONG CDECL ldap_search_stA (WLDAP32_LDAP *, const PCHAR, ULONG, const PCHAR, PCHAR[], ULONG, struct l_timeval *, WLDAP32_LDAPMessage **)
 
ULONG CDECL ldap_search_stW (WLDAP32_LDAP *, const PWCHAR, ULONG, const PWCHAR, PWCHAR[], ULONG, struct l_timeval *, WLDAP32_LDAPMessage **)
 
ULONG CDECL ldap_set_optionA (WLDAP32_LDAP *, int, void *)
 
ULONG CDECL ldap_set_optionW (WLDAP32_LDAP *, int, void *)
 
ULONG CDECL ldap_simple_bindA (WLDAP32_LDAP *, PCHAR, PCHAR)
 
ULONG CDECL ldap_simple_bindW (WLDAP32_LDAP *, PWCHAR, PWCHAR)
 
ULONG CDECL ldap_simple_bind_sA (WLDAP32_LDAP *, PCHAR, PCHAR)
 
ULONG CDECL ldap_simple_bind_sW (WLDAP32_LDAP *, PWCHAR, PWCHAR)
 
WLDAP32_LDAP *CDECL ldap_sslinitA (PCHAR, ULONG, int)
 
WLDAP32_LDAP *CDECL ldap_sslinitW (PWCHAR, ULONG, int)
 
ULONG CDECL ldap_start_tls_sA (WLDAP32_PLDAP, PULONG, WLDAP32_LDAPMessage **, PLDAPControlA *, PLDAPControlA *)
 
ULONG CDECL ldap_start_tls_sW (WLDAP32_PLDAP, PULONG, WLDAP32_LDAPMessage **, PLDAPControlW *, PLDAPControlW *)
 
ULONG CDECL ldap_startup (PLDAP_VERSION_INFO, HANDLE *)
 
BOOLEAN CDECL ldap_stop_tls_s (WLDAP32_PLDAP)
 
ULONG CDECL ldap_ufn2dnA (PCHAR, PCHAR *)
 
ULONG CDECL ldap_ufn2dnW (PWCHAR, PWCHAR *)
 
ULONG CDECL WLDAP32_ldap_unbind (WLDAP32_LDAP *)
 
ULONG CDECL WLDAP32_ldap_unbind_s (WLDAP32_LDAP *)
 
ULONG CDECL ldap_value_freeA (PCHAR *)
 
ULONG CDECL ldap_value_freeW (PWCHAR *)
 
ULONG CDECL WLDAP32_ldap_value_free_len (struct WLDAP32_berval **)
 
ULONG CDECL LdapGetLastError (void)
 
ULONG CDECL LdapMapErrorToWin32 (ULONG)
 
int CDECL LdapUnicodeToUTF8 (LPCWSTR, int, LPSTR, int)
 
int CDECL LdapUTF8ToUnicode (LPCSTR, int, LPWSTR, int)
 

Variables

static const WCHAR LDAP_PAGED_RESULT_OID_STRING_W [] = {'1','.','2','.','8','4','0','.','1','1','3','5','5','6','.','1','.','4','.','3','1','9',0}
 
static const WCHAR LDAP_SERVER_RESP_SORT_OID_W [] = {'1','.','2','.','8','4','0','.','1','1','3','5','5','6','.','1','.','4','.','4','7','4',0}
 
static const WCHAR LDAP_CONTROL_VLVRESPONSE_W [] = {'2','.','1','6','.','8','4','0','.','1','.','1','1','3','7','3','0','.','3','.','4','.','1','0',0}
 

Macro Definition Documentation

◆ LAPI_MAJOR_VER1

#define LAPI_MAJOR_VER1   1

Definition at line 177 of file winldap_private.h.

◆ LAPI_MINOR_VER1

#define LAPI_MINOR_VER1   1

Definition at line 178 of file winldap_private.h.

◆ LDAP_CONTROL_VLVRESPONSE

#define LDAP_CONTROL_VLVRESPONSE   "2.16.840.1.113730.3.4.10"

Definition at line 195 of file winldap_private.h.

◆ LDAP_PAGED_RESULT_OID_STRING

#define LDAP_PAGED_RESULT_OID_STRING   "1.2.840.113556.1.4.319"

Definition at line 193 of file winldap_private.h.

◆ LDAP_SERVER_RESP_SORT_OID

#define LDAP_SERVER_RESP_SORT_OID   "1.2.840.113556.1.4.474"

Definition at line 194 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_API_FEATURE_INFO

#define WLDAP32_LDAP_OPT_API_FEATURE_INFO   0x15

Definition at line 74 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_API_INFO

#define WLDAP32_LDAP_OPT_API_INFO   0x00

Definition at line 55 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_AREC_EXCLUSIVE

#define WLDAP32_LDAP_OPT_AREC_EXCLUSIVE   0x98

Definition at line 102 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_AUTO_RECONNECT

#define WLDAP32_LDAP_OPT_AUTO_RECONNECT   0x91

Definition at line 93 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_CACHE_ENABLE

#define WLDAP32_LDAP_OPT_CACHE_ENABLE   0x0f

Definition at line 69 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_CACHE_FN_PTRS

#define WLDAP32_LDAP_OPT_CACHE_FN_PTRS   0x0d

Definition at line 67 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_CACHE_STRATEGY

#define WLDAP32_LDAP_OPT_CACHE_STRATEGY   0x0e

Definition at line 68 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_CLIENT_CERTIFICATE

#define WLDAP32_LDAP_OPT_CLIENT_CERTIFICATE   0x80

Definition at line 91 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_DEREF

#define WLDAP32_LDAP_OPT_DEREF   0x02

Definition at line 57 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_DESC

#define WLDAP32_LDAP_OPT_DESC   0x01

Definition at line 56 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_DNSDOMAIN_NAME

#define WLDAP32_LDAP_OPT_DNSDOMAIN_NAME   0x3b

Definition at line 83 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_ENCRYPT

#define WLDAP32_LDAP_OPT_ENCRYPT   0x96

Definition at line 100 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_ERROR_NUMBER

#define WLDAP32_LDAP_OPT_ERROR_NUMBER   0x31

Definition at line 76 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_ERROR_STRING

#define WLDAP32_LDAP_OPT_ERROR_STRING   0x32

Definition at line 77 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_FAST_CONCURRENT_BIND

#define WLDAP32_LDAP_OPT_FAST_CONCURRENT_BIND   0x41

Definition at line 88 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_GETDSNAME_FLAGS

#define WLDAP32_LDAP_OPT_GETDSNAME_FLAGS   0x3d

Definition at line 84 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_HOST_NAME

#define WLDAP32_LDAP_OPT_HOST_NAME   0x30

Definition at line 75 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_HOST_REACHABLE

#define WLDAP32_LDAP_OPT_HOST_REACHABLE   0x3e

Definition at line 85 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_IO_FN_PTRS

#define WLDAP32_LDAP_OPT_IO_FN_PTRS   0x0b

Definition at line 66 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_PING_KEEP_ALIVE

#define WLDAP32_LDAP_OPT_PING_KEEP_ALIVE   0x36

Definition at line 80 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_PING_LIMIT

#define WLDAP32_LDAP_OPT_PING_LIMIT   0x38

Definition at line 82 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_PING_WAIT_TIME

#define WLDAP32_LDAP_OPT_PING_WAIT_TIME   0x37

Definition at line 81 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_PROMPT_CREDENTIALS

#define WLDAP32_LDAP_OPT_PROMPT_CREDENTIALS   0x3f

Definition at line 86 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_PROTOCOL_VERSION

#define WLDAP32_LDAP_OPT_PROTOCOL_VERSION   WLDAP32_LDAP_OPT_VERSION

Definition at line 72 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_REBIND_ARG

#define WLDAP32_LDAP_OPT_REBIND_ARG   0x07

Definition at line 62 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_REBIND_FN

#define WLDAP32_LDAP_OPT_REBIND_FN   0x06

Definition at line 61 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_REF_DEREF_CONN_PER_MSG

#define WLDAP32_LDAP_OPT_REF_DEREF_CONN_PER_MSG   0x94

Definition at line 96 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_REFERRAL_CALLBACK

#define WLDAP32_LDAP_OPT_REFERRAL_CALLBACK   0x70

Definition at line 90 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_REFERRAL_HOP_LIMIT

#define WLDAP32_LDAP_OPT_REFERRAL_HOP_LIMIT   0x10

Definition at line 70 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_REFERRALS

#define WLDAP32_LDAP_OPT_REFERRALS   0x08

Definition at line 63 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_RESTART

#define WLDAP32_LDAP_OPT_RESTART   0x09

Definition at line 64 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_ROOTDSE_CACHE

#define WLDAP32_LDAP_OPT_ROOTDSE_CACHE   0x9a

Definition at line 104 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SASL_METHOD

#define WLDAP32_LDAP_OPT_SASL_METHOD   0x97

Definition at line 101 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SECURITY_CONTEXT

#define WLDAP32_LDAP_OPT_SECURITY_CONTEXT   0x99

Definition at line 103 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SEND_TIMEOUT

#define WLDAP32_LDAP_OPT_SEND_TIMEOUT   0x42

Definition at line 89 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SERVER_CERTIFICATE

#define WLDAP32_LDAP_OPT_SERVER_CERTIFICATE   0x81

Definition at line 92 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SERVER_CONTROLS

#define WLDAP32_LDAP_OPT_SERVER_CONTROLS   0x12

Definition at line 73 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SERVER_ERROR

#define WLDAP32_LDAP_OPT_SERVER_ERROR   0x33

Definition at line 78 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SERVER_EXT_ERROR

#define WLDAP32_LDAP_OPT_SERVER_EXT_ERROR   0x34

Definition at line 79 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SIGN

#define WLDAP32_LDAP_OPT_SIGN   0x95

Definition at line 99 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SIZELIMIT

#define WLDAP32_LDAP_OPT_SIZELIMIT   0x03

Definition at line 58 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SSL

#define WLDAP32_LDAP_OPT_SSL   0x0a

Definition at line 65 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SSL_INFO

#define WLDAP32_LDAP_OPT_SSL_INFO   0x93

Definition at line 95 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SSPI_FLAGS

#define WLDAP32_LDAP_OPT_SSPI_FLAGS   0x92

Definition at line 94 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_TCP_KEEPALIVE

#define WLDAP32_LDAP_OPT_TCP_KEEPALIVE   0x40

Definition at line 87 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_THREAD_FN_PTRS

#define WLDAP32_LDAP_OPT_THREAD_FN_PTRS   0x05

Definition at line 60 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_TIMELIMIT

#define WLDAP32_LDAP_OPT_TIMELIMIT   0x04

Definition at line 59 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_TLS

#define WLDAP32_LDAP_OPT_TLS   WLDAP32_LDAP_OPT_SSL

Definition at line 97 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_TLS_INFO

#define WLDAP32_LDAP_OPT_TLS_INFO   WLDAP32_LDAP_OPT_SSL_INFO

Definition at line 98 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_VERSION

#define WLDAP32_LDAP_OPT_VERSION   0x11

Definition at line 71 of file winldap_private.h.

Typedef Documentation

◆ BERVAL

◆ LDAP_BERVAL

◆ LDAP_TIMEVAL

◆ LDAP_VERSION_INFO

◆ LDAPAPIFeatureInfoA

◆ LDAPAPIFeatureInfoW

◆ LDAPAPIInfoA

◆ LDAPAPIInfoW

◆ LDAPControlA

◆ LDAPControlW

◆ LDAPModA

◆ LDAPModW

◆ LDAPSearch

typedef struct ldapsearch LDAPSearch

Definition at line 233 of file winldap_private.h.

◆ LDAPSortKeyA

◆ LDAPSortKeyW

◆ PBERVAL

◆ PLDAP_BERVAL

◆ PLDAP_TIMEVAL

◆ PLDAP_VERSION_INFO

◆ PLDAPControlA

◆ PLDAPControlW

◆ PLDAPModA

◆ PLDAPModW

◆ PLDAPSearch

typedef struct ldapsearch * PLDAPSearch

Definition at line 233 of file winldap_private.h.

◆ PLDAPSortKeyA

◆ PLDAPSortKeyW

◆ WLDAP32_BerElement

◆ WLDAP32_BerValue

◆ WLDAP32_LDAP

◆ WLDAP32_LDAPMessage

◆ WLDAP32_LDAPVLVInfo

◆ WLDAP32_PLDAP

◆ WLDAP32_PLDAPMessage

◆ WLDAP32_PLDAPVLVInfo

Enumeration Type Documentation

◆ LDAP_RETCODE

Enumerator
WLDAP32_LDAP_SUCCESS 
WLDAP32_LDAP_UNWILLING_TO_PERFORM 
WLDAP32_LDAP_SERVER_DOWN 
WLDAP32_LDAP_LOCAL_ERROR 
WLDAP32_LDAP_ENCODING_ERROR 
WLDAP32_LDAP_DECODING_ERROR 
WLDAP32_LDAP_TIMEOUT 
WLDAP32_LDAP_AUTH_UNKNOWN 
WLDAP32_LDAP_FILTER_ERROR 
WLDAP32_LDAP_USER_CANCELLED 
WLDAP32_LDAP_PARAM_ERROR 
WLDAP32_LDAP_NO_MEMORY 
WLDAP32_LDAP_CONNECT_ERROR 
WLDAP32_LDAP_NOT_SUPPORTED 
WLDAP32_LDAP_NO_RESULTS_RETURNED 
WLDAP32_LDAP_CONTROL_NOT_FOUND 
WLDAP32_LDAP_MORE_RESULTS_TO_RETURN 
WLDAP32_LDAP_CLIENT_LOOP 
WLDAP32_LDAP_REFERRAL_LIMIT_EXCEEDED 

Definition at line 27 of file winldap_private.h.

27 {
45
LDAP_RETCODE
@ WLDAP32_LDAP_USER_CANCELLED
@ WLDAP32_LDAP_DECODING_ERROR
@ WLDAP32_LDAP_MORE_RESULTS_TO_RETURN
@ WLDAP32_LDAP_AUTH_UNKNOWN
@ WLDAP32_LDAP_LOCAL_ERROR
@ WLDAP32_LDAP_UNWILLING_TO_PERFORM
@ WLDAP32_LDAP_PARAM_ERROR
@ WLDAP32_LDAP_ENCODING_ERROR
@ WLDAP32_LDAP_NOT_SUPPORTED
@ WLDAP32_LDAP_NO_RESULTS_RETURNED
@ WLDAP32_LDAP_SUCCESS
@ WLDAP32_LDAP_NO_MEMORY
@ WLDAP32_LDAP_REFERRAL_LIMIT_EXCEEDED
@ WLDAP32_LDAP_CLIENT_LOOP
@ WLDAP32_LDAP_FILTER_ERROR
@ WLDAP32_LDAP_SERVER_DOWN
@ WLDAP32_LDAP_TIMEOUT
@ WLDAP32_LDAP_CONTROL_NOT_FOUND
@ WLDAP32_LDAP_CONNECT_ERROR

Function Documentation

◆ cldap_openA()

WLDAP32_LDAP *CDECL cldap_openA ( PCHAR  hostname,
ULONG  portnumber 
)

Definition at line 223 of file init.c.

224{
225#ifdef HAVE_LDAP
226 WLDAP32_LDAP *ld = NULL;
227 WCHAR *hostnameW = NULL;
228
229 TRACE( "(%s, %d)\n", debugstr_a(hostname), portnumber );
230
231 if (hostname) {
232 hostnameW = strAtoW( hostname );
233 if (!hostnameW) goto exit;
234 }
235
236 ld = cldap_openW( hostnameW, portnumber );
237
238exit:
239 strfreeW( hostnameW );
240 return ld;
241
242#else
243 return NULL;
244#endif
245}
char * hostname
Definition: ftp.c:88
#define NULL
Definition: types.h:112
WLDAP32_LDAP *CDECL cldap_openW(PWCHAR hostname, ULONG portnumber)
Definition: init.c:268
static LPWSTR strAtoW(const char *str)
#define debugstr_a
Definition: kernel32.h:31
#define exit(n)
Definition: config.h:202
#define TRACE(s)
Definition: solgame.cpp:4
static void strfreeW(LPWSTR str)
Definition: wldap32.h:103
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ cldap_openW()

WLDAP32_LDAP *CDECL cldap_openW ( PWCHAR  hostname,
ULONG  portnumber 
)

Definition at line 268 of file init.c.

269{
270#ifdef HAVE_LDAP
271 LDAP *ld = NULL;
272 char *hostnameU = NULL, *url = NULL;
273
274 TRACE( "(%s, %d)\n", debugstr_w(hostname), portnumber );
275
276 if (hostname) {
277 hostnameU = strWtoU( hostname );
278 if (!hostnameU) goto exit;
279 }
280 else {
281 hostnameU = strWtoU( defaulthost );
282 if (!hostnameU) goto exit;
283 }
284
285 url = urlify_hostnames( "cldap://", hostnameU, portnumber );
286 if (!url) goto exit;
287
288 ld = create_context( url );
289
290exit:
291 strfreeU( hostnameU );
292 strfreeU( url );
293 return ld;
294
295#else
296 return NULL;
297#endif
298}
#define debugstr_w
Definition: kernel32.h:32
static const WCHAR url[]
Definition: encode.c:1432
static void strfreeU(char *str)
Definition: wldap32.h:108
static char * strWtoU(LPCWSTR str)
Definition: wldap32.h:74

◆ ldap_add_ext_sA()

ULONG CDECL ldap_add_ext_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
LDAPModA attrs[],
PLDAPControlA serverctrls,
PLDAPControlA clientctrls 
)

Definition at line 263 of file add.c.

265{
267#ifdef HAVE_LDAP
268 WCHAR *dnW = NULL;
269 LDAPModW **attrsW = NULL;
270 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
271
273
274 TRACE( "(%p, %s, %p, %p, %p)\n", ld, debugstr_a(dn), attrs,
275 serverctrls, clientctrls );
276
277 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
278
279 if (dn) {
280 dnW = strAtoW( dn );
281 if (!dnW) goto exit;
282 }
283 if (attrs) {
284 attrsW = modarrayAtoW( attrs );
285 if (!attrsW) goto exit;
286 }
287 if (serverctrls) {
288 serverctrlsW = controlarrayAtoW( serverctrls );
289 if (!serverctrlsW) goto exit;
290 }
291 if (clientctrls) {
292 clientctrlsW = controlarrayAtoW( clientctrls );
293 if (!clientctrlsW) goto exit;
294 }
295
296 ret = ldap_add_ext_sW( ld, dnW, attrsW, serverctrlsW, clientctrlsW );
297
298exit:
299 strfreeW( dnW );
300 modarrayfreeW( attrsW );
301 controlarrayfreeW( serverctrlsW );
302 controlarrayfreeW( clientctrlsW );
303
304#endif
305 return ret;
306}
ULONG CDECL ldap_add_ext_sW(WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *attrs[], PLDAPControlW *serverctrls, PLDAPControlW *clientctrls)
Definition: add.c:329
uint32_t ULONG
Definition: typedefs.h:59
int ret

◆ ldap_add_ext_sW()

ULONG CDECL ldap_add_ext_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
LDAPModW attrs[],
PLDAPControlW serverctrls,
PLDAPControlW clientctrls 
)

Definition at line 329 of file add.c.

331{
333#ifdef HAVE_LDAP
334 char *dnU = NULL;
335 LDAPMod **attrsU = NULL;
336 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
337
339
340 TRACE( "(%p, %s, %p, %p, %p)\n", ld, debugstr_w(dn), attrs,
341 serverctrls, clientctrls );
342
343 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
344
345 if (dn) {
346 dnU = strWtoU( dn );
347 if (!dnU) goto exit;
348 }
349 if (attrs) {
350 attrsU = modarrayWtoU( attrs );
351 if (!attrsU) goto exit;
352 }
353 if (serverctrls) {
354 serverctrlsU = controlarrayWtoU( serverctrls );
355 if (!serverctrlsU) goto exit;
356 }
357 if (clientctrls) {
358 clientctrlsU = controlarrayWtoU( clientctrls );
359 if (!clientctrlsU) goto exit;
360 }
361
362 ret = map_error( ldap_add_ext_s( ld, dn ? dnU : "", attrs ? attrsU : nullattrs,
363 serverctrlsU, clientctrlsU ));
364
365exit:
366 strfreeU( dnU );
367 modarrayfreeU( attrsU );
368 controlarrayfreeU( serverctrlsU );
369 controlarrayfreeU( clientctrlsU );
370
371#endif
372 return ret;
373}
static UINT map_error(DWORD error)
Definition: service.c:35
#define LDAPControl
Definition: winldap.h:620
#define LDAPMod
Definition: winldap.h:622
#define ldap_add_ext_s
Definition: winldap.h:646

◆ ldap_add_extA()

ULONG CDECL ldap_add_extA ( WLDAP32_LDAP ld,
PCHAR  dn,
LDAPModA attrs[],
PLDAPControlA serverctrls,
PLDAPControlA clientctrls,
ULONG message 
)

Definition at line 143 of file add.c.

145{
147#ifdef HAVE_LDAP
148 WCHAR *dnW = NULL;
149 LDAPModW **attrsW = NULL;
150 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
151
153
154 TRACE( "(%p, %s, %p, %p, %p, %p)\n", ld, debugstr_a(dn), attrs,
155 serverctrls, clientctrls, message );
156
157 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
158
159 if (dn) {
160 dnW = strAtoW( dn );
161 if (!dnW) goto exit;
162 }
163 if (attrs) {
164 attrsW = modarrayAtoW( attrs );
165 if (!attrsW) goto exit;
166 }
167 if (serverctrls) {
168 serverctrlsW = controlarrayAtoW( serverctrls );
169 if (!serverctrlsW) goto exit;
170 }
171 if (clientctrls) {
172 clientctrlsW = controlarrayAtoW( clientctrls );
173 if (!clientctrlsW) goto exit;
174 }
175
176 ret = ldap_add_extW( ld, dnW, attrsW, serverctrlsW, clientctrlsW, message );
177
178exit:
179 strfreeW( dnW );
180 modarrayfreeW( attrsW );
181 controlarrayfreeW( serverctrlsW );
182 controlarrayfreeW( clientctrlsW );
183
184#endif
185 return ret;
186}
ULONG CDECL ldap_add_extW(WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *attrs[], PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, ULONG *message)
Definition: add.c:211
Definition: tftpd.h:60

◆ ldap_add_extW()

ULONG CDECL ldap_add_extW ( WLDAP32_LDAP ld,
PWCHAR  dn,
LDAPModW attrs[],
PLDAPControlW serverctrls,
PLDAPControlW clientctrls,
ULONG message 
)

Definition at line 211 of file add.c.

213{
215#ifdef HAVE_LDAP
216 char *dnU = NULL;
217 LDAPMod **attrsU = NULL;
218 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
219 int dummy;
220
222
223 TRACE( "(%p, %s, %p, %p, %p, %p)\n", ld, debugstr_w(dn), attrs,
224 serverctrls, clientctrls, message );
225
226 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
227
228 if (dn) {
229 dnU = strWtoU( dn );
230 if (!dnU) goto exit;
231 }
232 if (attrs) {
233 attrsU = modarrayWtoU( attrs );
234 if (!attrsU) goto exit;
235 }
236 if (serverctrls) {
237 serverctrlsU = controlarrayWtoU( serverctrls );
238 if (!serverctrlsU) goto exit;
239 }
240 if (clientctrls) {
241 clientctrlsU = controlarrayWtoU( clientctrls );
242 if (!clientctrlsU) goto exit;
243 }
244
245 ret = map_error( ldap_add_ext( ld, dn ? dnU : "", attrs ? attrsU : nullattrs, serverctrlsU,
246 clientctrlsU, message ? (int *)message : &dummy ));
247
248exit:
249 strfreeU( dnU );
250 modarrayfreeU( attrsU );
251 controlarrayfreeU( serverctrlsU );
252 controlarrayfreeU( clientctrlsU );
253
254#endif
255 return ret;
256}
#define ldap_add_ext
Definition: winldap.h:644

◆ ldap_add_sA()

ULONG CDECL ldap_add_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
LDAPModA attrs[] 
)

Definition at line 380 of file add.c.

381{
383#ifdef HAVE_LDAP
384 WCHAR *dnW = NULL;
385 LDAPModW **attrsW = NULL;
386
388
389 TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), attrs );
390
391 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
392
393 if (dn) {
394 dnW = strAtoW( dn );
395 if (!dnW) goto exit;
396 }
397 if (attrs) {
398 attrsW = modarrayAtoW( attrs );
399 if (!attrsW) goto exit;
400 }
401
402 ret = ldap_add_sW( ld, dnW, attrsW );
403
404exit:
405 strfreeW( dnW );
406 modarrayfreeW( attrsW );
407
408#endif
409 return ret;
410}
ULONG CDECL ldap_add_sW(WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *attrs[])
Definition: add.c:427

◆ ldap_add_sW()

ULONG CDECL ldap_add_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
LDAPModW attrs[] 
)

Definition at line 427 of file add.c.

428{
430#ifdef HAVE_LDAP
431 char *dnU = NULL;
432 LDAPMod **attrsU = NULL;
433
435
436 TRACE( "(%p, %s, %p)\n", ld, debugstr_w(dn), attrs );
437
438 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
439
440 if (dn) {
441 dnU = strWtoU( dn );
442 if (!dnU) goto exit;
443 }
444 if (attrs) {
445 attrsU = modarrayWtoU( attrs );
446 if (!attrsU) goto exit;
447 }
448
449 ret = map_error( ldap_add_ext_s( ld, dn ? dnU : "", attrs ? attrsU : nullattrs, NULL, NULL ));
450
451exit:
452 strfreeU( dnU );
453 modarrayfreeU( attrsU );
454
455#endif
456 return ret;
457}

◆ ldap_addA()

ULONG CDECL ldap_addA ( WLDAP32_LDAP ld,
PCHAR  dn,
LDAPModA attrs[] 
)

Definition at line 48 of file add.c.

49{
51#ifdef HAVE_LDAP
52 WCHAR *dnW = NULL;
53 LDAPModW **attrsW = NULL;
54
56
57 TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), attrs );
58
59 if (!ld) return ~0u;
60
61 if (dn) {
62 dnW = strAtoW( dn );
63 if (!dnW) goto exit;
64 }
65 if (attrs) {
66 attrsW = modarrayAtoW( attrs );
67 if (!attrsW) goto exit;
68 }
69
70 ret = ldap_addW( ld, dnW, attrsW );
71
72exit:
73 strfreeW( dnW );
74 modarrayfreeW( attrsW );
75
76#endif
77 return ret;
78}
ULONG CDECL ldap_addW(WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *attrs[])
Definition: add.c:100
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240

◆ ldap_addW()

ULONG CDECL ldap_addW ( WLDAP32_LDAP ld,
PWCHAR  dn,
LDAPModW attrs[] 
)

Definition at line 100 of file add.c.

101{
103#ifdef HAVE_LDAP
104 char *dnU = NULL;
105 LDAPMod **attrsU = NULL;
106 int msg;
107
109
110 TRACE( "(%p, %s, %p)\n", ld, debugstr_w(dn), attrs );
111
112 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
113
114 if (dn) {
115 dnU = strWtoU( dn );
116 if (!dnU) goto exit;
117 }
118 if (attrs) {
119 attrsU = modarrayWtoU( attrs );
120 if (!attrsU) goto exit;
121 }
122
123 ret = ldap_add_ext( ld, dn ? dnU : "", attrs ? attrsU : nullattrs, NULL, NULL, &msg );
124
125 if (ret == LDAP_SUCCESS)
126 ret = msg;
127 else
128 ret = ~0u;
129
130exit:
131 strfreeU( dnU );
132 modarrayfreeU( attrsU );
133
134#endif
135 return ret;
136}
#define msg(x)
Definition: auth_time.c:54
#define LDAP_SUCCESS
Definition: winldap.h:59

◆ ldap_bind_sA()

ULONG CDECL ldap_bind_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  cred,
ULONG  method 
)

Definition at line 140 of file bind.c.

141{
143#ifdef HAVE_LDAP
144 WCHAR *dnW = NULL, *credW = NULL;
145
147
148 TRACE( "(%p, %s, %p, 0x%08x)\n", ld, debugstr_a(dn), cred, method );
149
150 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
151
152 if (dn) {
153 dnW = strAtoW( dn );
154 if (!dnW) goto exit;
155 }
156 if (cred) {
157 credW = strAtoW( cred );
158 if (!credW) goto exit;
159 }
160
161 ret = ldap_bind_sW( ld, dnW, credW, method );
162
163exit:
164 strfreeW( dnW );
165 strfreeW( credW );
166
167#endif
168 return ret;
169}
ULONG CDECL ldap_bind_sW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR cred, ULONG method)
Definition: bind.c:186
method
Definition: dragdrop.c:54

◆ ldap_bind_sW()

ULONG CDECL ldap_bind_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  cred,
ULONG  method 
)

Definition at line 186 of file bind.c.

187{
189#ifdef HAVE_LDAP
190 char *dnU = NULL, *credU = NULL;
191 struct berval pwd = { 0, NULL };
192
194
195 TRACE( "(%p, %s, %p, 0x%08x)\n", ld, debugstr_w(dn), cred, method );
196
197 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
199
200 if (dn) {
201 dnU = strWtoU( dn );
202 if (!dnU) goto exit;
203 }
204 if (cred) {
205 credU = strWtoU( cred );
206 if (!credU) goto exit;
207
208 pwd.bv_len = strlen( credU );
209 pwd.bv_val = credU;
210 }
211
212 ret = map_error( ldap_sasl_bind_s( ld, dnU, LDAP_SASL_SIMPLE, &pwd, NULL, NULL, NULL ));
213
214exit:
215 strfreeU( dnU );
216 strfreeU( credU );
217
218#endif
219 return ret;
220}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
void pwd(int argc, const char *argv[])
Definition: cmds.c:1401
Definition: winber.h:32
#define ldap_sasl_bind_s
Definition: winldap.h:637
#define LDAP_AUTH_SIMPLE
Definition: winldap.h:224

Referenced by ldap_bind_sA().

◆ ldap_bindA()

ULONG CDECL ldap_bindA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  cred,
ULONG  method 
)

Definition at line 44 of file bind.c.

45{
47#ifdef HAVE_LDAP
48 WCHAR *dnW = NULL, *credW = NULL;
49
51
52 TRACE( "(%p, %s, %p, 0x%08x)\n", ld, debugstr_a(dn), cred, method );
53
54 if (!ld) return ~0u;
55
56 if (dn) {
57 dnW = strAtoW( dn );
58 if (!dnW) goto exit;
59 }
60 if (cred) {
61 credW = strAtoW( cred );
62 if (!credW) goto exit;
63 }
64
65 ret = ldap_bindW( ld, dnW, credW, method );
66
67exit:
68 strfreeW( dnW );
69 strfreeW( credW );
70
71#endif
72 return ret;
73}
ULONG CDECL ldap_bindW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR cred, ULONG method)
Definition: bind.c:93

◆ ldap_bindW()

ULONG CDECL ldap_bindW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  cred,
ULONG  method 
)

Definition at line 93 of file bind.c.

94{
96#ifdef HAVE_LDAP
97 char *dnU = NULL, *credU = NULL;
98 struct berval pwd = { 0, NULL };
99 int msg;
100
102
103 TRACE( "(%p, %s, %p, 0x%08x)\n", ld, debugstr_w(dn), cred, method );
104
105 if (!ld) return ~0u;
107
108 if (dn) {
109 dnU = strWtoU( dn );
110 if (!dnU) goto exit;
111 }
112 if (cred) {
113 credU = strWtoU( cred );
114 if (!credU) goto exit;
115
116 pwd.bv_len = strlen( credU );
117 pwd.bv_val = credU;
118 }
119
120 ret = ldap_sasl_bind( ld, dnU, LDAP_SASL_SIMPLE, &pwd, NULL, NULL, &msg );
121
122 if (ret == LDAP_SUCCESS)
123 ret = msg;
124 else
125 ret = ~0u;
126
127exit:
128 strfreeU( dnU );
129 strfreeU( credU );
130
131#endif
132 return ret;
133}
#define ldap_sasl_bind
Definition: winldap.h:636

Referenced by ldap_bindA().

◆ ldap_check_filterA()

ULONG CDECL ldap_check_filterA ( WLDAP32_LDAP ld,
PCHAR  filter 
)

Definition at line 72 of file misc.c.

73{
74 ULONG ret;
75 WCHAR *filterW = NULL;
76
77 TRACE( "(%p, %s)\n", ld, debugstr_a(filter) );
78
79 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
80
81 if (filter) {
82 filterW = strAtoW( filter );
83 if (!filterW) return WLDAP32_LDAP_NO_MEMORY;
84 }
85
86 ret = ldap_check_filterW( ld, filterW );
87
88 strfreeW( filterW );
89 return ret;
90}
ULONG CDECL ldap_check_filterW(WLDAP32_LDAP *ld, PWCHAR filter)
Definition: misc.c:105
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005

◆ ldap_check_filterW()

ULONG CDECL ldap_check_filterW ( WLDAP32_LDAP ld,
PWCHAR  filter 
)

Definition at line 105 of file misc.c.

106{
107 TRACE( "(%p, %s)\n", ld, debugstr_w(filter) );
108
109 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
110 return WLDAP32_LDAP_SUCCESS; /* FIXME: do some checks */
111}

◆ ldap_cleanup()

ULONG CDECL ldap_cleanup ( HANDLE  instance)

Definition at line 116 of file misc.c.

117{
118 TRACE( "(%p)\n", instance );
120}
static HINSTANCE instance
Definition: main.c:40

◆ ldap_close_extended_op()

ULONG CDECL ldap_close_extended_op ( WLDAP32_LDAP ld,
ULONG  msgid 
)

Definition at line 56 of file extended.c.

57{
58 TRACE( "(%p, 0x%08x)\n", ld, msgid );
59
60 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
62}

◆ ldap_compare_ext_sA()

ULONG CDECL ldap_compare_ext_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  attr,
PCHAR  value,
struct WLDAP32_berval data,
PLDAPControlA serverctrls,
PLDAPControlA clientctrls 
)

Definition at line 288 of file compare.c.

290{
292#ifdef HAVE_LDAP
293 WCHAR *dnW = NULL, *attrW = NULL, *valueW = NULL;
294 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
295
297
298 TRACE( "(%p, %s, %s, %s, %p, %p, %p)\n", ld, debugstr_a(dn),
299 debugstr_a(attr), debugstr_a(value), data, serverctrls,
300 clientctrls );
301
302 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
303
304 if (dn) {
305 dnW = strAtoW( dn );
306 if (!dnW) goto exit;
307 }
308 if (attr) {
309 attrW = strAtoW( attr );
310 if (!attrW) goto exit;
311 }
312 if (value) {
313 valueW = strAtoW( value );
314 if (!valueW) goto exit;
315 }
316 if (serverctrls) {
317 serverctrlsW = controlarrayAtoW( serverctrls );
318 if (!serverctrlsW) goto exit;
319 }
320 if (clientctrls) {
321 clientctrlsW = controlarrayAtoW( clientctrls );
322 if (!clientctrlsW) goto exit;
323 }
324
325 ret = ldap_compare_ext_sW( ld, dnW, attrW, valueW, data, serverctrlsW,
326 clientctrlsW );
327
328exit:
329 strfreeW( dnW );
330 strfreeW( attrW );
331 strfreeW( valueW );
332 controlarrayfreeW( serverctrlsW );
333 controlarrayfreeW( clientctrlsW );
334
335#endif
336 return ret;
337}
ULONG CDECL ldap_compare_ext_sW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR attr, PWCHAR value, struct WLDAP32_berval *data, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls)
Definition: compare.c:362
static const WCHAR valueW[]
Definition: object.c:48
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
Definition: cookie.c:202
Definition: pdh_main.c:94

◆ ldap_compare_ext_sW()

ULONG CDECL ldap_compare_ext_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  attr,
PWCHAR  value,
struct WLDAP32_berval data,
PLDAPControlW serverctrls,
PLDAPControlW clientctrls 
)

Definition at line 362 of file compare.c.

364{
366#ifdef HAVE_LDAP
367 char *dnU = NULL, *attrU = NULL, *valueU = NULL;
368 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
369 struct berval val = { 0, NULL };
370
372
373 TRACE( "(%p, %s, %s, %s, %p, %p, %p)\n", ld, debugstr_w(dn),
374 debugstr_w(attr), debugstr_w(value), data, serverctrls,
375 clientctrls );
376
377 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
378
379 if (dn) {
380 dnU = strWtoU( dn );
381 if (!dnU) goto exit;
382 }
383 if (attr) {
384 attrU = strWtoU( attr );
385 if (!attrU) goto exit;
386 }
387 if (!data) {
388 if (value) {
389 valueU = strWtoU( value );
390 if (!valueU) goto exit;
391
392 val.bv_len = strlen( valueU );
393 val.bv_val = valueU;
394 }
395 }
396 if (serverctrls) {
397 serverctrlsU = controlarrayWtoU( serverctrls );
398 if (!serverctrlsU) goto exit;
399 }
400 if (clientctrls) {
401 clientctrlsU = controlarrayWtoU( clientctrls );
402 if (!clientctrlsU) goto exit;
403 }
404
405 ret = map_error( ldap_compare_ext_s( ld, dn ? dnU : "", attr ? attrU : "",
406 data ? (struct berval *)data : &val,
407 serverctrlsU, clientctrlsU ));
408
409exit:
410 strfreeU( dnU );
411 strfreeU( attrU );
412 strfreeU( valueU );
413 controlarrayfreeU( serverctrlsU );
414 controlarrayfreeU( clientctrlsU );
415
416#endif
417 return ret;
418}
GLuint GLfloat * val
Definition: glext.h:7180
#define ldap_compare_ext_s
Definition: winldap.h:650

Referenced by ldap_compare_ext_sA().

◆ ldap_compare_extA()

ULONG CDECL ldap_compare_extA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  attr,
PCHAR  value,
struct WLDAP32_berval data,
PLDAPControlA serverctrls,
PLDAPControlA clientctrls,
ULONG message 
)

Definition at line 148 of file compare.c.

151{
153#ifdef HAVE_LDAP
154 WCHAR *dnW = NULL, *attrW = NULL, *valueW = NULL;
155 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
156
158
159 TRACE( "(%p, %s, %s, %s, %p, %p, %p, %p)\n", ld, debugstr_a(dn),
160 debugstr_a(attr), debugstr_a(value), data, serverctrls,
161 clientctrls, message );
162
163 if (!ld || !message) return WLDAP32_LDAP_PARAM_ERROR;
164
165 if (dn) {
166 dnW = strAtoW( dn );
167 if (!dnW) goto exit;
168 }
169 if (attr) {
170 attrW = strAtoW( attr );
171 if (!attrW) goto exit;
172 }
173 if (value) {
174 valueW = strAtoW( value );
175 if (!valueW) goto exit;
176 }
177 if (serverctrls) {
178 serverctrlsW = controlarrayAtoW( serverctrls );
179 if (!serverctrlsW) goto exit;
180 }
181 if (clientctrls) {
182 clientctrlsW = controlarrayAtoW( clientctrls );
183 if (!clientctrlsW) goto exit;
184 }
185
186 ret = ldap_compare_extW( ld, dnW, attrW, valueW, data,
187 serverctrlsW, clientctrlsW, message );
188
189exit:
190 strfreeW( dnW );
191 strfreeW( attrW );
192 strfreeW( valueW );
193 controlarrayfreeW( serverctrlsW );
194 controlarrayfreeW( clientctrlsW );
195
196#endif
197 return ret;
198}
ULONG CDECL ldap_compare_extW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR attr, PWCHAR value, struct WLDAP32_berval *data, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, ULONG *message)
Definition: compare.c:224

◆ ldap_compare_extW()

ULONG CDECL ldap_compare_extW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  attr,
PWCHAR  value,
struct WLDAP32_berval data,
PLDAPControlW serverctrls,
PLDAPControlW clientctrls,
ULONG message 
)

Definition at line 224 of file compare.c.

227{
229#ifdef HAVE_LDAP
230 char *dnU = NULL, *attrU = NULL, *valueU = NULL;
231 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
232 struct berval val = { 0, NULL };
233
235
236 TRACE( "(%p, %s, %s, %s, %p, %p, %p, %p)\n", ld, debugstr_w(dn),
237 debugstr_w(attr), debugstr_w(value), data, serverctrls,
238 clientctrls, message );
239
240 if (!ld || !message) return WLDAP32_LDAP_PARAM_ERROR;
241 if (!attr) return WLDAP32_LDAP_NO_MEMORY;
242
243 if (dn) {
244 dnU = strWtoU( dn );
245 if (!dnU) goto exit;
246 }
247
248 attrU = strWtoU( attr );
249 if (!attrU) goto exit;
250
251 if (!data) {
252 if (value) {
253 valueU = strWtoU( value );
254 if (!valueU) goto exit;
255
256 val.bv_len = strlen( valueU );
257 val.bv_val = valueU;
258 }
259 }
260 if (serverctrls) {
261 serverctrlsU = controlarrayWtoU( serverctrls );
262 if (!serverctrlsU) goto exit;
263 }
264 if (clientctrls) {
265 clientctrlsU = controlarrayWtoU( clientctrls );
266 if (!clientctrlsU) goto exit;
267 }
268
269 ret = map_error( ldap_compare_ext( ld, dn ? dnU : "", attrU, data ? (struct berval *)data : &val,
270 serverctrlsU, clientctrlsU, (int *)message ));
271
272exit:
273 strfreeU( dnU );
274 strfreeU( attrU );
275 strfreeU( valueU );
276 controlarrayfreeU( serverctrlsU );
277 controlarrayfreeU( clientctrlsU );
278
279#endif
280 return ret;
281}
#define ldap_compare_ext
Definition: winldap.h:648

Referenced by ldap_compare_extA().

◆ ldap_compare_sA()

ULONG CDECL ldap_compare_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  attr,
PCHAR  value 
)

Definition at line 425 of file compare.c.

426{
428#ifdef HAVE_LDAP
429 WCHAR *dnW = NULL, *attrW = NULL, *valueW = NULL;
430
432
433 TRACE( "(%p, %s, %s, %s)\n", ld, debugstr_a(dn), debugstr_a(attr),
434 debugstr_a(value) );
435
436 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
437
438 if (dn) {
439 dnW = strAtoW( dn );
440 if (!dnW) goto exit;
441 }
442 if (attr) {
443 attrW = strAtoW( attr );
444 if (!attrW) goto exit;
445 }
446 if (value) {
447 valueW = strAtoW( value );
448 if (!valueW) goto exit;
449 }
450
451 ret = ldap_compare_sW( ld, dnW, attrW, valueW );
452
453exit:
454 strfreeW( dnW );
455 strfreeW( attrW );
456 strfreeW( valueW );
457
458#endif
459 return ret;
460}
ULONG CDECL ldap_compare_sW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR attr, PWCHAR value)
Definition: compare.c:477

◆ ldap_compare_sW()

ULONG CDECL ldap_compare_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  attr,
PWCHAR  value 
)

Definition at line 477 of file compare.c.

478{
480#ifdef HAVE_LDAP
481 char *dnU = NULL, *attrU = NULL, *valueU = NULL;
482 struct berval val = { 0, NULL };
483
485
486 TRACE( "(%p, %s, %s, %s)\n", ld, debugstr_w(dn), debugstr_w(attr),
487 debugstr_w(value) );
488
489 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
490
491 if (dn) {
492 dnU = strWtoU( dn );
493 if (!dnU) goto exit;
494 }
495 if (attr) {
496 attrU = strWtoU( attr );
497 if (!attrU) goto exit;
498 }
499 if (value) {
500 valueU = strWtoU( value );
501 if (!valueU) goto exit;
502
503 val.bv_len = strlen( valueU );
504 val.bv_val = valueU;
505 }
506
507 ret = map_error( ldap_compare_ext_s( ld, dn ? dnU : "", attr ? attrU : "", &val, NULL, NULL ));
508
509exit:
510 strfreeU( dnU );
511 strfreeU( attrU );
512 strfreeU( valueU );
513
514#endif
515 return ret;
516}

◆ ldap_compareA()

ULONG CDECL ldap_compareA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  attr,
PCHAR  value 
)

Definition at line 44 of file compare.c.

45{
47#ifdef HAVE_LDAP
48 WCHAR *dnW = NULL, *attrW = NULL, *valueW = NULL;
49
50 ret = ~0u;
51
52 TRACE( "(%p, %s, %s, %s)\n", ld, debugstr_a(dn), debugstr_a(attr),
54
55 if (!ld || !attr) return ~0u;
56
57 if (dn) {
58 dnW = strAtoW( dn );
59 if (!dnW) goto exit;
60 }
61
62 attrW = strAtoW( attr );
63 if (!attrW) goto exit;
64
65 if (value) {
66 valueW = strAtoW( value );
67 if (!valueW) goto exit;
68 }
69
70 ret = ldap_compareW( ld, dnW, attrW, valueW );
71
72exit:
73 strfreeW( dnW );
74 strfreeW( attrW );
76
77#endif
78 return ret;
79}
ULONG CDECL ldap_compareW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR attr, PWCHAR value)
Definition: compare.c:96

◆ ldap_compareW()

ULONG CDECL ldap_compareW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  attr,
PWCHAR  value 
)

Definition at line 96 of file compare.c.

97{
99#ifdef HAVE_LDAP
100 char *dnU = NULL, *attrU = NULL, *valueU = NULL;
101 struct berval val = { 0, NULL };
102 int msg;
103
104 ret = ~0u;
105
106 TRACE( "(%p, %s, %s, %s)\n", ld, debugstr_w(dn), debugstr_w(attr),
107 debugstr_w(value) );
108
109 if (!ld || !attr) return ~0u;
110
111 if (dn) {
112 dnU = strWtoU( dn );
113 if (!dnU) goto exit;
114 }
115
116 attrU = strWtoU( attr );
117 if (!attrU) goto exit;
118
119 if (value) {
120 valueU = strWtoU( value );
121 if (!valueU) goto exit;
122
123 val.bv_len = strlen( valueU );
124 val.bv_val = valueU;
125 }
126
127 ret = ldap_compare_ext( ld, dn ? dnU : "", attrU, &val, NULL, NULL, &msg );
128
129 if (ret == LDAP_SUCCESS)
130 ret = msg;
131 else
132 ret = ~0u;
133
134exit:
135 strfreeU( dnU );
136 strfreeU( attrU );
137 strfreeU( valueU );
138
139#endif
140 return ret;
141}

◆ ldap_conn_from_msg()

WLDAP32_LDAP *CDECL ldap_conn_from_msg ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage res 
)

Definition at line 135 of file misc.c.

136{
137 TRACE( "(%p, %p)\n", ld, res );
138
139 if (!ld || !res) return NULL;
140 return ld; /* FIXME: not always correct */
141}
GLuint res
Definition: glext.h:9613

◆ ldap_connect()

ULONG CDECL ldap_connect ( WLDAP32_LDAP ld,
LDAP_TIMEVAL timeout 
)

Definition at line 318 of file init.c.

319{
320 TRACE( "(%p, %p)\n", ld, timeout );
321
322 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
323 return WLDAP32_LDAP_SUCCESS; /* FIXME: do something, e.g. ping the host */
324}
Definition: dhcpd.h:245

◆ ldap_control_freeA()

ULONG CDECL ldap_control_freeA ( LDAPControlA control)

Definition at line 44 of file control.c.

45{
47#ifdef HAVE_LDAP
48
49 TRACE( "(%p)\n", control );
50 controlfreeA( control );
51
52#endif
53 return ret;
54}
Definition: dialog.c:52

◆ ldap_control_freeW()

ULONG CDECL ldap_control_freeW ( LDAPControlW control)

Definition at line 67 of file control.c.

68{
70#ifdef HAVE_LDAP
71
72 TRACE( "(%p)\n", control );
73 controlfreeW( control );
74
75#endif
76 return ret;
77}

◆ ldap_controls_freeA()

ULONG CDECL ldap_controls_freeA ( LDAPControlA **  controls)

Definition at line 84 of file control.c.

85{
87#ifdef HAVE_LDAP
88
89 TRACE( "(%p)\n", controls );
90 controlarrayfreeA( controls );
91
92#endif
93 return ret;
94}

◆ ldap_controls_freeW()

ULONG CDECL ldap_controls_freeW ( LDAPControlW **  controls)

Definition at line 107 of file control.c.

108{
110#ifdef HAVE_LDAP
111
112 TRACE( "(%p)\n", controls );
113 controlarrayfreeW( controls );
114
115#endif
116 return ret;
117}

◆ ldap_count_valuesA()

ULONG CDECL ldap_count_valuesA ( PCHAR vals)

Definition at line 72 of file value.c.

73{
75#ifdef HAVE_LDAP
76 WCHAR **valsW = NULL;
77
78 TRACE( "(%p)\n", vals );
79
80 if (!vals) return 0;
81
82 valsW = strarrayAtoW( vals );
83 if (!valsW) return WLDAP32_LDAP_NO_MEMORY;
84
85 ret = ldap_count_valuesW( valsW );
86 strarrayfreeW( valsW );
87
88#endif
89 return ret;
90}
ULONG CDECL ldap_count_valuesW(PWCHAR *vals)
Definition: value.c:108
static void strarrayfreeW(LPWSTR *strarray)
Definition: wldap32.h:224
static LPWSTR * strarrayAtoW(LPSTR *strarray)
Definition: wldap32.h:134

◆ ldap_count_valuesW()

ULONG CDECL ldap_count_valuesW ( PWCHAR vals)

Definition at line 108 of file value.c.

109{
111#ifdef HAVE_LDAP
112 WCHAR **p = vals;
113
114 TRACE( "(%p)\n", vals );
115
116 if (!vals) return 0;
117
118 ret = 0;
119 while (*p++) ret++;
120
121#endif
122 return ret;
123}
GLfloat GLfloat p
Definition: glext.h:8902

◆ ldap_create_page_controlA()

ULONG CDECL ldap_create_page_controlA ( WLDAP32_PLDAP  ,
ULONG  ,
struct WLDAP32_berval ,
UCHAR  ,
PLDAPControlA  
)

◆ ldap_create_page_controlW()

ULONG CDECL ldap_create_page_controlW ( WLDAP32_PLDAP  ,
ULONG  ,
struct WLDAP32_berval ,
UCHAR  ,
PLDAPControlW  
)

◆ ldap_create_sort_controlA()

ULONG CDECL ldap_create_sort_controlA ( WLDAP32_PLDAP  ,
PLDAPSortKeyA ,
UCHAR  ,
PLDAPControlA  
)

◆ ldap_create_sort_controlW()

ULONG CDECL ldap_create_sort_controlW ( WLDAP32_PLDAP  ,
PLDAPSortKeyW ,
UCHAR  ,
PLDAPControlW  
)

◆ ldap_create_vlv_controlA()

INT CDECL ldap_create_vlv_controlA ( WLDAP32_LDAP ld,
WLDAP32_LDAPVLVInfo info,
UCHAR  critical,
LDAPControlA **  control 
)

Definition at line 207 of file control.c.

209{
211#ifdef HAVE_LDAP
213
214 TRACE( "(%p, %p, 0x%02x, %p)\n", ld, info, critical, control );
215
216 if (!ld || !control) return ~0u;
217
218 ret = ldap_create_vlv_controlW( ld, info, critical, &controlW );
219
221 {
222 *control = controlWtoA( controlW );
225 }
226
227#endif
228 return ret;
229}
INT CDECL ldap_create_vlv_controlW(WLDAP32_LDAP *ld, WLDAP32_LDAPVLVInfo *info, UCHAR critical, LDAPControlW **control)
Definition: control.c:253
ULONG CDECL ldap_control_freeW(LDAPControlW *control)
Definition: control.c:67
static const WCHAR controlW[]
Definition: actctx.c:666
int32_t INT
Definition: typedefs.h:58

◆ ldap_create_vlv_controlW()

INT CDECL ldap_create_vlv_controlW ( WLDAP32_LDAP ld,
WLDAP32_LDAPVLVInfo info,
UCHAR  critical,
LDAPControlW **  control 
)

Definition at line 253 of file control.c.

255{
257#ifdef HAVE_LDAP
258 LDAPControl *controlU = NULL;
259
260 TRACE( "(%p, %p, 0x%02x, %p)\n", ld, info, critical, control );
261
262 if (!ld || !control) return ~0u;
263
264 ret = map_error( ldap_create_vlv_control( ld, (LDAPVLVInfo *)info, &controlU ));
265
267 {
268 *control = controlUtoW( controlU );
270 ldap_control_free( controlU );
271 }
272
273#endif
274 return ret;
275}
#define ldap_control_free
Definition: winldap.h:685
#define ldap_create_vlv_control
Definition: winldap.h:665

Referenced by ldap_create_vlv_controlA().

◆ ldap_delete_ext_sA()

ULONG CDECL ldap_delete_ext_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
PLDAPControlA serverctrls,
PLDAPControlA clientctrls 
)

Definition at line 224 of file delete.c.

226{
228#ifdef HAVE_LDAP
229 WCHAR *dnW = NULL;
230 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
231
232 TRACE( "(%p, %s, %p, %p)\n", ld, debugstr_a(dn), serverctrls,
233 clientctrls );
234
235 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
236
237 if (dn) {
238 dnW = strAtoW( dn );
239 if (!dnW) goto exit;
240 }
241 if (serverctrls) {
242 serverctrlsW = controlarrayAtoW( serverctrls );
243 if (!serverctrlsW) goto exit;
244 }
245 if (clientctrls) {
246 clientctrlsW = controlarrayAtoW( clientctrls );
247 if (!clientctrlsW) goto exit;
248 }
249
250 ret = ldap_delete_ext_sW( ld, dnW, serverctrlsW, clientctrlsW );
251
252exit:
253 strfreeW( dnW );
254 controlarrayfreeW( serverctrlsW );
255 controlarrayfreeW( clientctrlsW );
256
257#endif
258 return ret;
259}
ULONG CDECL ldap_delete_ext_sW(WLDAP32_LDAP *ld, PWCHAR dn, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls)
Definition: delete.c:280

◆ ldap_delete_ext_sW()

ULONG CDECL ldap_delete_ext_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PLDAPControlW serverctrls,
PLDAPControlW clientctrls 
)

Definition at line 280 of file delete.c.

282{
284#ifdef HAVE_LDAP
285 char *dnU = NULL;
286 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
287
288 TRACE( "(%p, %s, %p, %p)\n", ld, debugstr_w(dn), serverctrls,
289 clientctrls );
290
291 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
292
293 if (dn) {
294 dnU = strWtoU( dn );
295 if (!dnU) goto exit;
296 }
297 if (serverctrls) {
298 serverctrlsU = controlarrayWtoU( serverctrls );
299 if (!serverctrlsU) goto exit;
300 }
301 if (clientctrls) {
302 clientctrlsU = controlarrayWtoU( clientctrls );
303 if (!clientctrlsU) goto exit;
304 }
305
306 ret = map_error( ldap_delete_ext_s( ld, dn ? dnU : "", serverctrlsU, clientctrlsU ));
307
308exit:
309 strfreeU( dnU );
310 controlarrayfreeU( serverctrlsU );
311 controlarrayfreeU( clientctrlsU );
312
313#endif
314 return ret;
315}
#define ldap_delete_ext_s
Definition: winldap.h:654

◆ ldap_delete_extA()

ULONG CDECL ldap_delete_extA ( WLDAP32_LDAP ld,
PCHAR  dn,
PLDAPControlA serverctrls,
PLDAPControlA clientctrls,
ULONG message 
)

Definition at line 118 of file delete.c.

120{
122#ifdef HAVE_LDAP
123 WCHAR *dnW = NULL;
124 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
125
126 TRACE( "(%p, %s, %p, %p, %p)\n", ld, debugstr_a(dn), serverctrls,
127 clientctrls, message );
128
130
131 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
132
133 if (dn) {
134 dnW = strAtoW( dn );
135 if (!dnW) goto exit;
136 }
137 if (serverctrls) {
138 serverctrlsW = controlarrayAtoW( serverctrls );
139 if (!serverctrlsW) goto exit;
140 }
141 if (clientctrls) {
142 clientctrlsW = controlarrayAtoW( clientctrls );
143 if (!clientctrlsW) goto exit;
144 }
145
146 ret = ldap_delete_extW( ld, dnW, serverctrlsW, clientctrlsW, message );
147
148exit:
149 strfreeW( dnW );
150 controlarrayfreeW( serverctrlsW );
151 controlarrayfreeW( clientctrlsW );
152
153#endif
154 return ret;
155}
ULONG CDECL ldap_delete_extW(WLDAP32_LDAP *ld, PWCHAR dn, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, ULONG *message)
Definition: delete.c:178

◆ ldap_delete_extW()

ULONG CDECL ldap_delete_extW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PLDAPControlW serverctrls,
PLDAPControlW clientctrls,
ULONG message 
)

Definition at line 178 of file delete.c.

180{
182#ifdef HAVE_LDAP
183 char *dnU = NULL;
184 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
185 int dummy;
186
187 TRACE( "(%p, %s, %p, %p, %p)\n", ld, debugstr_w(dn), serverctrls,
188 clientctrls, message );
189
191
192 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
193
194 if (dn) {
195 dnU = strWtoU( dn );
196 if (!dnU) goto exit;
197 }
198 if (serverctrls) {
199 serverctrlsU = controlarrayWtoU( serverctrls );
200 if (!serverctrlsU) goto exit;
201 }
202 if (clientctrls) {
203 clientctrlsU = controlarrayWtoU( clientctrls );
204 if (!clientctrlsU) goto exit;
205 }
206
207 ret = map_error( ldap_delete_ext( ld, dn ? dnU : "", serverctrlsU, clientctrlsU,
208 message ? (int *)message : &dummy ));
209
210exit:
211 strfreeU( dnU );
212 controlarrayfreeU( serverctrlsU );
213 controlarrayfreeU( clientctrlsU );
214
215#endif
216 return ret;
217}
#define ldap_delete_ext
Definition: winldap.h:652

◆ ldap_delete_sA()

ULONG CDECL ldap_delete_sA ( WLDAP32_LDAP ld,
PCHAR  dn 
)

Definition at line 322 of file delete.c.

323{
325#ifdef HAVE_LDAP
326 WCHAR *dnW = NULL;
327
328 TRACE( "(%p, %s)\n", ld, debugstr_a(dn) );
329
330 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
331
332 if (dn) {
333 dnW = strAtoW( dn );
334 if (!dnW) return WLDAP32_LDAP_NO_MEMORY;
335 }
336
337 ret = ldap_delete_sW( ld, dnW );
338 strfreeW( dnW );
339
340#endif
341 return ret;
342}
ULONG CDECL ldap_delete_sW(WLDAP32_LDAP *ld, PWCHAR dn)
Definition: delete.c:357

◆ ldap_delete_sW()

ULONG CDECL ldap_delete_sW ( WLDAP32_LDAP ld,
PWCHAR  dn 
)

Definition at line 357 of file delete.c.

358{
360#ifdef HAVE_LDAP
361 char *dnU = NULL;
362
363 TRACE( "(%p, %s)\n", ld, debugstr_w(dn) );
364
365 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
366
367 if (dn) {
368 dnU = strWtoU( dn );
369 if (!dnU) return WLDAP32_LDAP_NO_MEMORY;
370 }
371
372 ret = map_error( ldap_delete_ext_s( ld, dn ? dnU : "", NULL, NULL ));
373 strfreeU( dnU );
374
375#endif
376 return ret;
377}

◆ ldap_deleteA()

ULONG CDECL ldap_deleteA ( WLDAP32_LDAP ld,
PCHAR  dn 
)

Definition at line 44 of file delete.c.

45{
47#ifdef HAVE_LDAP
48 WCHAR *dnW = NULL;
49
50 TRACE( "(%p, %s)\n", ld, debugstr_a(dn) );
51
52 if (!ld) return ~0u;
53
54 if (dn) {
55 dnW = strAtoW( dn );
56 if (!dnW) return WLDAP32_LDAP_NO_MEMORY;
57 }
58
59 ret = ldap_deleteW( ld, dnW );
60 strfreeW( dnW );
61
62#endif
63 return ret;
64}
ULONG CDECL ldap_deleteW(WLDAP32_LDAP *ld, PWCHAR dn)
Definition: delete.c:84

◆ ldap_deleteW()

ULONG CDECL ldap_deleteW ( WLDAP32_LDAP ld,
PWCHAR  dn 
)

Definition at line 84 of file delete.c.

85{
87#ifdef HAVE_LDAP
88 char *dnU = NULL;
89 int msg;
90
91 TRACE( "(%p, %s)\n", ld, debugstr_w(dn) );
92
93 if (!ld) return ~0u;
94
95 if (dn) {
96 dnU = strWtoU( dn );
97 if (!dnU) return WLDAP32_LDAP_NO_MEMORY;
98 }
99
100 ret = ldap_delete_ext( ld, dn ? dnU : "", NULL, NULL, &msg );
101
102 if (ret == LDAP_SUCCESS)
103 ret = msg;
104 else
105 ret = ~0u;
106
107 strfreeU( dnU );
108
109#endif
110 return ret;
111}

◆ ldap_dn2ufnA()

PCHAR CDECL ldap_dn2ufnA ( PCHAR  dn)

Definition at line 44 of file dn.c.

45{
46 PCHAR ret = NULL;
47#ifdef HAVE_LDAP
48 WCHAR *dnW, *retW;
49
50 TRACE( "(%s)\n", debugstr_a(dn) );
51
52 dnW = strAtoW( dn );
53 if (!dnW) return NULL;
54
55 retW = ldap_dn2ufnW( dnW );
56 ret = strWtoA( retW );
57
58 strfreeW( dnW );
59 ldap_memfreeW( retW );
60
61#endif
62 return ret;
63}
void CDECL ldap_memfreeW(PWCHAR block)
Definition: misc.c:421
PWCHAR CDECL ldap_dn2ufnW(PWCHAR dn)
Definition: dn.c:80
char * PCHAR
Definition: typedefs.h:51
static LPSTR strWtoA(LPCWSTR str)
Definition: wldap32.h:62

◆ ldap_dn2ufnW()

PWCHAR CDECL ldap_dn2ufnW ( PWCHAR  dn)

Definition at line 80 of file dn.c.

81{
82 PWCHAR ret = NULL;
83#ifdef HAVE_LDAP
84 char *dnU, *retU;
85
86 TRACE( "(%s)\n", debugstr_w(dn) );
87
88 dnU = strWtoU( dn );
89 if (!dnU) return NULL;
90
91 retU = ldap_dn2ufn( dnU );
92 ret = strUtoW( retU );
93
94 strfreeU( dnU );
95 ldap_memfree( retU );
96
97#endif
98 return ret;
99}
uint16_t * PWCHAR
Definition: typedefs.h:56
#define ldap_memfree
Definition: winldap.h:688
#define ldap_dn2ufn
Definition: winldap.h:690
static LPWSTR strUtoW(char *str)
Definition: wldap32.h:86

◆ ldap_encode_sort_controlA()

ULONG CDECL ldap_encode_sort_controlA ( WLDAP32_PLDAP  ,
PLDAPSortKeyA ,
PLDAPControlA  ,
BOOLEAN   
)

◆ ldap_encode_sort_controlW()

ULONG CDECL ldap_encode_sort_controlW ( WLDAP32_PLDAP  ,
PLDAPSortKeyW ,
PLDAPControlW  ,
BOOLEAN   
)

◆ ldap_err2stringA()

PCHAR CDECL ldap_err2stringA ( ULONG  err)

Definition at line 71 of file error.c.

72{
73 static char buf[256] = "";
74
75 TRACE( "(0x%08x)\n", err );
76
78 LoadStringA( hwldap32, err, buf, 256 );
79 else
81
82 return buf;
83}
HINSTANCE hwldap32
Definition: main.c:29
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define err(...)
int WINAPI LoadStringA(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPSTR lpBuffer, _In_ int cchBufferMax)

◆ ldap_err2stringW()

PWCHAR CDECL ldap_err2stringW ( ULONG  err)

Definition at line 101 of file error.c.

102{
103 static WCHAR buf[256] = { 0 };
104
105 TRACE( "(0x%08x)\n", err );
106
108 LoadStringW( hwldap32, err, buf, 256 );
109 else
111
112 return buf;
113}
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)

◆ ldap_escape_filter_elementA()

ULONG CDECL ldap_escape_filter_elementA ( PCHAR  src,
ULONG  srclen,
PCHAR  dst,
ULONG  dstlen 
)

Definition at line 239 of file misc.c.

240{
241 ULONG len;
242
243 TRACE( "(%p, 0x%08x, %p, 0x%08x)\n", src, srclen, dst, dstlen );
244
246 if (!dst) return len;
247
248 if (!src || dstlen < len)
250 else
251 {
254 }
255}
static ULONG get_escape_size(PCHAR src, ULONG srclen)
Definition: misc.c:197
static void escape_filter_element(PCHAR src, ULONG srclen, PCHAR dst)
Definition: misc.c:216
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340
GLenum GLsizei len
Definition: glext.h:6722
static DWORD LPDWORD LPCSTR DWORD srclen
Definition: directory.c:52
static DWORD dstlen
Definition: directory.c:51

◆ ldap_escape_filter_elementW()

ULONG CDECL ldap_escape_filter_elementW ( PCHAR  src,
ULONG  srclen,
PWCHAR  dst,
ULONG  dstlen 
)

Definition at line 272 of file misc.c.

273{
274 ULONG len;
275
276 TRACE( "(%p, 0x%08x, %p, 0x%08x)\n", src, srclen, dst, dstlen );
277
279 if (!dst) return len;
280
281 /* no matter what you throw at it, this is what native returns */
283}

◆ ldap_explode_dnA()

PCHAR *CDECL ldap_explode_dnA ( PCHAR  dn,
ULONG  notypes 
)

Definition at line 106 of file dn.c.

107{
108 PCHAR *ret = NULL;
109#ifdef HAVE_LDAP
110 WCHAR *dnW, **retW;
111
112 TRACE( "(%s, 0x%08x)\n", debugstr_a(dn), notypes );
113
114 dnW = strAtoW( dn );
115 if (!dnW) return NULL;
116
117 retW = ldap_explode_dnW( dnW, notypes );
118 ret = strarrayWtoA( retW );
119
120 strfreeW( dnW );
121 ldap_value_freeW( retW );
122
123#endif
124 return ret;
125}
PWCHAR *CDECL ldap_explode_dnW(PWCHAR dn, ULONG notypes)
Definition: dn.c:144
ULONG CDECL ldap_value_freeW(PWCHAR *vals)
Definition: value.c:364
static LPSTR * strarrayWtoA(LPWSTR *strarray)
Definition: wldap32.h:154

◆ ldap_explode_dnW()

PWCHAR *CDECL ldap_explode_dnW ( PWCHAR  dn,
ULONG  notypes 
)

Definition at line 144 of file dn.c.

145{
146 PWCHAR *ret = NULL;
147#ifdef HAVE_LDAP
148 char *dnU, **retU;
149
150 TRACE( "(%s, 0x%08x)\n", debugstr_w(dn), notypes );
151
152 dnU = strWtoU( dn );
153 if (!dnU) return NULL;
154
155 retU = ldap_explode_dn( dnU, notypes );
156 ret = strarrayUtoW( retU );
157
158 strfreeU( dnU );
159 ldap_memvfree( (void **)retU );
160
161#endif
162 return ret;
163}
#define ldap_explode_dn
Definition: winldap.h:692
static LPWSTR * strarrayUtoW(char **strarray)
Definition: wldap32.h:194

◆ ldap_extended_operation_sA()

ULONG CDECL ldap_extended_operation_sA ( WLDAP32_LDAP ld,
PCHAR  oid,
struct WLDAP32_berval data,
PLDAPControlA serverctrls,
PLDAPControlA clientctrls,
PCHAR retoid,
struct WLDAP32_berval **  retdata 
)

Definition at line 178 of file extended.c.

181{
183#ifdef HAVE_LDAP
184 WCHAR *oidW = NULL, *retoidW = NULL;
185 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
186
188
189 TRACE( "(%p, %s, %p, %p, %p, %p, %p)\n", ld, debugstr_a(oid), data, serverctrls,
190 clientctrls, retoid, retdata );
191
192 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
193
194 if (oid) {
195 oidW = strAtoW( oid );
196 if (!oidW) goto exit;
197 }
198 if (serverctrls) {
199 serverctrlsW = controlarrayAtoW( serverctrls );
200 if (!serverctrlsW) goto exit;
201 }
202 if (clientctrls) {
203 clientctrlsW = controlarrayAtoW( clientctrls );
204 if (!clientctrlsW) goto exit;
205 }
206
207 ret = ldap_extended_operation_sW( ld, oidW, data, serverctrlsW, clientctrlsW,
208 &retoidW, retdata );
209
210 if (retoid && retoidW) {
211 *retoid = strWtoA( retoidW );
212 if (!*retoid) ret = WLDAP32_LDAP_NO_MEMORY;
213 ldap_memfreeW( retoidW );
214 }
215
216exit:
217 strfreeW( oidW );
218 controlarrayfreeW( serverctrlsW );
219 controlarrayfreeW( clientctrlsW );
220
221#endif
222 return ret;
223}
ULONG CDECL ldap_extended_operation_sW(WLDAP32_LDAP *ld, PWCHAR oid, struct WLDAP32_berval *data, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, PWCHAR *retoid, struct WLDAP32_berval **retdata)
Definition: extended.c:249

◆ ldap_extended_operation_sW()

ULONG CDECL ldap_extended_operation_sW ( WLDAP32_LDAP ld,
PWCHAR  oid,
struct WLDAP32_berval data,
PLDAPControlW serverctrls,
PLDAPControlW clientctrls,
PWCHAR retoid,
struct WLDAP32_berval **  retdata 
)

Definition at line 249 of file extended.c.

252{
254#ifdef HAVE_LDAP
255 char *oidU = NULL, *retoidU = NULL;
256 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
257
259
260 TRACE( "(%p, %s, %p, %p, %p, %p, %p)\n", ld, debugstr_w(oid), data, serverctrls,
261 clientctrls, retoid, retdata );
262
263 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
264
265 if (oid) {
266 oidU = strWtoU( oid );
267 if (!oidU) goto exit;
268 }
269 if (serverctrls) {
270 serverctrlsU = controlarrayWtoU( serverctrls );
271 if (!serverctrlsU) goto exit;
272 }
273 if (clientctrls) {
274 clientctrlsU = controlarrayWtoU( clientctrls );
275 if (!clientctrlsU) goto exit;
276 }
277
278 ret = map_error( ldap_extended_operation_s( ld, oid ? oidU : "", (struct berval *)data, serverctrlsU,
279 clientctrlsU, &retoidU, (struct berval **)retdata ));
280
281 if (retoid && retoidU) {
282 *retoid = strUtoW( retoidU );
283 if (!*retoid) ret = WLDAP32_LDAP_NO_MEMORY;
284 ldap_memfree( retoidU );
285 }
286
287exit:
288 strfreeU( oidU );
289 controlarrayfreeU( serverctrlsU );
290 controlarrayfreeU( clientctrlsU );
291
292#endif
293 return ret;
294}
#define ldap_extended_operation_s
Definition: winldap.h:655

Referenced by ldap_extended_operation_sA().

◆ ldap_extended_operationA()

ULONG CDECL ldap_extended_operationA ( WLDAP32_LDAP ld,
PCHAR  oid,
struct WLDAP32_berval data,
PLDAPControlA serverctrls,
PLDAPControlA clientctrls,
ULONG message 
)

Definition at line 69 of file extended.c.

71{
73#ifdef HAVE_LDAP
74 WCHAR *oidW = NULL;
75 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
76
78
79 TRACE( "(%p, %s, %p, %p, %p, %p)\n", ld, debugstr_a(oid), data, serverctrls,
80 clientctrls, message );
81
82 if (!ld || !message) return WLDAP32_LDAP_PARAM_ERROR;
83
84 if (oid) {
85 oidW = strAtoW( oid );
86 if (!oidW) goto exit;
87 }
88 if (serverctrls) {
89 serverctrlsW = controlarrayAtoW( serverctrls );
90 if (!serverctrlsW) goto exit;
91 }
92 if (clientctrls) {
93 clientctrlsW = controlarrayAtoW( clientctrls );
94 if (!clientctrlsW) goto exit;
95 }
96
97 ret = ldap_extended_operationW( ld, oidW, data, serverctrlsW, clientctrlsW, message );
98
99exit:
100 strfreeW( oidW );
101 controlarrayfreeW( serverctrlsW );
102 controlarrayfreeW( clientctrlsW );
103
104#endif
105 return ret;
106}
ULONG CDECL ldap_extended_operationW(WLDAP32_LDAP *ld, PWCHAR oid, struct WLDAP32_berval *data, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, ULONG *message)
Definition: extended.c:133

◆ ldap_extended_operationW()

ULONG CDECL ldap_extended_operationW ( WLDAP32_LDAP ld,
PWCHAR  oid,
struct WLDAP32_berval data,
PLDAPControlW serverctrls,
PLDAPControlW clientctrls,
ULONG message 
)

Definition at line 133 of file extended.c.

135{
137#ifdef HAVE_LDAP
138 char *oidU = NULL;
139 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
140
142
143 TRACE( "(%p, %s, %p, %p, %p, %p)\n", ld, debugstr_w(oid), data, serverctrls,
144 clientctrls, message );
145
146 if (!ld || !message) return WLDAP32_LDAP_PARAM_ERROR;
147
148 if (oid) {
149 oidU = strWtoU( oid );
150 if (!oidU) goto exit;
151 }
152 if (serverctrls) {
153 serverctrlsU = controlarrayWtoU( serverctrls );
154 if (!serverctrlsU) goto exit;
155 }
156 if (clientctrls) {
157 clientctrlsU = controlarrayWtoU( clientctrls );
158 if (!clientctrlsU) goto exit;
159 }
160
161 ret = map_error( ldap_extended_operation( ld, oid ? oidU : "", (struct berval *)data,
162 serverctrlsU, clientctrlsU, (int *)message ));
163
164exit:
165 strfreeU( oidU );
166 controlarrayfreeU( serverctrlsU );
167 controlarrayfreeU( clientctrlsU );
168
169#endif
170 return ret;
171}
#define ldap_extended_operation
Definition: winldap.h:656

Referenced by ldap_extended_operationA().

◆ ldap_first_attributeA()

PCHAR CDECL ldap_first_attributeA ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage entry,
WLDAP32_BerElement **  ptr 
)

Definition at line 290 of file misc.c.

292{
293 PCHAR ret = NULL;
294#ifdef HAVE_LDAP
295 WCHAR *retW;
296
297 TRACE( "(%p, %p, %p)\n", ld, entry, ptr );
298
299 if (!ld || !entry) return NULL;
300 retW = ldap_first_attributeW( ld, entry, ptr );
301
302 ret = strWtoA( retW );
303 ldap_memfreeW( retW );
304
305#endif
306 return ret;
307}
PWCHAR CDECL ldap_first_attributeW(WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *entry, WLDAP32_BerElement **ptr)
Definition: misc.c:326
uint32_t entry
Definition: isohybrid.c:63
static PVOID ptr
Definition: dispmode.c:27

◆ ldap_first_attributeW()

PWCHAR CDECL ldap_first_attributeW ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage entry,
WLDAP32_BerElement **  ptr 
)

Definition at line 326 of file misc.c.

328{
329 PWCHAR ret = NULL;
330#ifdef HAVE_LDAP
331 char *retU;
332
333 TRACE( "(%p, %p, %p)\n", ld, entry, ptr );
334
335 if (!ld || !entry) return NULL;
336 retU = ldap_first_attribute( ld, entry, ptr );
337
338 ret = strUtoW( retU );
339 ldap_memfree( retU );
340
341#endif
342 return ret;
343}
#define ldap_first_attribute
Definition: winldap.h:668

◆ ldap_free_controlsA()

ULONG CDECL ldap_free_controlsA ( LDAPControlA **  controls)

Definition at line 352 of file control.c.

353{
354 return ldap_controls_freeA( controls );
355}
ULONG CDECL ldap_controls_freeA(LDAPControlA **controls)
Definition: control.c:84

◆ ldap_free_controlsW()

ULONG CDECL ldap_free_controlsW ( LDAPControlW **  controls)

Definition at line 371 of file control.c.

372{
373 return ldap_controls_freeW( controls );
374}
ULONG CDECL ldap_controls_freeW(LDAPControlW **controls)
Definition: control.c:107

◆ ldap_get_dnA()

PCHAR CDECL ldap_get_dnA ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage entry 
)

Definition at line 170 of file dn.c.

171{
172 PCHAR ret = NULL;
173#ifdef HAVE_LDAP
174 PWCHAR retW;
175
176 TRACE( "(%p, %p)\n", ld, entry );
177
178 if (!ld || !entry) return NULL;
179
180 retW = ldap_get_dnW( ld, entry );
181
182 ret = strWtoA( retW );
183 ldap_memfreeW( retW );
184
185#endif
186 return ret;
187}
PWCHAR CDECL ldap_get_dnW(WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *entry)
Definition: dn.c:205

◆ ldap_get_dnW()

PWCHAR CDECL ldap_get_dnW ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage entry 
)

Definition at line 205 of file dn.c.

206{
207 PWCHAR ret = NULL;
208#ifdef HAVE_LDAP
209 char *retU;
210
211 TRACE( "(%p, %p)\n", ld, entry );
212
213 if (!ld || !entry) return NULL;
214
215 retU = ldap_get_dn( ld, entry );
216
217 ret = strUtoW( retU );
218 ldap_memfree( retU );
219
220#endif
221 return ret;
222}
#define ldap_get_dn
Definition: winldap.h:693

◆ ldap_get_next_page()

ULONG CDECL ldap_get_next_page ( WLDAP32_LDAP ld,
PLDAPSearch  search,
ULONG  pagesize,
ULONG message 
)

Definition at line 161 of file page.c.

163{
164 FIXME( "(%p, %p, 0x%08x, %p)\n", ld, search, pagesize, message );
165
166 if (!ld) return ~0u;
168}
#define FIXME(fmt,...)
Definition: precomp.h:53
static short search(int val, const short *table, int size)
Definition: msg711.c:255

◆ ldap_get_next_page_s()

ULONG CDECL ldap_get_next_page_s ( WLDAP32_LDAP ld,
PLDAPSearch  search,
struct l_timeval timeout,
ULONG  pagesize,
ULONG count,
WLDAP32_LDAPMessage **  results 
)

Definition at line 170 of file page.c.

173{
174 FIXME( "(%p, %p, %p, 0x%08x, %p, %p)\n", ld, search, timeout,
175 pagesize, count, results );
176
177 if (!ld) return ~0u;
179}
static struct _test_info results[8]
Definition: SetCursorPos.c:31
GLuint GLuint GLsizei count
Definition: gl.h:1545

◆ ldap_get_optionA()

ULONG CDECL ldap_get_optionA ( WLDAP32_LDAP ld,
int  option,
void value 
)

Definition at line 44 of file option.c.

45{
47#ifdef HAVE_LDAP
48
49 TRACE( "(%p, 0x%08x, %p)\n", ld, option, value );
50
51 if (!ld || !value) return WLDAP32_LDAP_PARAM_ERROR;
52
53 switch (option)
54 {
56 {
57 LDAPAPIFeatureInfoW featureW;
58 LDAPAPIFeatureInfoA *featureA = value;
59
60 if (!featureA->ldapaif_name) return WLDAP32_LDAP_PARAM_ERROR;
61
62 featureW.ldapaif_info_version = featureA->ldapaif_info_version;
63 featureW.ldapaif_name = strAtoW( featureA->ldapaif_name );
64 featureW.ldapaif_version = 0;
65
66 if (!featureW.ldapaif_name) return WLDAP32_LDAP_NO_MEMORY;
67
68 ret = ldap_get_optionW( ld, option, &featureW );
69
70 featureA->ldapaif_version = featureW.ldapaif_version;
71 strfreeW( featureW.ldapaif_name );
72 return ret;
73 }
75 {
78
79 memset( &infoW, 0, sizeof(LDAPAPIInfoW) );
80 infoW.ldapai_info_version = infoA->ldapai_info_version;
81
83
84 infoA->ldapai_api_version = infoW.ldapai_api_version;
85 infoA->ldapai_protocol_version = infoW.ldapai_protocol_version;
86
87 if (infoW.ldapai_extensions)
88 {
89 infoA->ldapai_extensions = strarrayWtoA( infoW.ldapai_extensions );
90 if (!infoA->ldapai_extensions) return WLDAP32_LDAP_NO_MEMORY;
91 }
92 if (infoW.ldapai_vendor_name)
93 {
94 infoA->ldapai_vendor_name = strWtoA( infoW.ldapai_vendor_name );
95 if (!infoA->ldapai_vendor_name)
96 {
97 ldap_value_freeW( infoW.ldapai_extensions );
99 }
100 }
101 infoA->ldapai_vendor_version = infoW.ldapai_vendor_version;
102
103 ldap_value_freeW( infoW.ldapai_extensions );
104 ldap_memfreeW( infoW.ldapai_vendor_name );
105 return ret;
106 }
107
115 return ldap_get_optionW( ld, option, value );
116
125 return LDAP_LOCAL_ERROR;
126
157 FIXME( "Unsupported option: 0x%02x\n", option );
159
160 default:
161 FIXME( "Unknown option: 0x%02x\n", option );
163 }
164
165#endif
166 return ret;
167}
static const SecPkgInfoW infoW
Definition: kerberos.c:293
static const SecPkgInfoA infoA
Definition: kerberos.c:302
ULONG CDECL ldap_get_optionW(WLDAP32_LDAP *ld, int option, void *value)
Definition: option.c:183
#define memset(x, y, z)
Definition: compat.h:39
Definition: getopt.h:109
#define LDAP_LOCAL_ERROR
Definition: winldap.h:102
#define WLDAP32_LDAP_OPT_IO_FN_PTRS
#define WLDAP32_LDAP_OPT_HOST_REACHABLE
#define WLDAP32_LDAP_OPT_PROTOCOL_VERSION
#define WLDAP32_LDAP_OPT_REBIND_FN
#define WLDAP32_LDAP_OPT_CACHE_FN_PTRS
#define WLDAP32_LDAP_OPT_CLIENT_CERTIFICATE
#define WLDAP32_LDAP_OPT_RESTART
#define WLDAP32_LDAP_OPT_THREAD_FN_PTRS
#define WLDAP32_LDAP_OPT_DEREF
#define WLDAP32_LDAP_OPT_SASL_METHOD
#define WLDAP32_LDAP_OPT_SSPI_FLAGS
#define WLDAP32_LDAP_OPT_SIZELIMIT
#define WLDAP32_LDAP_OPT_SERVER_CERTIFICATE
#define WLDAP32_LDAP_OPT_SECURITY_CONTEXT
#define WLDAP32_LDAP_OPT_HOST_NAME
#define WLDAP32_LDAP_OPT_ERROR_STRING
#define WLDAP32_LDAP_OPT_SERVER_EXT_ERROR
#define WLDAP32_LDAP_OPT_CACHE_STRATEGY
#define WLDAP32_LDAP_OPT_SEND_TIMEOUT
#define WLDAP32_LDAP_OPT_REFERRALS
#define WLDAP32_LDAP_OPT_PING_LIMIT
#define WLDAP32_LDAP_OPT_TIMELIMIT
#define WLDAP32_LDAP_OPT_API_FEATURE_INFO
#define WLDAP32_LDAP_OPT_SSL_INFO
#define WLDAP32_LDAP_OPT_TCP_KEEPALIVE
#define WLDAP32_LDAP_OPT_AREC_EXCLUSIVE
#define WLDAP32_LDAP_OPT_DNSDOMAIN_NAME
#define WLDAP32_LDAP_OPT_ERROR_NUMBER
#define WLDAP32_LDAP_OPT_PING_KEEP_ALIVE
#define WLDAP32_LDAP_OPT_AUTO_RECONNECT
#define WLDAP32_LDAP_OPT_DESC
#define WLDAP32_LDAP_OPT_REF_DEREF_CONN_PER_MSG
#define WLDAP32_LDAP_OPT_SERVER_ERROR
#define WLDAP32_LDAP_OPT_SERVER_CONTROLS
#define WLDAP32_LDAP_OPT_PROMPT_CREDENTIALS
#define WLDAP32_LDAP_OPT_GETDSNAME_FLAGS
#define WLDAP32_LDAP_OPT_PING_WAIT_TIME
#define WLDAP32_LDAP_OPT_SIGN
#define WLDAP32_LDAP_OPT_REFERRAL_CALLBACK
#define WLDAP32_LDAP_OPT_REFERRAL_HOP_LIMIT
#define WLDAP32_LDAP_OPT_ROOTDSE_CACHE
#define WLDAP32_LDAP_OPT_REBIND_ARG
#define WLDAP32_LDAP_OPT_FAST_CONCURRENT_BIND
#define WLDAP32_LDAP_OPT_API_INFO
#define WLDAP32_LDAP_OPT_CACHE_ENABLE
#define WLDAP32_LDAP_OPT_ENCRYPT
#define WLDAP32_LDAP_OPT_SSL

◆ ldap_get_optionW()

ULONG CDECL ldap_get_optionW ( WLDAP32_LDAP ld,
int  option,
void value 
)

Definition at line 183 of file option.c.

184{
186#ifdef HAVE_LDAP
187
188 TRACE( "(%p, 0x%08x, %p)\n", ld, option, value );
189
190 if (!ld || !value) return WLDAP32_LDAP_PARAM_ERROR;
191
192 switch (option)
193 {
195 {
196 LDAPAPIFeatureInfo featureU;
197 LDAPAPIFeatureInfoW *featureW = value;
198
199 if (!featureW->ldapaif_name) return WLDAP32_LDAP_PARAM_ERROR;
200
201 featureU.ldapaif_info_version = featureW->ldapaif_info_version;
202 featureU.ldapaif_name = strWtoU( featureW->ldapaif_name );
203 featureU.ldapaif_version = 0;
204
205 if (!featureU.ldapaif_name) return WLDAP32_LDAP_NO_MEMORY;
206
207 ret = map_error( ldap_get_option( ld, option, &featureU ));
208
209 featureW->ldapaif_version = featureU.ldapaif_version;
210 strfreeU( featureU.ldapaif_name );
211 return ret;
212 }
214 {
215 LDAPAPIInfo infoU;
217
218 memset( &infoU, 0, sizeof(LDAPAPIInfo) );
219 infoU.ldapai_info_version = infoW->ldapai_info_version;
220
221 ret = map_error( ldap_get_option( ld, option, &infoU ));
222
223 infoW->ldapai_api_version = infoU.ldapai_api_version;
224 infoW->ldapai_protocol_version = infoU.ldapai_protocol_version;
225
226 if (infoU.ldapai_extensions)
227 {
228 infoW->ldapai_extensions = strarrayUtoW( infoU.ldapai_extensions );
229 if (!infoW->ldapai_extensions) return WLDAP32_LDAP_NO_MEMORY;
230 }
231 if (infoU.ldapai_vendor_name)
232 {
233 infoW->ldapai_vendor_name = strUtoW( infoU.ldapai_vendor_name );
234 if (!infoW->ldapai_vendor_name)
235 {
236 ldap_memvfree( (void **)infoU.ldapai_extensions );
238 }
239 }
240 infoW->ldapai_vendor_version = infoU.ldapai_vendor_version;
241
242 ldap_memvfree( (void **)infoU.ldapai_extensions );
243 ldap_memfree( infoU.ldapai_vendor_name );
244 return ret;
245 }
246
254 return map_error( ldap_get_option( ld, option, value ));
255
265
296 FIXME( "Unsupported option: 0x%02x\n", option );
298
299 default:
300 FIXME( "Unknown option: 0x%02x\n", option );
302 }
303
304#endif
305 return ret;
306}
#define LDAPAPIInfo
Definition: winldap.h:626
#define LDAPAPIFeatureInfo
Definition: winldap.h:628
#define ldap_get_option
Definition: winldap.h:640

◆ ldap_get_paged_count()

ULONG CDECL ldap_get_paged_count ( WLDAP32_LDAP ld,
PLDAPSearch  search,
ULONG count,
WLDAP32_LDAPMessage results 
)

Definition at line 181 of file page.c.

183{
185#ifdef HAVE_LDAP
186 FIXME( "(%p, %p, %p, %p)\n", ld, search, count, results );
187
188 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
189 /* FIXME: save the cookie from the server here */
190
191#endif
192 return ret;
193}

◆ ldap_get_values_lenA()

PBERVAL *CDECL ldap_get_values_lenA ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage message,
PCHAR  attr 
)

Definition at line 249 of file value.c.

251{
252#ifdef HAVE_LDAP
253 WCHAR *attrW = NULL;
254 struct WLDAP32_berval **ret;
255
256 TRACE( "(%p, %p, %s)\n", ld, message, debugstr_a(attr) );
257
258 if (!ld || !message || !attr) return NULL;
259
260 attrW = strAtoW( attr );
261 if (!attrW) return NULL;
262
263 ret = ldap_get_values_lenW( ld, message, attrW );
264
265 strfreeW( attrW );
266 return ret;
267
268#else
269 return NULL;
270#endif
271}
struct WLDAP32_berval **CDECL ldap_get_values_lenW(WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *message, PWCHAR attr)
Definition: value.c:292

◆ ldap_get_values_lenW()

PBERVAL *CDECL ldap_get_values_lenW ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage message,
PWCHAR  attr 
)

Definition at line 292 of file value.c.

294{
295#ifdef HAVE_LDAP
296 char *attrU = NULL;
297 struct berval **ret;
298
299 TRACE( "(%p, %p, %s)\n", ld, message, debugstr_w(attr) );
300
301 if (!ld || !message || !attr) return NULL;
302
303 attrU = strWtoU( attr );
304 if (!attrU) return NULL;
305
306 ret = ldap_get_values_len( ld, message, attrU );
307
308 strfreeU( attrU );
309 return (struct WLDAP32_berval **)ret;
310
311#else
312 return NULL;
313#endif
314}
#define ldap_get_values_len
Definition: winldap.h:671

◆ ldap_get_valuesA()

PCHAR *CDECL ldap_get_valuesA ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage entry,
PCHAR  attr 
)

Definition at line 130 of file value.c.

131{
132 PCHAR *ret = NULL;
133#ifdef HAVE_LDAP
134 WCHAR *attrW = NULL, **retW;
135
136 TRACE( "(%p, %p, %s)\n", ld, entry, debugstr_a(attr) );
137
138 if (!ld || !entry || !attr) return NULL;
139
140 attrW = strAtoW( attr );
141 if (!attrW) return NULL;
142
143 retW = ldap_get_valuesW( ld, entry, attrW );
144
145 ret = strarrayWtoA( retW );
146 ldap_value_freeW( retW );
147 strfreeW( attrW );
148
149#endif
150 return ret;
151}
PWCHAR *CDECL ldap_get_valuesW(WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *entry, PWCHAR attr)
Definition: value.c:217

◆ ldap_get_valuesW()

PWCHAR *CDECL ldap_get_valuesW ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage entry,
PWCHAR  attr 
)

Definition at line 217 of file value.c.

218{
219 PWCHAR *ret = NULL;
220#ifdef HAVE_LDAP
221 char *attrU = NULL, **retU;
222 struct berval **bv;
223
224 TRACE( "(%p, %p, %s)\n", ld, entry, debugstr_w(attr) );
225
226 if (!ld || !entry || !attr) return NULL;
227
228 attrU = strWtoU( attr );
229 if (!attrU) return NULL;
230
231 bv = ldap_get_values_len( ld, entry, attrU );
232
233 retU = bv2str_array( bv );
234 ret = strarrayUtoW( retU );
235
237 strarrayfreeU( retU );
238 strfreeU( attrU );
239
240#endif
241 return ret;
242}
WINLDAPAPI ULONG ldap_value_free_len(struct berval **)
static void strarrayfreeU(char **strarray)
Definition: wldap32.h:234

◆ ldap_initA()

WLDAP32_LDAP *CDECL ldap_initA ( const  PCHAR,
ULONG  portnumber 
)

Definition at line 331 of file init.c.

332{
333#ifdef HAVE_LDAP
334 WLDAP32_LDAP *ld = NULL;
335 WCHAR *hostnameW = NULL;
336
337 TRACE( "(%s, %d)\n", debugstr_a(hostname), portnumber );
338
339 if (hostname) {
340 hostnameW = strAtoW( hostname );
341 if (!hostnameW) goto exit;
342 }
343
344 ld = ldap_initW( hostnameW, portnumber );
345
346exit:
347 strfreeW( hostnameW );
348 return ld;
349
350#else
351 return NULL;
352#endif
353}
WLDAP32_LDAP *CDECL ldap_initW(const PWCHAR hostname, ULONG portnumber)
Definition: init.c:377

◆ ldap_initW()

WLDAP32_LDAP *CDECL ldap_initW ( const  PWCHAR,
ULONG  portnumber 
)

Definition at line 377 of file init.c.

378{
379#ifdef HAVE_LDAP
380 LDAP *ld = NULL;
381 char *hostnameU = NULL, *url = NULL;
382
383 TRACE( "(%s, %d)\n", debugstr_w(hostname), portnumber );
384
385 if (hostname) {
386 hostnameU = strWtoU( hostname );
387 if (!hostnameU) goto exit;
388 }
389 else {
390 hostnameU = strWtoU( defaulthost );
391 if (!hostnameU) goto exit;
392 }
393
394 url = urlify_hostnames( "ldap://", hostnameU, portnumber );
395 if (!url) goto exit;
396
397 ld = create_context( url );
398
399exit:
400 strfreeU( hostnameU );
401 strfreeU( url );
402 return ld;
403
404#else
405 return NULL;
406#endif
407}

◆ ldap_memfreeA()

void CDECL ldap_memfreeA ( PCHAR  block)

Definition at line 407 of file misc.c.

408{
409 TRACE( "(%p)\n", block );
410 strfreeA( block );
411}
static void strfreeA(LPSTR str)
Definition: wldap32.h:98
static unsigned int block
Definition: xmlmemory.c:101

◆ ldap_memfreeW()

void CDECL ldap_memfreeW ( PWCHAR  block)

Definition at line 421 of file misc.c.

422{
423 TRACE( "(%p)\n", block );
424 strfreeW( block );
425}

◆ ldap_modify_ext_sA()

ULONG CDECL ldap_modify_ext_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
LDAPModA mods[],
PLDAPControlA serverctrls,
PLDAPControlA clientctrls 
)

Definition at line 264 of file modify.c.

266{
268#ifdef HAVE_LDAP
269 WCHAR *dnW = NULL;
270 LDAPModW **modsW = NULL;
271 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
272
274
275 TRACE( "(%p, %s, %p, %p, %p)\n", ld, debugstr_a(dn), mods,
276 serverctrls, clientctrls );
277
278 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
279
280 if (dn) {
281 dnW = strAtoW( dn );
282 if (!dnW) goto exit;
283 }
284 if (mods) {
285 modsW = modarrayAtoW( mods );
286 if (!modsW) goto exit;
287 }
288 if (serverctrls) {
289 serverctrlsW = controlarrayAtoW( serverctrls );
290 if (!serverctrlsW) goto exit;
291 }
292 if (clientctrls) {
293 clientctrlsW = controlarrayAtoW( clientctrls );
294 if (!clientctrlsW) goto exit;
295 }
296
297 ret = ldap_modify_ext_sW( ld, dnW, modsW, serverctrlsW, clientctrlsW );
298
299exit:
300 strfreeW( dnW );
301 modarrayfreeW( modsW );
302 controlarrayfreeW( serverctrlsW );
303 controlarrayfreeW( clientctrlsW );
304
305#endif
306 return ret;
307}
ULONG CDECL ldap_modify_ext_sW(WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *mods[], PLDAPControlW *serverctrls, PLDAPControlW *clientctrls)
Definition: modify.c:330

◆ ldap_modify_ext_sW()

ULONG CDECL ldap_modify_ext_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
LDAPModW mods[],
PLDAPControlW serverctrls,
PLDAPControlW clientctrls 
)

Definition at line 330 of file modify.c.

332{
334#ifdef HAVE_LDAP
335 char *dnU = NULL;
336 LDAPMod **modsU = NULL;
337 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
338
340
341 TRACE( "(%p, %s, %p, %p, %p)\n", ld, debugstr_w(dn), mods,
342 serverctrls, clientctrls );
343
344 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
345
346 if (dn) {
347 dnU = strWtoU( dn );
348 if (!dnU) goto exit;
349 }
350 if (mods) {
351 modsU = modarrayWtoU( mods );
352 if (!modsU) goto exit;
353 }
354 if (serverctrls) {
355 serverctrlsU = controlarrayWtoU( serverctrls );
356 if (!serverctrlsU) goto exit;
357 }
358 if (clientctrls) {
359 clientctrlsU = controlarrayWtoU( clientctrls );
360 if (!clientctrlsU) goto exit;
361 }
362
363 ret = map_error( ldap_modify_ext_s( ld, dn ? dnU : "", mods ? modsU : nullmods,
364 serverctrlsU, clientctrlsU ));
365
366exit:
367 strfreeU( dnU );
368 modarrayfreeU( modsU );
369 controlarrayfreeU( serverctrlsU );
370 controlarrayfreeU( clientctrlsU );
371
372#endif
373 return ret;
374}
#define ldap_modify_ext_s
Definition: winldap.h:660

◆ ldap_modify_extA()

ULONG CDECL ldap_modify_extA ( WLDAP32_LDAP ld,
PCHAR  dn,
LDAPModA mods[],
PLDAPControlA serverctrls,
PLDAPControlA clientctrls,
ULONG message 
)

Definition at line 144 of file modify.c.

146{
148#ifdef HAVE_LDAP
149 WCHAR *dnW = NULL;
150 LDAPModW **modsW = NULL;
151 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
152
154
155 TRACE( "(%p, %s, %p, %p, %p, %p)\n", ld, debugstr_a(dn), mods,
156 serverctrls, clientctrls, message );
157
158 if (!ld) return ~0u;
159
160 if (dn) {
161 dnW = strAtoW( dn );
162 if (!dnW) goto exit;
163 }
164 if (mods) {
165 modsW = modarrayAtoW( mods );
166 if (!modsW) goto exit;
167 }
168 if (serverctrls) {
169 serverctrlsW = controlarrayAtoW( serverctrls );
170 if (!serverctrlsW) goto exit;
171 }
172 if (clientctrls) {
173 clientctrlsW = controlarrayAtoW( clientctrls );
174 if (!clientctrlsW) goto exit;
175 }
176
177 ret = ldap_modify_extW( ld, dnW, modsW, serverctrlsW, clientctrlsW, message );
178
179exit:
180 strfreeW( dnW );
181 modarrayfreeW( modsW );
182 controlarrayfreeW( serverctrlsW );
183 controlarrayfreeW( clientctrlsW );
184
185#endif
186 return ret;
187}
ULONG CDECL ldap_modify_extW(WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *mods[], PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, ULONG *message)
Definition: modify.c:212

◆ ldap_modify_extW()

ULONG CDECL ldap_modify_extW ( WLDAP32_LDAP ld,
PWCHAR  dn,
LDAPModW mods[],
PLDAPControlW serverctrls,
PLDAPControlW clientctrls,
ULONG message 
)

Definition at line 212 of file modify.c.

214{
216#ifdef HAVE_LDAP
217 char *dnU = NULL;
218 LDAPMod **modsU = NULL;
219 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
220 int dummy;
221
223
224 TRACE( "(%p, %s, %p, %p, %p, %p)\n", ld, debugstr_w(dn), mods,
225 serverctrls, clientctrls, message );
226
227 if (!ld) return ~0u;
228
229 if (dn) {
230 dnU = strWtoU( dn );
231 if (!dnU) goto exit;
232 }
233 if (mods) {
234 modsU = modarrayWtoU( mods );
235 if (!modsU) goto exit;
236 }
237 if (serverctrls) {
238 serverctrlsU = controlarrayWtoU( serverctrls );
239 if (!serverctrlsU) goto exit;
240 }
241 if (clientctrls) {
242 clientctrlsU = controlarrayWtoU( clientctrls );
243 if (!clientctrlsU) goto exit;
244 }
245
246 ret = map_error( ldap_modify_ext( ld, dn ? dnU : "", mods ? modsU : nullmods, serverctrlsU,
247 clientctrlsU, message ? (int *)message : &dummy ));
248
249exit:
250 strfreeU( dnU );
251 modarrayfreeU( modsU );
252 controlarrayfreeU( serverctrlsU );
253 controlarrayfreeU( clientctrlsU );
254
255#endif
256 return ret;
257}
#define ldap_modify_ext
Definition: winldap.h:658

◆ ldap_modify_sA()

ULONG CDECL ldap_modify_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
LDAPModA mods[] 
)

Definition at line 381 of file modify.c.

382{
384#ifdef HAVE_LDAP
385 WCHAR *dnW = NULL;
386 LDAPModW **modsW = NULL;
387
389
390 TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), mods );
391
392 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
393
394 if (dn) {
395 dnW = strAtoW( dn );
396 if (!dnW) goto exit;
397 }
398 if (mods) {
399 modsW = modarrayAtoW( mods );
400 if (!modsW) goto exit;
401 }
402
403 ret = ldap_modify_sW( ld, dnW, modsW );
404
405exit:
406 strfreeW( dnW );
407 modarrayfreeW( modsW );
408
409#endif
410 return ret;
411}
ULONG CDECL ldap_modify_sW(WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *mods[])
Definition: modify.c:428

◆ ldap_modify_sW()

ULONG CDECL ldap_modify_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
LDAPModW mods[] 
)

Definition at line 428 of file modify.c.

429{
431#ifdef HAVE_LDAP
432 char *dnU = NULL;
433 LDAPMod **modsU = NULL;
434
436
437 TRACE( "(%p, %s, %p)\n", ld, debugstr_w(dn), mods );
438
439 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
440
441 if (dn) {
442 dnU = strWtoU( dn );
443 if (!dnU) goto exit;
444 }
445 if (mods) {
446 modsU = modarrayWtoU( mods );
447 if (!modsU) goto exit;
448 }
449
450 ret = map_error( ldap_modify_ext_s( ld, dn ? dnU : "", mods ? modsU : nullmods, NULL, NULL ));
451
452exit:
453 strfreeU( dnU );
454 modarrayfreeU( modsU );
455
456#endif
457 return ret;
458}

◆ ldap_modifyA()

ULONG CDECL ldap_modifyA ( WLDAP32_LDAP ld,
PCHAR  dn,
LDAPModA mods[] 
)

Definition at line 48 of file modify.c.

49{
51#ifdef HAVE_LDAP
52 WCHAR *dnW = NULL;
53 LDAPModW **modsW = NULL;
54
56
57 TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), mods );
58
59 if (!ld) return ~0u;
60
61 if (dn) {
62 dnW = strAtoW( dn );
63 if (!dnW) goto exit;
64 }
65 if (mods) {
66 modsW = modarrayAtoW( mods );
67 if (!modsW) goto exit;
68 }
69
70 ret = ldap_modifyW( ld, dnW, modsW );
71
72exit:
73 strfreeW( dnW );
74 modarrayfreeW( modsW );
75
76#endif
77 return ret;
78}
ULONG CDECL ldap_modifyW(WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *mods[])
Definition: modify.c:100

◆ ldap_modifyW()

ULONG CDECL ldap_modifyW ( WLDAP32_LDAP ld,
PWCHAR  dn,
LDAPModW mods[] 
)

Definition at line 100 of file modify.c.

101{
103#ifdef HAVE_LDAP
104 char *dnU = NULL;
105 LDAPMod **modsU = NULL;
106 int msg;
107
109
110 TRACE( "(%p, %s, %p)\n", ld, debugstr_w(dn), mods );
111
112 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
113
114 if (dn) {
115 dnU = strWtoU( dn );
116 if (!dnU) goto exit;
117 }
118 if (mods) {
119 modsU = modarrayWtoU( mods );
120 if (!modsU) goto exit;
121 }
122
123 ret = ldap_modify_ext( ld, dn ? dnU : "", mods ? modsU : nullmods,
124 NULL, NULL, &msg );
125
126 if (ret == LDAP_SUCCESS)
127 ret = msg;
128 else
129 ret = ~0u;
130
131exit:
132 strfreeU( dnU );
133 modarrayfreeU( modsU );
134
135#endif
136 return ret;
137}

◆ ldap_modrdn2_sA()

ULONG CDECL ldap_modrdn2_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  newdn,
INT  delete 
)

Definition at line 225 of file modrdn.c.

226{
228#ifdef HAVE_LDAP
229 WCHAR *dnW = NULL, *newdnW = NULL;
230
232
233 TRACE( "(%p, %s, %p, 0x%02x)\n", ld, debugstr_a(dn), newdn, delete );
234
235 if (!ld || !newdn) return WLDAP32_LDAP_PARAM_ERROR;
236
237 if (dn) {
238 dnW = strAtoW( dn );
239 if (!dnW) goto exit;
240 }
241
242 newdnW = strAtoW( newdn );
243 if (!newdnW) goto exit;
244
245 ret = ldap_modrdn2_sW( ld, dnW, newdnW, delete );
246
247exit:
248 strfreeW( dnW );
249 strfreeW( newdnW );
250
251#endif
252 return ret;
253}
ULONG CDECL ldap_modrdn2_sW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR newdn, INT delete)
Definition: modrdn.c:270

◆ ldap_modrdn2_sW()

ULONG CDECL ldap_modrdn2_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  newdn,
INT  delete 
)

Definition at line 270 of file modrdn.c.

271{
273#ifdef HAVE_LDAP
274 char *dnU = NULL, *newdnU = NULL;
275
277
278 TRACE( "(%p, %s, %p, 0x%02x)\n", ld, debugstr_w(dn), newdn, delete );
279
280 if (!ld || !newdn) return WLDAP32_LDAP_PARAM_ERROR;
281
282 if (dn) {
283 dnU = strWtoU( dn );
284 if (!dnU) goto exit;
285 }
286
287 newdnU = strWtoU( newdn );
288 if (!newdnU) goto exit;
289
290 ret = map_error( ldap_rename_s( ld, dn ? dnU : "", newdnU, NULL, delete, NULL, NULL ));
291
292exit:
293 strfreeU( dnU );
294 strfreeU( newdnU );
295
296#endif
297 return ret;
298}
#define ldap_rename_s
Definition: winldap.h:699

◆ ldap_modrdn2A()

ULONG CDECL ldap_modrdn2A ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  newdn,
INT  delete 
)

Definition at line 134 of file modrdn.c.

135{
137#ifdef HAVE_LDAP
138 WCHAR *dnW = NULL, *newdnW = NULL;
139
141
142 TRACE( "(%p, %s, %p, 0x%02x)\n", ld, debugstr_a(dn), newdn, delete );
143
144 if (!ld || !newdn) return ~0u;
145
146 if (dn) {
147 dnW = strAtoW( dn );
148 if (!dnW) goto exit;
149 }
150
151 newdnW = strAtoW( newdn );
152 if (!newdnW) goto exit;
153
154 ret = ldap_modrdn2W( ld, dnW, newdnW, delete );
155
156exit:
157 strfreeW( dnW );
158 strfreeW( newdnW );
159
160#endif
161 return ret;
162}
ULONG CDECL ldap_modrdn2W(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR newdn, INT delete)
Definition: modrdn.c:184

◆ ldap_modrdn2W()

ULONG CDECL ldap_modrdn2W ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  newdn,
INT  delete 
)

Definition at line 184 of file modrdn.c.

185{
187#ifdef HAVE_LDAP
188 char *dnU = NULL, *newdnU = NULL;
189 int msg;
190
192
193 TRACE( "(%p, %s, %p, 0x%02x)\n", ld, debugstr_w(dn), newdn, delete );
194
195 if (!ld || !newdn) return ~0u;
196
197 if (dn) {
198 dnU = strWtoU( dn );
199 if (!dnU) goto exit;
200 }
201
202 newdnU = strWtoU( newdn );
203 if (!newdnU) goto exit;
204
205 ret = ldap_rename( ld, dn ? dnU : "", newdnU, NULL, delete, NULL, NULL, &msg );
206
207 if (ret == LDAP_SUCCESS)
208 ret = msg;
209 else
210 ret = ~0u;
211
212exit:
213 strfreeU( dnU );
214 strfreeU( newdnU );
215
216#endif
217 return ret;
218}
#define ldap_rename
Definition: winldap.h:698

◆ ldap_modrdn_sA()

ULONG CDECL ldap_modrdn_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  newdn 
)

Definition at line 305 of file modrdn.c.

306{
308#ifdef HAVE_LDAP
309 WCHAR *dnW = NULL, *newdnW = NULL;
310
312
313 TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), newdn );
314
315 if (!ld || !newdn) return WLDAP32_LDAP_PARAM_ERROR;
316
317 if (dn) {
318 dnW = strAtoW( dn );
319 if (!dnW) goto exit;
320 }
321
322 newdnW = strAtoW( newdn );
323 if (!newdnW) goto exit;
324
325 ret = ldap_modrdn_sW( ld, dnW, newdnW );
326
327exit:
328 strfreeW( dnW );
329 strfreeW( newdnW );
330
331#endif
332 return ret;
333}
ULONG CDECL ldap_modrdn_sW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR newdn)
Definition: modrdn.c:349

◆ ldap_modrdn_sW()

ULONG CDECL ldap_modrdn_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  newdn 
)

Definition at line 349 of file modrdn.c.

350{
352#ifdef HAVE_LDAP
353 char *dnU = NULL, *newdnU = NULL;
354
356
357 TRACE( "(%p, %s, %p)\n", ld, debugstr_w(dn), newdn );
358
359 if (!ld || !newdn) return WLDAP32_LDAP_PARAM_ERROR;
360
361 if (dn) {
362 dnU = strWtoU( dn );
363 if (!dnU) goto exit;
364 }
365
366 newdnU = strWtoU( newdn );
367 if (!newdnU) goto exit;
368
369 ret = map_error( ldap_rename_s( ld, dn ? dnU : "", newdnU, NULL, 1, NULL, NULL ));
370
371exit:
372 strfreeU( dnU );
373 strfreeU( newdnU );
374
375#endif
376 return ret;
377}

◆ ldap_modrdnA()

ULONG CDECL ldap_modrdnA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  newdn 
)

Definition at line 44 of file modrdn.c.

45{
47#ifdef HAVE_LDAP
48 WCHAR *dnW = NULL, *newdnW = NULL;
49
51
52 TRACE( "(%p, %s, %s)\n", ld, debugstr_a(dn), debugstr_a(newdn) );
53
54 if (!ld || !newdn) return ~0u;
55
56 if (dn) {
57 dnW = strAtoW( dn );
58 if (!dnW) goto exit;
59 }
60
61 newdnW = strAtoW( newdn );
62 if (!newdnW) goto exit;
63
64 ret = ldap_modrdnW( ld, dnW, newdnW );
65
66exit:
67 strfreeW( dnW );
68 strfreeW( newdnW );
69
70#endif
71 return ret;
72}
ULONG CDECL ldap_modrdnW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR newdn)
Definition: modrdn.c:93

◆ ldap_modrdnW()

ULONG CDECL ldap_modrdnW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  newdn 
)

Definition at line 93 of file modrdn.c.

94{
96#ifdef HAVE_LDAP
97 char *dnU = NULL, *newdnU = NULL;
98 int msg;
99
101
102 TRACE( "(%p, %s, %s)\n", ld, debugstr_w(dn), debugstr_w(newdn) );
103
104 if (!ld || !newdn) return ~0u;
105
106 if (dn) {
107 dnU = strWtoU( dn );
108 if (!dnU) goto exit;
109 }
110
111 newdnU = strWtoU( newdn );
112 if (!newdnU) goto exit;
113
114 ret = ldap_rename( ld, dn ? dnU : "", newdnU, NULL, 1, NULL, NULL, &msg );
115
116 if (ret == LDAP_SUCCESS)
117 ret = msg;
118 else
119 ret = ~0u;
120
121exit:
122 strfreeU( dnU );
123 strfreeU( newdnU );
124
125#endif
126 return ret;
127}

◆ ldap_next_attributeA()

PCHAR CDECL ldap_next_attributeA ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage entry,
WLDAP32_BerElement ptr 
)

Definition at line 452 of file misc.c.

454{
455 PCHAR ret = NULL;
456#ifdef HAVE_LDAP
457 WCHAR *retW;
458
459 TRACE( "(%p, %p, %p)\n", ld, entry, ptr );
460
461 if (!ld || !entry || !ptr) return NULL;
462 retW = ldap_next_attributeW( ld, entry, ptr );
463
464 ret = strWtoA( retW );
465 ldap_memfreeW( retW );
466
467#endif
468 return ret;
469}
PWCHAR CDECL ldap_next_attributeW(WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *entry, WLDAP32_BerElement *ptr)
Definition: misc.c:489

◆ ldap_next_attributeW()

PWCHAR CDECL ldap_next_attributeW ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage entry,
WLDAP32_BerElement ptr 
)

Definition at line 489 of file misc.c.

491{
492 PWCHAR ret = NULL;
493#ifdef HAVE_LDAP
494 char *retU;
495
496 TRACE( "(%p, %p, %p)\n", ld, entry, ptr );
497
498 if (!ld || !entry || !ptr) return NULL;
499 retU = ldap_next_attribute( ld, entry, ptr );
500
501 ret = strUtoW( retU );
502 ldap_memfree( retU );
503
504#endif
505 return ret;
506}
#define ldap_next_attribute
Definition: winldap.h:669

◆ ldap_openA()

WLDAP32_LDAP *CDECL ldap_openA ( PCHAR  hostname,
ULONG  portnumber 
)

Definition at line 414 of file init.c.

415{
416#ifdef HAVE_LDAP
417 WLDAP32_LDAP *ld = NULL;
418 WCHAR *hostnameW = NULL;
419
420 TRACE( "(%s, %d)\n", debugstr_a(hostname), portnumber );
421
422 if (hostname) {
423 hostnameW = strAtoW( hostname );
424 if (!hostnameW) goto exit;
425 }
426
427 ld = ldap_openW( hostnameW, portnumber );
428
429exit:
430 strfreeW( hostnameW );
431 return ld;
432
433#else
434 return NULL;
435#endif
436}
WLDAP32_LDAP *CDECL ldap_openW(PWCHAR hostname, ULONG portnumber)
Definition: init.c:459

◆ ldap_openW()

WLDAP32_LDAP *CDECL ldap_openW ( PWCHAR  hostname,
ULONG  portnumber 
)

Definition at line 459 of file init.c.

460{
461#ifdef HAVE_LDAP
462 LDAP *ld = NULL;
463 char *hostnameU = NULL, *url = NULL;
464
465 TRACE( "(%s, %d)\n", debugstr_w(hostname), portnumber );
466
467 if (hostname) {
468 hostnameU = strWtoU( hostname );
469 if (!hostnameU) goto exit;
470 }
471 else {
472 hostnameU = strWtoU( defaulthost );
473 if (!hostnameU) goto exit;
474 }
475
476 url = urlify_hostnames( "ldap://", hostnameU, portnumber );
477 if (!url) goto exit;
478
479 ld = create_context( url );
480
481exit:
482 strfreeU( hostnameU );
483 strfreeU( url );
484 return ld;
485
486#else
487 return NULL;
488#endif
489}

◆ ldap_parse_extended_resultA()

ULONG CDECL ldap_parse_extended_resultA ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage result,
PCHAR oid,
struct WLDAP32_berval **  data,
BOOLEAN  free 
)

Definition at line 44 of file parse.c.

46{
48#ifdef HAVE_LDAP
49 WCHAR *oidW = NULL;
50
51 TRACE( "(%p, %p, %p, %p, 0x%02x)\n", ld, result, oid, data, free );
52
53 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
55
57
58 if (oid) {
59 *oid = strWtoA( oidW );
60 if (!*oid) ret = WLDAP32_LDAP_NO_MEMORY;
61 ldap_memfreeW( oidW );
62 }
63
64#endif
65 return ret;
66}
#define free
Definition: debug_ros.c:5
ULONG CDECL ldap_parse_extended_resultW(WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *result, PWCHAR *oid, struct WLDAP32_berval **data, BOOLEAN free)
Definition: parse.c:88
GLuint64EXT * result
Definition: glext.h:11304

◆ ldap_parse_extended_resultW()

ULONG CDECL ldap_parse_extended_resultW ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage result,
PWCHAR oid,
struct WLDAP32_berval **  data,
BOOLEAN  free 
)

Definition at line 88 of file parse.c.

90{
92#ifdef HAVE_LDAP
93 char *oidU = NULL;
94
95 TRACE( "(%p, %p, %p, %p, 0x%02x)\n", ld, result, oid, data, free );
96
97 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
99
100 ret = map_error( ldap_parse_extended_result( ld, result, &oidU, (struct berval **)data, free ) );
101
102 if (oid) {
103 *oid = strUtoW( oidU );
104 if (!*oid) ret = WLDAP32_LDAP_NO_MEMORY;
105 ldap_memfree( oidU );
106 }
107
108#endif
109 return ret;
110}
#define ldap_parse_extended_result
Definition: winldap.h:672

Referenced by ldap_parse_extended_resultA().

◆ ldap_parse_page_controlA()

ULONG CDECL ldap_parse_page_controlA ( WLDAP32_LDAP ld,
PLDAPControlA ctrls,
ULONG count,
struct WLDAP32_berval **  cookie 
)

Definition at line 198 of file page.c.

200{
202#ifdef HAVE_LDAP
203 LDAPControlW **ctrlsW = NULL;
204
205 TRACE( "(%p, %p, %p, %p)\n", ld, ctrls, count, cookie );
206
207 if (!ld || !ctrls || !count || !cookie)
209
210 ctrlsW = controlarrayAtoW( ctrls );
211 if (!ctrlsW) return WLDAP32_LDAP_NO_MEMORY;
212
213 ret = ldap_parse_page_controlW( ld, ctrlsW, count, cookie );
214 controlarrayfreeW( ctrlsW );
215
216#endif
217 return ret;
218}
ULONG CDECL ldap_parse_page_controlW(WLDAP32_LDAP *ld, PLDAPControlW *ctrls, ULONG *count, struct WLDAP32_berval **cookie)
Definition: page.c:223
Definition: cookie.c:34

◆ ldap_parse_page_controlW()

ULONG CDECL ldap_parse_page_controlW ( WLDAP32_LDAP ld,
PLDAPControlW ctrls,
ULONG count,
struct WLDAP32_berval **  cookie 
)

Definition at line 223 of file page.c.

225{
227#ifdef HAVE_LDAP
229 BerElement *ber;
231 ULONG i;
232
233 TRACE( "(%p, %p, %p, %p)\n", ld, ctrls, count, cookie );
234
235 if (!ld || !ctrls || !count || !cookie)
237
238 for (i = 0; ctrls[i]; i++)
239 {
240 if (!lstrcmpW( LDAP_PAGED_RESULT_OID_STRING_W, ctrls[i]->ldctl_oid ))
241 control = ctrls[i];
242 }
243
244 if (!control)
246
247 ber = ber_init( &((LDAPControl *)control)->ldctl_value );
248 if (!ber)
250
251 tag = ber_scanf( ber, "{iO}", count, cookie );
252 if ( tag == LBER_ERROR )
254 else
256
257 ber_free( ber, 1 );
258
259#endif
260 return ret;
261}
#define LBER_ERROR
Definition: ber.c:32
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4243
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
Definition: ecma_167.h:138
WINBERAPI void ber_free(BerElement *, int)
WINBERAPI BerElement * ber_init(const BerValue *)
ULONG ber_tag_t
Definition: winber.h:38
WINBERAPI ber_tag_t ber_scanf(BerElement *, const char *,...)
#define LDAP_PAGED_RESULT_OID_STRING_W
Definition: winldap.h:214

Referenced by ldap_parse_page_controlA().

◆ ldap_parse_referenceA()

ULONG CDECL ldap_parse_referenceA ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage message,
PCHAR **  referrals 
)

Definition at line 117 of file parse.c.

119{
121#ifdef HAVE_LDAP
122 WCHAR **referralsW = NULL;
123
124 TRACE( "(%p, %p, %p)\n", ld, message, referrals );
125
126 if (!ld) return ~0u;
127
128 ret = ldap_parse_referenceW( ld, message, &referralsW );
129
130 *referrals = strarrayWtoA( referralsW );
131 ldap_value_freeW( referralsW );
132
133#endif
134 return ret;
135}
ULONG CDECL ldap_parse_referenceW(WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *message, PWCHAR **referrals)
Definition: parse.c:154

◆ ldap_parse_referenceW()

ULONG CDECL ldap_parse_referenceW ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage message,
PWCHAR **  referrals 
)

Definition at line 154 of file parse.c.

156{
158#ifdef HAVE_LDAP_PARSE_REFERENCE
159 char **referralsU = NULL;
160
161 TRACE( "(%p, %p, %p)\n", ld, message, referrals );
162
163 if (!ld) return ~0u;
164
165 ret = map_error( ldap_parse_reference( ld, message, &referralsU, NULL, 0 ));
166
167 *referrals = strarrayUtoW( referralsU );
168 ldap_memfree( referralsU );
169
170#endif
171 return ret;
172}
#define ldap_parse_reference
Definition: winldap.h:674

◆ ldap_parse_resultA()

ULONG CDECL ldap_parse_resultA ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage result,
ULONG retcode,
PCHAR matched,
PCHAR error,
PCHAR **  referrals,
PLDAPControlA **  serverctrls,
BOOLEAN  free 
)

Definition at line 179 of file parse.c.

182{
184#ifdef HAVE_LDAP
185 WCHAR *matchedW = NULL, *errorW = NULL, **referralsW = NULL;
186 LDAPControlW **serverctrlsW = NULL;
187
188 TRACE( "(%p, %p, %p, %p, %p, %p, %p, 0x%02x)\n", ld, result, retcode,
189 matched, error, referrals, serverctrls, free );
190
191 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
192
193 ret = ldap_parse_resultW( ld, result, retcode, &matchedW, &errorW,
194 &referralsW, &serverctrlsW, free );
195
196 if (matched) *matched = strWtoA( matchedW );
197 if (error) *error = strWtoA( errorW );
198
199 if (referrals) *referrals = strarrayWtoA( referralsW );
200 if (serverctrls) *serverctrls = controlarrayWtoA( serverctrlsW );
201
202 ldap_memfreeW( matchedW );
204 ldap_value_freeW( referralsW );
205 ldap_controls_freeW( serverctrlsW );
206
207#endif
208 return ret;
209}
ULONG CDECL ldap_parse_resultW(WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *result, ULONG *retcode, PWCHAR *matched, PWCHAR *error, PWCHAR **referrals, PLDAPControlW **serverctrls, BOOLEAN free)
Definition: parse.c:236
static const WCHAR errorW[]
Definition: htmlevent.c:61
#define error(str)
Definition: mkdosfs.c:1605

◆ ldap_parse_resultW()

ULONG CDECL ldap_parse_resultW ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage result,
ULONG retcode,
PWCHAR matched,
PWCHAR error,
PWCHAR **  referrals,
PLDAPControlW **  serverctrls,
BOOLEAN  free 
)

Definition at line 236 of file parse.c.

239{
241#ifdef HAVE_LDAP
242 char *matchedU = NULL, *errorU = NULL, **referralsU = NULL;
243 LDAPControl **serverctrlsU = NULL;
244
245 TRACE( "(%p, %p, %p, %p, %p, %p, %p, 0x%02x)\n", ld, result, retcode,
246 matched, error, referrals, serverctrls, free );
247
248 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
249
250 ret = map_error( ldap_parse_result( ld, result, (int *)retcode, &matchedU, &errorU,
251 &referralsU, &serverctrlsU, free ));
252
253 if (matched) *matched = strUtoW( matchedU );
254 if (error) *error = strUtoW( errorU );
255
256 if (referrals) *referrals = strarrayUtoW( referralsU );
257 if (serverctrls) *serverctrls = controlarrayUtoW( serverctrlsU );
258
259 ldap_memfree( matchedU );
260 ldap_memfree( errorU );
261 ldap_memvfree( (void **)referralsU );
262 ldap_controls_free( serverctrlsU );
263
264#endif
265 return ret;
266}
#define ldap_parse_result
Definition: winldap.h:675
#define ldap_controls_free
Definition: winldap.h:686

◆ ldap_parse_sort_controlA()

ULONG CDECL ldap_parse_sort_controlA ( WLDAP32_LDAP ld,
PLDAPControlA control,
ULONG result,
PCHAR attr 
)

Definition at line 273 of file parse.c.

275{
277#ifdef HAVE_LDAP
278 WCHAR *attrW = NULL;
280
281 TRACE( "(%p, %p, %p, %p)\n", ld, control, result, attr );
282
283 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
285
286 controlW = controlarrayAtoW( control );
287 if (!controlW) return WLDAP32_LDAP_NO_MEMORY;
288
290
291 *attr = strWtoA( attrW );
292 controlarrayfreeW( controlW );
293
294#endif
295 return ret;
296}
ULONG CDECL ldap_parse_sort_controlW(WLDAP32_LDAP *ld, PLDAPControlW *control, ULONG *result, PWCHAR *attr)
Definition: parse.c:316

Referenced by test_ldap_parse_sort_control().

◆ ldap_parse_sort_controlW()

ULONG CDECL ldap_parse_sort_controlW ( WLDAP32_LDAP ld,
PLDAPControlW control,
ULONG result,
PWCHAR attr 
)

Definition at line 316 of file parse.c.

318{
320#ifdef HAVE_LDAP
321 char *attrU = NULL;
322 LDAPControl **controlU = NULL;
323#ifdef HAVE_LDAP_PARSE_SORT_CONTROL
324 unsigned long res;
325#elif defined(HAVE_LDAP_PARSE_SORTRESPONSE_CONTROL)
327 LDAPControl *sortcontrol = NULL;
328 unsigned int i;
329#endif
330
331 TRACE( "(%p, %p, %p, %p)\n", ld, control, result, attr );
332
333 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
335
336 controlU = controlarrayWtoU( control );
337 if (!controlU) return WLDAP32_LDAP_NO_MEMORY;
338
339#ifdef HAVE_LDAP_PARSE_SORT_CONTROL
340 if (!(ret = ldap_parse_sort_control( ld, controlU, &res, &attrU )))
341 {
342 *result = res;
343 *attr = strUtoW( attrU );
344 }
345#elif defined(HAVE_LDAP_PARSE_SORTRESPONSE_CONTROL)
346 for (i = 0; controlU[i]; i++)
347 {
348 if (!strcmp( LDAP_SERVER_RESP_SORT_OID, controlU[i]->ldctl_oid ))
349 sortcontrol = controlU[i];
350 }
351 if (!sortcontrol)
352 {
353 controlarrayfreeU( controlU );
355 }
356 if (!(ret = ldap_parse_sortresponse_control( ld, sortcontrol, &res, &attrU )))
357 {
358 *result = res;
359 *attr = strUtoW( attrU );
360 }
361#endif
362 controlarrayfreeU( controlU );
363
364#endif
365 return map_error( ret );
366}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
INT ber_int_t
Definition: winber.h:39
#define ldap_parse_sort_control
Definition: winldap.h:676
#define LDAP_SERVER_RESP_SORT_OID

Referenced by ldap_parse_sort_controlA().

◆ ldap_parse_vlv_controlA()

int CDECL ldap_parse_vlv_controlA ( WLDAP32_LDAP ,
LDAPControlA **  ,
ULONG ,
ULONG ,
struct WLDAP32_berval **  ,
INT  
)

◆ ldap_parse_vlv_controlW()

int CDECL ldap_parse_vlv_controlW ( WLDAP32_LDAP ,
LDAPControlW **  ,
ULONG ,
ULONG ,
struct WLDAP32_berval **  ,
INT  
)

◆ ldap_rename_ext_sA()

ULONG CDECL ldap_rename_ext_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  newrdn,
PCHAR  newparent,
INT  delete,
PLDAPControlA serverctrls,
PLDAPControlA clientctrls 
)

Definition at line 177 of file rename.c.

180{
182#ifdef HAVE_LDAP
183 WCHAR *dnW = NULL, *newrdnW = NULL, *newparentW = NULL;
184 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
185
187
188 TRACE( "(%p, %s, %s, %s, 0x%02x, %p, %p)\n", ld, debugstr_a(dn),
189 debugstr_a(newrdn), debugstr_a(newparent), delete,
190 serverctrls, clientctrls );
191
192 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
193
194 if (dn) {
195 dnW = strAtoW( dn );
196 if (!dnW) goto exit;
197 }
198 if (newrdn) {
199 newrdnW = strAtoW( newrdn );
200 if (!newrdnW) goto exit;
201 }
202 if (newparent) {
203 newparentW = strAtoW( newparent );
204 if (!newparentW) goto exit;
205 }
206 if (serverctrls) {
207 serverctrlsW = controlarrayAtoW( serverctrls );
208 if (!serverctrlsW) goto exit;
209 }
210 if (clientctrls) {
211 clientctrlsW = controlarrayAtoW( clientctrls );
212 if (!clientctrlsW) goto exit;
213 }
214
215 ret = ldap_rename_ext_sW( ld, dnW, newrdnW, newparentW, delete,
216 serverctrlsW, clientctrlsW );
217
218exit:
219 strfreeW( dnW );
220 strfreeW( newrdnW );
221 strfreeW( newparentW );
222 controlarrayfreeW( serverctrlsW );
223 controlarrayfreeW( clientctrlsW );
224
225#endif
226 return ret;
227}
ULONG CDECL ldap_rename_ext_sW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR newrdn, PWCHAR newparent, INT delete, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls)
Definition: rename.c:246

◆ ldap_rename_ext_sW()

ULONG CDECL ldap_rename_ext_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  newrdn,
PWCHAR  newparent,
INT  delete,
PLDAPControlW serverctrls,
PLDAPControlW clientctrls 
)

Definition at line 246 of file rename.c.

249{
251#ifdef HAVE_LDAP
252 char *dnU = NULL, *newrdnU = NULL, *newparentU = NULL;
253 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
254
256
257 TRACE( "(%p, %s, %s, %s, 0x%02x, %p, %p)\n", ld, debugstr_w(dn),
258 debugstr_w(newrdn), debugstr_w(newparent), delete,
259 serverctrls, clientctrls );
260
261 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
262
263 if (dn) {
264 dnU = strWtoU( dn );
265 if (!dnU) goto exit;
266 }
267 if (newrdn) {
268 newrdnU = strWtoU( newrdn );
269 if (!newrdnU) goto exit;
270 }
271 if (newparent) {
272 newparentU = strWtoU( newparent );
273 if (!newparentU) goto exit;
274 }
275 if (serverctrls) {
276 serverctrlsU = controlarrayWtoU( serverctrls );
277 if (!serverctrlsU) goto exit;
278 }
279 if (clientctrls) {
280 clientctrlsU = controlarrayWtoU( clientctrls );
281 if (!clientctrlsU) goto exit;
282 }
283
284 ret = map_error( ldap_rename_s( ld, dn ? dnU : "", newrdn ? newrdnU : "", newparentU,
285 delete, serverctrlsU, clientctrlsU ));
286
287exit:
288 strfreeU( dnU );
289 strfreeU( newrdnU );
290 strfreeU( newparentU );
291 controlarrayfreeU( serverctrlsU );
292 controlarrayfreeU( clientctrlsU );
293
294#endif
295 return ret;
296}

◆ ldap_rename_extA()

ULONG CDECL ldap_rename_extA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  newrdn,
PCHAR  newparent,
INT  delete,
PLDAPControlA serverctrls,
PLDAPControlA clientctrls,
ULONG message 
)

Definition at line 44 of file rename.c.

47{
49#ifdef HAVE_LDAP
50 WCHAR *dnW = NULL, *newrdnW = NULL, *newparentW = NULL;
51 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
52
54
55 TRACE( "(%p, %s, %s, %s, 0x%02x, %p, %p, %p)\n", ld, debugstr_a(dn),
56 debugstr_a(newrdn), debugstr_a(newparent), delete,
57 serverctrls, clientctrls, message );
58
59 if (!ld || !message) return WLDAP32_LDAP_PARAM_ERROR;
60
61 if (dn) {
62 dnW = strAtoW( dn );
63 if (!dnW) goto exit;
64 }
65 if (newrdn) {
66 newrdnW = strAtoW( newrdn );
67 if (!newrdnW) goto exit;
68 }
69 if (newparent) {
70 newparentW = strAtoW( newparent );
71 if (!newparentW) goto exit;
72 }
73 if (serverctrls) {
74 serverctrlsW = controlarrayAtoW( serverctrls );
75 if (!serverctrlsW) goto exit;
76 }
77 if (clientctrls) {
78 clientctrlsW = controlarrayAtoW( clientctrls );
79 if (!clientctrlsW) goto exit;
80 }
81
82 ret = ldap_rename_extW( ld, dnW, newrdnW, newparentW, delete,
83 serverctrlsW, clientctrlsW, message );
84
85exit:
86 strfreeW( dnW );
87 strfreeW( newrdnW );
88 strfreeW( newparentW );
89 controlarrayfreeW( serverctrlsW );
90 controlarrayfreeW( clientctrlsW );
91
92#endif
93 return ret;
94}
ULONG CDECL ldap_rename_extW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR newrdn, PWCHAR newparent, INT delete, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, ULONG *message)
Definition: rename.c:120

◆ ldap_rename_extW()

ULONG CDECL ldap_rename_extW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  newrdn,
PWCHAR  newparent,
INT  delete,
PLDAPControlW serverctrls,
PLDAPControlW clientctrls,
ULONG message 
)

Definition at line 120 of file rename.c.

123{
125#ifdef HAVE_LDAP
126 char *dnU = NULL, *newrdnU = NULL, *newparentU = NULL;
127 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
128
130
131 TRACE( "(%p, %s, %s, %s, 0x%02x, %p, %p, %p)\n", ld, debugstr_w(dn),
132 debugstr_w(newrdn), debugstr_w(newparent), delete,
133 serverctrls, clientctrls, message );
134
135 if (!ld || !message) return WLDAP32_LDAP_PARAM_ERROR;
136
137 if (dn) {
138 dnU = strWtoU( dn );
139 if (!dnU) goto exit;
140 }
141 if (newrdn) {
142 newrdnU = strWtoU( newrdn );
143 if (!newrdnU) goto exit;
144 }
145 if (newparent) {
146 newparentU = strWtoU( newparent );
147 if (!newparentU) goto exit;
148 }
149 if (serverctrls) {
150 serverctrlsU = controlarrayWtoU( serverctrls );
151 if (!serverctrlsU) goto exit;
152 }
153 if (clientctrls) {
154 clientctrlsU = controlarrayWtoU( clientctrls );
155 if (!clientctrlsU) goto exit;
156 }
157
158 ret = map_error( ldap_rename( ld, dn ? dnU : "", newrdn ? newrdnU : "", newparentU,
159 delete, serverctrlsU, clientctrlsU, (int *)message ));
160
161exit:
162 strfreeU( dnU );
163 strfreeU( newrdnU );
164 strfreeU( newparentU );
165 controlarrayfreeU( serverctrlsU );
166 controlarrayfreeU( clientctrlsU );
167
168#endif
169 return ret;
170}

◆ ldap_sasl_bind_sA()

ULONG CDECL ldap_sasl_bind_sA ( WLDAP32_LDAP ld,
const  PCHAR,
const  PCHAR,
const BERVAL cred,
PLDAPControlA serverctrls,
PLDAPControlA clientctrls,
PBERVAL serverdata 
)

Definition at line 347 of file bind.c.

350{
352#ifdef HAVE_LDAP
353 WCHAR *dnW, *mechanismW = NULL;
354 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
355
357
358 TRACE( "(%p, %s, %s, %p, %p, %p, %p)\n", ld, debugstr_a(dn),
359 debugstr_a(mechanism), cred, serverctrls, clientctrls, serverdata );
360
361 if (!ld || !dn || !mechanism || !cred || !serverdata)
363
364 dnW = strAtoW( dn );
365 if (!dnW) goto exit;
366
367 mechanismW = strAtoW( mechanism );
368 if (!mechanismW) goto exit;
369
370 if (serverctrls) {
371 serverctrlsW = controlarrayAtoW( serverctrls );
372 if (!serverctrlsW) goto exit;
373 }
374 if (clientctrls) {
375 clientctrlsW = controlarrayAtoW( clientctrls );
376 if (!clientctrlsW) goto exit;
377 }
378
379 ret = ldap_sasl_bind_sW( ld, dnW, mechanismW, cred, serverctrlsW, clientctrlsW, serverdata );
380
381exit:
382 strfreeW( dnW );
383 strfreeW( mechanismW );
384 controlarrayfreeW( serverctrlsW );
385 controlarrayfreeW( clientctrlsW );
386
387#endif
388 return ret;
389}
ULONG CDECL ldap_sasl_bind_sW(WLDAP32_LDAP *ld, const PWCHAR dn, const PWCHAR mechanism, const BERVAL *cred, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, PBERVAL *serverdata)
Definition: bind.c:413

◆ ldap_sasl_bind_sW()

ULONG CDECL ldap_sasl_bind_sW ( WLDAP32_LDAP ld,
const  PWCHAR,
const  PWCHAR,
const BERVAL cred,
PLDAPControlW serverctrls,
PLDAPControlW clientctrls,
PBERVAL serverdata 
)

Definition at line 413 of file bind.c.

416{
418#ifdef HAVE_LDAP
419 char *dnU, *mechanismU = NULL;
420 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
421 struct berval credU;
422
424
425 TRACE( "(%p, %s, %s, %p, %p, %p, %p)\n", ld, debugstr_w(dn),
426 debugstr_w(mechanism), cred, serverctrls, clientctrls, serverdata );
427
428 if (!ld || !dn || !mechanism || !cred || !serverdata)
430
431 dnU = strWtoU( dn );
432 if (!dnU) goto exit;
433
434 mechanismU = strWtoU( mechanism );
435 if (!mechanismU) goto exit;
436
437 if (serverctrls) {
438 serverctrlsU = controlarrayWtoU( serverctrls );
439 if (!serverctrlsU) goto exit;
440 }
441 if (clientctrls) {
442 clientctrlsU = controlarrayWtoU( clientctrls );
443 if (!clientctrlsU) goto exit;
444 }
445
446 credU.bv_len = cred->bv_len;
447 credU.bv_val = cred->bv_val;
448
449 ret = map_error( ldap_sasl_bind_s( ld, dnU, mechanismU, &credU,
450 serverctrlsU, clientctrlsU, (struct berval **)serverdata ));
451
452exit:
453 strfreeU( dnU );
454 strfreeU( mechanismU );
455 controlarrayfreeU( serverctrlsU );
456 controlarrayfreeU( clientctrlsU );
457
458#endif
459 return ret;
460}

◆ ldap_sasl_bindA()

ULONG CDECL ldap_sasl_bindA ( WLDAP32_LDAP ld,
const  PCHAR,
const  PCHAR,
const BERVAL cred,
PLDAPControlA serverctrls,
PLDAPControlA clientctrls,
int message 
)

Definition at line 227 of file bind.c.

230{
232#ifdef HAVE_LDAP
233 WCHAR *dnW, *mechanismW = NULL;
234 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
235
237
238 TRACE( "(%p, %s, %s, %p, %p, %p, %p)\n", ld, debugstr_a(dn),
239 debugstr_a(mechanism), cred, serverctrls, clientctrls, message );
240
241 if (!ld || !dn || !mechanism || !cred || !message)
243
244 dnW = strAtoW( dn );
245 if (!dnW) goto exit;
246
247 mechanismW = strAtoW( mechanism );
248 if (!mechanismW) goto exit;
249
250 if (serverctrls) {
251 serverctrlsW = controlarrayAtoW( serverctrls );
252 if (!serverctrlsW) goto exit;
253 }
254 if (clientctrls) {
255 clientctrlsW = controlarrayAtoW( clientctrls );
256 if (!clientctrlsW) goto exit;
257 }
258
259 ret = ldap_sasl_bindW( ld, dnW, mechanismW, cred, serverctrlsW, clientctrlsW, message );
260
261exit:
262 strfreeW( dnW );
263 strfreeW( mechanismW );
264 controlarrayfreeW( serverctrlsW );
265 controlarrayfreeW( clientctrlsW );
266
267#endif
268 return ret;
269}
ULONG CDECL ldap_sasl_bindW(WLDAP32_LDAP *ld, const PWCHAR dn, const PWCHAR mechanism, const BERVAL *cred, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, int *message)
Definition: bind.c:293

◆ ldap_sasl_bindW()

ULONG CDECL ldap_sasl_bindW ( WLDAP32_LDAP ld,
const  PWCHAR,
const  PWCHAR,
const BERVAL cred,
PLDAPControlW serverctrls,
PLDAPControlW clientctrls,
int message 
)

Definition at line 293 of file bind.c.

296{
298#ifdef HAVE_LDAP
299 char *dnU, *mechanismU = NULL;
300 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
301 struct berval credU;
302
304
305 TRACE( "(%p, %s, %s, %p, %p, %p, %p)\n", ld, debugstr_w(dn),
306 debugstr_w(mechanism), cred, serverctrls, clientctrls, message );
307
308 if (!ld || !dn || !mechanism || !cred || !message)
310
311 dnU = strWtoU( dn );
312 if (!dnU) goto exit;
313
314 mechanismU = strWtoU( mechanism );
315 if (!mechanismU) goto exit;
316
317 if (serverctrls) {
318 serverctrlsU = controlarrayWtoU( serverctrls );
319 if (!serverctrlsU) goto exit;
320 }
321 if (clientctrls) {
322 clientctrlsU = controlarrayWtoU( clientctrls );
323 if (!clientctrlsU) goto exit;
324 }
325
326 credU.bv_len = cred->bv_len;
327 credU.bv_val = cred->bv_val;
328
329 ret = map_error( ldap_sasl_bind( ld, dnU, mechanismU, &credU,
330 serverctrlsU, clientctrlsU, message ));
331
332exit:
333 strfreeU( dnU );
334 strfreeU( mechanismU );
335 controlarrayfreeU( serverctrlsU );
336 controlarrayfreeU( clientctrlsU );
337
338#endif
339 return ret;
340}

◆ ldap_search_abandon_page()

ULONG CDECL ldap_search_abandon_page ( WLDAP32_PLDAP  ,
PLDAPSearch   
)

◆ ldap_search_ext_sA()

ULONG CDECL ldap_search_ext_sA ( WLDAP32_LDAP ld,
PCHAR  base,
ULONG  scope,
PCHAR  filter,
PCHAR  attrs[],
ULONG  attrsonly,
PLDAPControlA serverctrls,
PLDAPControlA clientctrls,
struct l_timeval timeout,
ULONG  sizelimit,
WLDAP32_LDAPMessage **  res 
)

Definition at line 301 of file search.c.

304{
306#ifdef HAVE_LDAP
307 WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL;
308 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
309
311
312 TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x, %p, %p, %p, 0x%08x, %p)\n",
313 ld, debugstr_a(base), scope, debugstr_a(filter), attrs, attrsonly,
314 serverctrls, clientctrls, timeout, sizelimit, res );
315
316 if (!ld || !res) return WLDAP32_LDAP_PARAM_ERROR;
317
318 if (base) {
319 baseW = strAtoW( base );
320 if (!baseW) goto exit;
321 }
322 if (filter) {
323 filterW = strAtoW( filter );
324 if (!filterW) goto exit;
325 }
326 if (attrs) {
327 attrsW = strarrayAtoW( attrs );
328 if (!attrsW) goto exit;
329 }
330 if (serverctrls) {
331 serverctrlsW = controlarrayAtoW( serverctrls );
332 if (!serverctrlsW) goto exit;
333 }
334 if (clientctrls) {
335 clientctrlsW = controlarrayAtoW( clientctrls );
336 if (!clientctrlsW) goto exit;
337 }
338
339 ret = ldap_search_ext_sW( ld, baseW, scope, filterW, attrsW, attrsonly,
340 serverctrlsW, clientctrlsW, timeout, sizelimit, res );
341
342exit:
343 strfreeW( baseW );
344 strfreeW( filterW );
345 strarrayfreeW( attrsW );
346 controlarrayfreeW( serverctrlsW );
347 controlarrayfreeW( clientctrlsW );
348
349#endif
350 return ret;
351}
static WCHAR baseW[MAX_PATH]
Definition: FindFiles.c:24
ULONG CDECL ldap_search_ext_sW(WLDAP32_LDAP *ld, PWCHAR base, ULONG scope, PWCHAR filter, PWCHAR attrs[], ULONG attrsonly, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, struct l_timeval *timeout, ULONG sizelimit, WLDAP32_LDAPMessage **res)
Definition: search.c:379

◆ ldap_search_ext_sW()

ULONG CDECL ldap_search_ext_sW ( WLDAP32_LDAP ld,
PWCHAR  base,
ULONG  scope,
PWCHAR  filter,
PWCHAR  attrs[],
ULONG  attrsonly,
PLDAPControlW serverctrls,
PLDAPControlW clientctrls,
struct l_timeval timeout,
ULONG  sizelimit,
WLDAP32_LDAPMessage **  res 
)

Definition at line 379 of file search.c.

382{
384#ifdef HAVE_LDAP
385 char *baseU = NULL, *filterU = NULL, **attrsU = NULL;
386 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
387
389
390 TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x, %p, %p, %p, 0x%08x, %p)\n",
391 ld, debugstr_w(base), scope, debugstr_w(filter), attrs, attrsonly,
392 serverctrls, clientctrls, timeout, sizelimit, res );
393
394 if (!ld || !res) return WLDAP32_LDAP_PARAM_ERROR;
395
396 if (base) {
397 baseU = strWtoU( base );
398 if (!baseU) goto exit;
399 }
400 if (filter) {
401 filterU = strWtoU( filter );
402 if (!filterU) goto exit;
403 }
404 if (attrs) {
405 attrsU = strarrayWtoU( attrs );
406 if (!attrsU) goto exit;
407 }
408 if (serverctrls) {
409 serverctrlsU = controlarrayWtoU( serverctrls );
410 if (!serverctrlsU) goto exit;
411 }
412 if (clientctrls) {
413 clientctrlsU = controlarrayWtoU( clientctrls );
414 if (!clientctrlsU) goto exit;
415 }
416
417 ret = map_error( ldap_search_ext_s( ld, baseU, scope, filterU, attrsU, attrsonly,
418 serverctrlsU, clientctrlsU, (struct timeval *)timeout,
419 sizelimit, res ));
420
421exit:
422 strfreeU( baseU );
423 strfreeU( filterU );
424 strarrayfreeU( attrsU );
425 controlarrayfreeU( serverctrlsU );
426 controlarrayfreeU( clientctrlsU );
427
428#endif
429 return ret;
430}
#define ldap_search_ext_s
Definition: winldap.h:682
static char ** strarrayWtoU(LPWSTR *strarray)
Definition: wldap32.h:174

◆ ldap_search_extA()

ULONG CDECL ldap_search_extA ( WLDAP32_LDAP ld,
PCHAR  base,
ULONG  scope,
PCHAR  filter,
PCHAR  attrs[],
ULONG  attrsonly,
PLDAPControlA serverctrls,
PLDAPControlA clientctrls,
ULONG  timelimit,
ULONG  sizelimit,
ULONG message 
)

Definition at line 155 of file search.c.

158{
160#ifdef HAVE_LDAP
161 WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL;
162 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
163
165
166 TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x, %p, %p, 0x%08x, 0x%08x, %p)\n",
167 ld, debugstr_a(base), scope, debugstr_a(filter), attrs, attrsonly,
168 serverctrls, clientctrls, timelimit, sizelimit, message );
169
170 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
171
172 if (base) {
173 baseW = strAtoW( base );
174 if (!baseW) goto exit;
175 }
176 if (filter)
177 {
178 filterW = strAtoW( filter );
179 if (!filterW) goto exit;
180 }
181 if (attrs) {
182 attrsW = strarrayAtoW( attrs );
183 if (!attrsW) goto exit;
184 }
185 if (serverctrls) {
186 serverctrlsW = controlarrayAtoW( serverctrls );
187 if (!serverctrlsW) goto exit;
188 }
189 if (clientctrls) {
190 clientctrlsW = controlarrayAtoW( clientctrls );
191 if (!clientctrlsW) goto exit;
192 }
193
194 ret = ldap_search_extW( ld, baseW, scope, filterW, attrsW, attrsonly,
195 serverctrlsW, clientctrlsW, timelimit, sizelimit, message );
196
197exit:
198 strfreeW( baseW );
199 strfreeW( filterW );
200 strarrayfreeW( attrsW );
201 controlarrayfreeW( serverctrlsW );
202 controlarrayfreeW( clientctrlsW );
203
204#endif
205 return ret;
206}
ULONG CDECL ldap_search_extW(WLDAP32_LDAP *ld, PWCHAR base, ULONG scope, PWCHAR filter, PWCHAR attrs[], ULONG attrsonly, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, ULONG timelimit, ULONG sizelimit, ULONG *message)
Definition: search.c:236

◆ ldap_search_extW()

ULONG CDECL ldap_search_extW ( WLDAP32_LDAP ld,
PWCHAR  base,
ULONG  scope,
PWCHAR  filter,
PWCHAR  attrs[],
ULONG  attrsonly,
PLDAPControlW serverctrls,
PLDAPControlW clientctrls,
ULONG  timelimit,
ULONG  sizelimit,
ULONG message 
)

Definition at line 236 of file search.c.

239{
241#ifdef HAVE_LDAP
242 char *baseU = NULL, *filterU = NULL, **attrsU = NULL;
243 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
244 struct timeval tv, *tvp = NULL;
245
247
248 TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x, %p, %p, 0x%08x, 0x%08x, %p)\n",
249 ld, debugstr_w(base), scope, debugstr_w(filter), attrs, attrsonly,
250 serverctrls, clientctrls, timelimit, sizelimit, message );
251
252 if (!ld) return ~0u;
253
254 if (base) {
255 baseU = strWtoU( base );
256 if (!baseU) goto exit;
257 }
258 if (filter) {
259 filterU = strWtoU( filter );
260 if (!filterU) goto exit;
261 }
262 if (attrs) {
263 attrsU = strarrayWtoU( attrs );
264 if (!attrsU) goto exit;
265 }
266 if (serverctrls) {
267 serverctrlsU = controlarrayWtoU( serverctrls );
268 if (!serverctrlsU) goto exit;
269 }
270 if (clientctrls) {
271 clientctrlsU = controlarrayWtoU( clientctrls );
272 if (!clientctrlsU) goto exit;
273 }
274
275 if (timelimit)
276 {
277 tv.tv_sec = timelimit;
278 tv.tv_usec = 0;
279 tvp = &tv;
280 }
281
282 ret = map_error( ldap_search_ext( ld, baseU, scope, filterU, attrsU, attrsonly,
283 serverctrlsU, clientctrlsU, tvp, sizelimit, (int *)message ));
284
285exit:
286 strfreeU( baseU );
287 strfreeU( filterU );
288 strarrayfreeU( attrsU );
289 controlarrayfreeU( serverctrlsU );
290 controlarrayfreeU( clientctrlsU );
291
292#endif
293 return ret;
294}
#define ldap_search_ext
Definition: winldap.h:681

◆ ldap_search_init_pageA()

PLDAPSearch CDECL ldap_search_init_pageA ( WLDAP32_PLDAP  ,
PCHAR  ,
ULONG  ,
PCHAR  ,
PCHAR  [],
ULONG  ,
PLDAPControlA ,
PLDAPControlA ,
ULONG  ,
ULONG  ,
PLDAPSortKeyA  
)

◆ ldap_search_init_pageW()

PLDAPSearch CDECL ldap_search_init_pageW ( WLDAP32_PLDAP  ,
PWCHAR  ,
ULONG  ,
PWCHAR  ,
PWCHAR  [],
ULONG  ,
PLDAPControlW ,
PLDAPControlW ,
ULONG  ,
ULONG  ,
PLDAPSortKeyW  
)

◆ ldap_search_sA()

ULONG CDECL ldap_search_sA ( WLDAP32_LDAP ld,
PCHAR  base,
ULONG  scope,
PCHAR  filter,
PCHAR  attrs[],
ULONG  attrsonly,
WLDAP32_LDAPMessage **  res 
)

Definition at line 437 of file search.c.

439{
441#ifdef HAVE_LDAP
442 WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL;
443
445
446 TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x, %p)\n", ld, debugstr_a(base),
447 scope, debugstr_a(filter), attrs, attrsonly, res );
448
449 if (!ld || !res) return WLDAP32_LDAP_PARAM_ERROR;
450
451 if (base) {
452 baseW = strAtoW( base );
453 if (!baseW) goto exit;
454 }
455 if (filter) {
456 filterW = strAtoW( filter );
457 if (!filterW) goto exit;
458 }
459 if (attrs) {
460 attrsW = strarrayAtoW( attrs );
461 if (!attrsW) goto exit;
462 }
463
464 ret = ldap_search_sW( ld, baseW, scope, filterW, attrsW, attrsonly, res );
465
466exit:
467 strfreeW( baseW );
468 strfreeW( filterW );
469 strarrayfreeW( attrsW );
470
471#endif
472 return ret;
473}
ULONG CDECL ldap_search_sW(WLDAP32_LDAP *ld, PWCHAR base, ULONG scope, PWCHAR filter, PWCHAR attrs[], ULONG attrsonly, WLDAP32_LDAPMessage **res)
Definition: search.c:497

◆ ldap_search_stA()

ULONG CDECL ldap_search_stA ( WLDAP32_LDAP ld,
const  PCHAR,
ULONG  scope,
const  PCHAR,
PCHAR  attrs[],
ULONG  attrsonly,
struct l_timeval timeout,
WLDAP32_LDAPMessage **  res 
)

Definition at line 541 of file search.c.

544{
546#ifdef HAVE_LDAP
547 WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL;
548
550
551 TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x, %p, %p)\n", ld,
552 debugstr_a(base), scope, debugstr_a(filter), attrs,
553 attrsonly, timeout, res );
554
555 if (!ld || !res) return WLDAP32_LDAP_PARAM_ERROR;
556
557 if (base) {
558 baseW = strAtoW( base );
559 if (!baseW) goto exit;
560 }
561 if (filter) {
562 filterW = strAtoW( filter );
563 if (!filterW) goto exit;
564 }
565 if (attrs) {
566 attrsW = strarrayAtoW( attrs );
567 if (!attrsW) goto exit;
568 }
569
570 ret = ldap_search_stW( ld, baseW, scope, filterW, attrsW, attrsonly,
571 timeout, res );
572
573exit:
574 strfreeW( baseW );
575 strfreeW( filterW );
576 strarrayfreeW( attrsW );
577
578#endif
579 return ret;
580}
ULONG CDECL ldap_search_stW(WLDAP32_LDAP *ld, const PWCHAR base, ULONG scope, const PWCHAR filter, PWCHAR attrs[], ULONG attrsonly, struct l_timeval *timeout, WLDAP32_LDAPMessage **res)
Definition: search.c:605

◆ ldap_search_stW()

ULONG CDECL ldap_search_stW ( WLDAP32_LDAP ld,
const  PWCHAR,
ULONG  scope,
const  PWCHAR,
PWCHAR  attrs[],
ULONG  attrsonly,
struct l_timeval timeout,
WLDAP32_LDAPMessage **  res 
)

Definition at line 605 of file search.c.

608{
610#ifdef HAVE_LDAP
611 char *baseU = NULL, *filterU = NULL, **attrsU = NULL;
612
614
615 TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x, %p, %p)\n", ld,
616 debugstr_w(base), scope, debugstr_w(filter), attrs,
617 attrsonly, timeout, res );
618
619 if (!ld || !res) return WLDAP32_LDAP_PARAM_ERROR;
620
621 if (base) {
622 baseU = strWtoU( base );
623 if (!baseU) goto exit;
624 }
625 if (filter) {
626 filterU = strWtoU( filter );
627 if (!filterU) goto exit;
628 }
629 if (attrs) {
630 attrsU = strarrayWtoU( attrs );
631 if (!attrsU) goto exit;
632 }
633
634 ret = map_error( ldap_search_ext_s( ld, baseU, scope, filterU, attrsU, attrsonly,
635 NULL, NULL, (struct timeval *)timeout, 0, res ));
636
637exit:
638 strfreeU( baseU );
639 strfreeU( filterU );
640 strarrayfreeU( attrsU );
641
642#endif
643 return ret;
644}

◆ ldap_search_sW()

ULONG CDECL ldap_search_sW ( WLDAP32_LDAP ld,
PWCHAR  base,
ULONG  scope,
PWCHAR  filter,
PWCHAR  attrs[],
ULONG  attrsonly,
WLDAP32_LDAPMessage **  res 
)

Definition at line 497 of file search.c.

499{
501#ifdef HAVE_LDAP
502 char *baseU = NULL, *filterU = NULL, **attrsU = NULL;
503
505
506 TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x, %p)\n", ld, debugstr_w(base),
507 scope, debugstr_w(filter), attrs, attrsonly, res );
508
509 if (!ld || !res) return WLDAP32_LDAP_PARAM_ERROR;
510
511 if (base) {
512 baseU = strWtoU( base );
513 if (!baseU) goto exit;
514 }
515 if (filter) {
516 filterU = strWtoU( filter );
517 if (!filterU) goto exit;
518 }
519 if (attrs) {
520 attrsU = strarrayWtoU( attrs );
521 if (!attrsU) goto exit;
522 }
523
524 ret = map_error( ldap_search_ext_s( ld, baseU, scope, filterU, attrsU, attrsonly,
525 NULL, NULL, NULL, 0, res ));
526
527exit:
528 strfreeU( baseU );
529 strfreeU( filterU );
530 strarrayfreeU( attrsU );
531
532#endif
533 return ret;
534}

◆ ldap_searchA()

ULONG CDECL ldap_searchA ( WLDAP32_LDAP ld,
PCHAR  base,
ULONG  scope,
PCHAR  filter,
PCHAR  attrs[],
ULONG  attrsonly 
)

Definition at line 44 of file search.c.

46{
48#ifdef HAVE_LDAP
49 WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL;
50
52
53 TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x)\n", ld, debugstr_a(base),
54 scope, debugstr_a(filter), attrs, attrsonly );
55
56 if (!ld) return ~0u;
57
58 if (base) {
59 baseW = strAtoW( base );
60 if (!baseW) goto exit;
61 }
62 if (filter) {
63 filterW = strAtoW( filter );
64 if (!filterW) goto exit;
65 }
66 if (attrs) {
67 attrsW = strarrayAtoW( attrs );
68 if (!attrsW) goto exit;
69 }
70
71 ret = ldap_searchW( ld, baseW, scope, filterW, attrsW, attrsonly );
72
73exit:
74 strfreeW( baseW );
75 strfreeW( filterW );
76 strarrayfreeW( attrsW );
77
78#endif
79 return ret;
80}
ULONG CDECL ldap_searchW(WLDAP32_LDAP *ld, PWCHAR base, ULONG scope, PWCHAR filter, PWCHAR attrs[], ULONG attrsonly)
Definition: search.c:105

◆ ldap_searchW()

ULONG CDECL ldap_searchW ( WLDAP32_LDAP ld,
PWCHAR  base,
ULONG  scope,
PWCHAR  filter,
PWCHAR  attrs[],
ULONG  attrsonly 
)

Definition at line 105 of file search.c.

107{
109#ifdef HAVE_LDAP
110 char *baseU = NULL, *filterU = NULL, **attrsU = NULL;
111 int msg;
112
114
115 TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x)\n", ld, debugstr_w(base),
116 scope, debugstr_w(filter), attrs, attrsonly );
117
118 if (!ld) return ~0u;
119
120 if (base) {
121 baseU = strWtoU( base );
122 if (!baseU) goto exit;
123 }
124 if (filter) {
125 filterU = strWtoU( filter );
126 if (!filterU) goto exit;
127 }
128 if (attrs) {
129 attrsU = strarrayWtoU( attrs );
130 if (!attrsU) goto exit;
131 }
132
133 ret = ldap_search_ext( ld, baseU, scope, filterU, attrsU, attrsonly,
134 NULL, NULL, NULL, 0, &msg );
135
136 if (ret == LDAP_SUCCESS)
137 ret = msg;
138 else
139 ret = ~0u;
140
141exit:
142 strfreeU( baseU );
143 strfreeU( filterU );
144 strarrayfreeU( attrsU );
145
146#endif
147 return ret;
148}

◆ ldap_set_optionA()

ULONG CDECL ldap_set_optionA ( WLDAP32_LDAP ld,
int  option,
void value 
)

Definition at line 313 of file option.c.

314{
316#ifdef HAVE_LDAP
317
318 TRACE( "(%p, 0x%08x, %p)\n", ld, option, value );
319
320 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
321
322 switch (option)
323 {
325 {
326 LDAPControlW **ctrlsW;
327
328 ctrlsW = controlarrayAtoW( value );
329 if (!ctrlsW) return WLDAP32_LDAP_NO_MEMORY;
330
331 ret = ldap_set_optionW( ld, option, ctrlsW );
332 controlarrayfreeW( ctrlsW );
333 return ret;
334 }
342 return ldap_set_optionW( ld, option, value );
343
353
357
387 FIXME( "Unsupported option: 0x%02x\n", option );
389
390 default:
391 FIXME( "Unknown option: 0x%02x\n", option );
393 }
394
395#endif
396 return ret;
397}
ULONG CDECL ldap_set_optionW(WLDAP32_LDAP *ld, int option, void *value)
Definition: option.c:416

◆ ldap_set_optionW()

ULONG CDECL ldap_set_optionW ( WLDAP32_LDAP ld,
int  option,
void value 
)

Definition at line 416 of file option.c.

417{
419#ifdef HAVE_LDAP
420
421 TRACE( "(%p, 0x%08x, %p)\n", ld, option, value );
422
423 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
424
425 switch (option)
426 {
428 {
429 LDAPControl **ctrlsU;
430
431 ctrlsU = controlarrayWtoU( value );
432 if (!ctrlsU) return WLDAP32_LDAP_NO_MEMORY;
433
434 ret = map_error( ldap_set_option( ld, option, ctrlsU ));
435 controlarrayfreeU( ctrlsU );
436 return ret;
437 }
445 return map_error( ldap_set_option( ld, option, value ));
446
456
460
490 FIXME( "Unsupported option: 0x%02x\n", option );
492
493 default:
494 FIXME( "Unknown option: 0x%02x\n", option );
496 }
497
498#endif
499 return ret;
500}
#define ldap_set_option
Definition: winldap.h:641

Referenced by ldap_set_optionA(), and test_ldap_set_optionW().

◆ ldap_simple_bind_sA()

ULONG CDECL ldap_simple_bind_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  passwd 
)

Definition at line 561 of file bind.c.

562{
564#ifdef HAVE_LDAP
565 WCHAR *dnW = NULL, *passwdW = NULL;
566
568
569 TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), passwd );
570
571 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
572
573 if (dn) {
574 dnW = strAtoW( dn );
575 if (!dnW) goto exit;
576 }
577 if (passwd) {
578 passwdW = strAtoW( passwd );
579 if (!passwdW) goto exit;
580 }
581
582 ret = ldap_simple_bind_sW( ld, dnW, passwdW );
583
584exit:
585 strfreeW( dnW );
586 strfreeW( passwdW );
587
588#endif
589 return ret;
590}
ULONG CDECL ldap_simple_bind_sW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR passwd)
Definition: bind.c:609

◆ ldap_simple_bind_sW()

ULONG CDECL ldap_simple_bind_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  passwd 
)

Definition at line 609 of file bind.c.

610{
612#ifdef HAVE_LDAP
613 char *dnU = NULL, *passwdU = NULL;
614 struct berval pwd = { 0, NULL };
615
617
618 TRACE( "(%p, %s, %p)\n", ld, debugstr_w(dn), passwd );
619
620 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
621
622 if (dn) {
623 dnU = strWtoU( dn );
624 if (!dnU) goto exit;
625 }
626 if (passwd) {
627 passwdU = strWtoU( passwd );
628 if (!passwdU) goto exit;
629
630 pwd.bv_len = strlen( passwdU );
631 pwd.bv_val = passwdU;
632 }
633
634 ret = map_error( ldap_sasl_bind_s( ld, dnU, LDAP_SASL_SIMPLE, &pwd, NULL, NULL, NULL ));
635
636exit:
637 strfreeU( dnU );
638 strfreeU( passwdU );
639
640#endif
641 return ret;
642}

Referenced by ldap_simple_bind_sA().

◆ ldap_simple_bindA()

ULONG CDECL ldap_simple_bindA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  passwd 
)

Definition at line 467 of file bind.c.

468{
470#ifdef HAVE_LDAP
471 WCHAR *dnW = NULL, *passwdW = NULL;
472
474
475 TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), passwd );
476
477 if (!ld) return ~0u;
478
479 if (dn) {
480 dnW = strAtoW( dn );
481 if (!dnW) goto exit;
482 }
483 if (passwd) {
484 passwdW = strAtoW( passwd );
485 if (!passwdW) goto exit;
486 }
487
488 ret = ldap_simple_bindW( ld, dnW, passwdW );
489
490exit:
491 strfreeW( dnW );
492 strfreeW( passwdW );
493
494#endif
495 return ret;
496}
ULONG CDECL ldap_simple_bindW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR passwd)
Definition: bind.c:515

◆ ldap_simple_bindW()

ULONG CDECL ldap_simple_bindW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  passwd 
)

Definition at line 515 of file bind.c.

516{
518#ifdef HAVE_LDAP
519 char *dnU = NULL, *passwdU = NULL;
520 struct berval pwd = { 0, NULL };
521 int msg;
522
524
525 TRACE( "(%p, %s, %p)\n", ld, debugstr_w(dn), passwd );
526
527 if (!ld) return ~0u;
528
529 if (dn) {
530 dnU = strWtoU( dn );
531 if (!dnU) goto exit;
532 }
533 if (passwd) {
534 passwdU = strWtoU( passwd );
535 if (!passwdU) goto exit;
536
537 pwd.bv_len = strlen( passwdU );
538 pwd.bv_val = passwdU;
539 }
540
541 ret = ldap_sasl_bind( ld, dnU, LDAP_SASL_SIMPLE, &pwd, NULL, NULL, &msg );
542
543 if (ret == LDAP_SUCCESS)
544 ret = msg;
545 else
546 ret = ~0u;
547
548exit:
549 strfreeU( dnU );
550 strfreeU( passwdU );
551
552#endif
553 return ret;
554}

Referenced by ldap_simple_bindA().

◆ ldap_sslinitA()

WLDAP32_LDAP *CDECL ldap_sslinitA ( PCHAR  hostname,
ULONG  portnumber,
int  secure 
)

Definition at line 496 of file init.c.

497{
498#ifdef HAVE_LDAP
499 WLDAP32_LDAP *ld;
500 WCHAR *hostnameW = NULL;
501
502 TRACE( "(%s, %d, 0x%08x)\n", debugstr_a(hostname), portnumber, secure );
503
504 if (hostname) {
505 hostnameW = strAtoW( hostname );
506 if (!hostnameW) return NULL;
507 }
508
509 ld = ldap_sslinitW( hostnameW, portnumber, secure );
510
511 strfreeW( hostnameW );
512 return ld;
513
514#else
515 return NULL;
516#endif
517}
WLDAP32_LDAP *CDECL ldap_sslinitW(PWCHAR hostname, ULONG portnumber, int secure)
Definition: init.c:542
static int secure
Definition: server.c:138

◆ ldap_sslinitW()

WLDAP32_LDAP *CDECL ldap_sslinitW ( PWCHAR  hostname,
ULONG  portnumber,
int  secure 
)

Definition at line 542 of file init.c.

543{
544#ifdef HAVE_LDAP
545 WLDAP32_LDAP *ld = NULL;
546 char *hostnameU = NULL, *url = NULL;
547
548 TRACE( "(%s, %d, 0x%08x)\n", debugstr_w(hostname), portnumber, secure );
549
550 if (hostname) {
551 hostnameU = strWtoU( hostname );
552 if (!hostnameU) goto exit;
553 }
554 else {
555 hostnameU = strWtoU( defaulthost );
556 if (!hostnameU) goto exit;
557 }
558
559 if (secure)
560 url = urlify_hostnames( "ldaps://", hostnameU, portnumber );
561 else
562 url = urlify_hostnames( "ldap://", hostnameU, portnumber );
563
564 if (!url) goto exit;
565 ldap_initialize( &ld, url );
566
567exit:
568 strfreeU( hostnameU );
569 strfreeU( url );
570 return ld;
571
572#else
573 return NULL;
574#endif
575}

◆ ldap_start_tls_sA()

ULONG CDECL ldap_start_tls_sA ( WLDAP32_PLDAP  ,
PULONG  ,
WLDAP32_LDAPMessage **  ,
PLDAPControlA ,
PLDAPControlA  
)

◆ ldap_start_tls_sW()

ULONG CDECL ldap_start_tls_sW ( WLDAP32_PLDAP  ,
PULONG  ,
WLDAP32_LDAPMessage **  ,
PLDAPControlW ,
PLDAPControlW  
)

◆ ldap_startup()

ULONG CDECL ldap_startup ( PLDAP_VERSION_INFO  version,
HANDLE instance 
)

Definition at line 668 of file init.c.

669{
670 TRACE( "(%p, %p)\n", version, instance );
672}
static const WCHAR version[]
Definition: asmname.c:66

◆ ldap_stop_tls_s()

BOOLEAN CDECL ldap_stop_tls_s ( WLDAP32_PLDAP  )

◆ ldap_ufn2dnA()

ULONG CDECL ldap_ufn2dnA ( PCHAR  ufn,
PCHAR dn 
)

Definition at line 229 of file dn.c.

230{
232#ifdef HAVE_LDAP
233 PWCHAR ufnW = NULL, dnW = NULL;
234
235 TRACE( "(%s, %p)\n", debugstr_a(ufn), dn );
236
237 if (!dn) return WLDAP32_LDAP_PARAM_ERROR;
238
239 *dn = NULL;
240
241 if (ufn) {
242 ufnW = strAtoW( ufn );
243 if (!ufnW) return WLDAP32_LDAP_NO_MEMORY;
244 }
245
246 ret = ldap_ufn2dnW( ufnW, &dnW );
247
248 if (dnW) {
249 *dn = strWtoA( dnW );
250 if (!*dn) ret = WLDAP32_LDAP_NO_MEMORY;
251 }
252
253 strfreeW( ufnW );
254 ldap_memfreeW( dnW );
255
256#endif
257 return ret;
258}
ULONG CDECL ldap_ufn2dnW(PWCHAR ufn, PWCHAR *dn)
Definition: dn.c:276

◆ ldap_ufn2dnW()

ULONG CDECL ldap_ufn2dnW ( PWCHAR  ufn,
PWCHAR dn 
)

Definition at line 276 of file dn.c.

277{
279#ifdef HAVE_LDAP
280 char *ufnU = NULL;
281
282 TRACE( "(%s, %p)\n", debugstr_w(ufn), dn );
283
284 if (!dn) return WLDAP32_LDAP_PARAM_ERROR;
285
286 *dn = NULL;
287
288 if (ufn) {
289 ufnU = strWtoU( ufn );
290 if (!ufnU) return WLDAP32_LDAP_NO_MEMORY;
291
292 /* FIXME: do more than just a copy */
293 *dn = strUtoW( ufnU );
294 if (!*dn) ret = WLDAP32_LDAP_NO_MEMORY;
295 }
296
297 strfreeU( ufnU );
298
299#endif
300 return ret;
301}

◆ ldap_value_freeA()

ULONG CDECL ldap_value_freeA ( PCHAR vals)

Definition at line 344 of file value.c.

345{
346 TRACE( "(%p)\n", vals );
347
348 strarrayfreeA( vals );
350}
static void strarrayfreeA(LPSTR *strarray)
Definition: wldap32.h:214

◆ ldap_value_freeW()

ULONG CDECL ldap_value_freeW ( PWCHAR vals)

Definition at line 364 of file value.c.

365{
366 TRACE( "(%p)\n", vals );
367
368 strarrayfreeW( vals );
370}

◆ LdapGetLastError()

ULONG CDECL LdapGetLastError ( void  )

Definition at line 184 of file error.c.

185{
186 TRACE( "\n" );
187 return GetLastError();
188}
DWORD WINAPI GetLastError(void)
Definition: except.c:1042

◆ LdapMapErrorToWin32()

ULONG CDECL LdapMapErrorToWin32 ( ULONG  err)

Definition at line 302 of file error.c.

303{
304 TRACE( "(0x%08x)\n", err );
305
308 return WLDAP32_errormap[err];
309}
#define ARRAY_SIZE(A)
Definition: main.h:20
static const ULONG WLDAP32_errormap[]
Definition: error.c:190
#define ERROR_DS_GENERIC_ERROR
Definition: winerror.h:1575

◆ LdapUnicodeToUTF8()

int CDECL LdapUnicodeToUTF8 ( LPCWSTR  src,
int  srclen,
LPSTR  dst,
int  dstlen 
)

Definition at line 636 of file misc.c.

637{
639}
#define WideCharToMultiByte
Definition: compat.h:111
#define CP_UTF8
Definition: nls.h:20

◆ LdapUTF8ToUnicode()

int CDECL LdapUTF8ToUnicode ( LPCSTR  src,
int  srclen,
LPWSTR  dst,
int  dstlen 
)

Definition at line 658 of file misc.c.

659{
661}
#define MultiByteToWideChar
Definition: compat.h:110

◆ WLDAP32_ldap_abandon()

ULONG CDECL WLDAP32_ldap_abandon ( WLDAP32_LDAP ld,
ULONG  msgid 
)

Definition at line 53 of file misc.c.

54{
56#ifdef HAVE_LDAP
57
58 TRACE( "(%p, 0x%08x)\n", ld, msgid );
59
60 if (!ld) return ~0u;
61 ret = map_error( ldap_abandon_ext( ld, msgid, NULL, NULL ));
62
63#endif
64 return ret;
65}

◆ WLDAP32_ldap_count_entries()

ULONG CDECL WLDAP32_ldap_count_entries ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage res 
)

Definition at line 156 of file misc.c.

157{
159#ifdef HAVE_LDAP
160
161 TRACE( "(%p, %p)\n", ld, res );
162
163 if (!ld) return ~0u;
164 ret = ldap_count_entries( ld, res );
165
166#endif
167 return ret;
168}
WINLDAPAPI ULONG ldap_count_entries(LDAP *, LDAPMessage *)

◆ WLDAP32_ldap_count_references()

ULONG CDECL WLDAP32_ldap_count_references ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage res 
)

Definition at line 183 of file misc.c.

184{
186#ifdef HAVE_LDAP_COUNT_REFERENCES
187
188 TRACE( "(%p, %p)\n", ld, res );
189
190 if (!ld) return 0;
192
193#endif
194 return ret;
195}
WINLDAPAPI ULONG ldap_count_references(LDAP *, LDAPMessage *)

◆ WLDAP32_ldap_count_values_len()

ULONG CDECL WLDAP32_ldap_count_values_len ( PBERVAL )

◆ WLDAP32_ldap_first_entry()

WLDAP32_LDAPMessage *CDECL WLDAP32_ldap_first_entry ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage res 
)

Definition at line 361 of file misc.c.

362{
363#ifdef HAVE_LDAP
364
365 TRACE( "(%p, %p)\n", ld, res );
366
367 if (!ld || !res) return NULL;
368 return ldap_first_entry( ld, res );
369
370#else
371 return NULL;
372#endif
373}
WINLDAPAPI PLDAPMessage ldap_first_entry(LDAP *, LDAPMessage *)

◆ WLDAP32_ldap_first_reference()

WLDAP32_LDAPMessage *CDECL WLDAP32_ldap_first_reference ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage res 
)

Definition at line 388 of file misc.c.

389{
390#ifdef HAVE_LDAP_FIRST_REFERENCE
391
392 TRACE( "(%p, %p)\n", ld, res );
393
394 if (!ld) return NULL;
395 return ldap_first_reference( ld, res );
396
397#else
398 return NULL;
399#endif
400}
WINLDAPAPI PLDAPMessage ldap_first_reference(LDAP *, LDAPMessage *)

◆ WLDAP32_ldap_msgfree()

ULONG CDECL WLDAP32_ldap_msgfree ( WLDAP32_LDAPMessage res)

Definition at line 435 of file misc.c.

436{
438#ifdef HAVE_LDAP
439
440 TRACE( "(%p)\n", res );
441 ldap_msgfree( res );
442
443#endif
444 return ret;
445}
WINLDAPAPI ULONG ldap_msgfree(LDAPMessage *)

◆ WLDAP32_ldap_next_entry()

WLDAP32_LDAPMessage *CDECL WLDAP32_ldap_next_entry ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage entry 
)

Definition at line 524 of file misc.c.

525{
526#ifdef HAVE_LDAP
527
528 TRACE( "(%p, %p)\n", ld, entry );
529
530 if (!ld || !entry) return NULL;
531 return ldap_next_entry( ld, entry );
532
533#else
534 return NULL;
535#endif
536}
WINLDAPAPI PLDAPMessage ldap_next_entry(LDAP *, LDAPMessage *)

◆ WLDAP32_ldap_next_reference()

WLDAP32_LDAPMessage *CDECL WLDAP32_ldap_next_reference ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage entry 
)

Definition at line 554 of file misc.c.

555{
556#ifdef HAVE_LDAP_NEXT_REFERENCE
557
558 TRACE( "(%p, %p)\n", ld, entry );
559
560 if (!ld || !entry) return NULL;
561 return ldap_next_reference( ld, entry );
562
563#else
564 return NULL;
565#endif
566}
WINLDAPAPI PLDAPMessage ldap_next_reference(LDAP *, LDAPMessage *)

◆ WLDAP32_ldap_perror()

void CDECL WLDAP32_ldap_perror ( WLDAP32_LDAP ld,
const  PCHAR 
)

Definition at line 130 of file error.c.

131{
132 TRACE( "(%p, %s)\n", ld, debugstr_a(msg) );
133}

◆ WLDAP32_ldap_result()

ULONG CDECL WLDAP32_ldap_result ( WLDAP32_LDAP ld,
ULONG  msgid,
ULONG  all,
struct l_timeval timeout,
WLDAP32_LDAPMessage **  res 
)

Definition at line 604 of file misc.c.

606{
608#ifdef HAVE_LDAP
609
610 TRACE( "(%p, 0x%08x, 0x%08x, %p, %p)\n", ld, msgid, all, timeout, res );
611
612 if (!ld || !res || msgid == ~0u) return ~0u;
613 ret = ldap_result( ld, msgid, all, (struct timeval *)timeout, res );
614
615#endif
616 return ret;
617}
WINLDAPAPI ULONG ldap_result(LDAP *, ULONG, ULONG, struct l_timeval *, LDAPMessage **)

◆ WLDAP32_ldap_result2error()

ULONG CDECL WLDAP32_ldap_result2error ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage res,
ULONG  free 
)

Definition at line 152 of file error.c.

153{
155#ifdef HAVE_LDAP
156 int error;
157
158 TRACE( "(%p, %p, 0x%08x)\n", ld, res, free );
159
160 if (!ld || !res) return ~0u;
161
163
164 if (ret == LDAP_SUCCESS)
165 ret = error;
166 else
167 ret = ~0u;
168
169#endif
170 return ret;
171}

◆ WLDAP32_ldap_unbind()

ULONG CDECL WLDAP32_ldap_unbind ( WLDAP32_LDAP ld)

Definition at line 656 of file bind.c.

657{
659#ifdef HAVE_LDAP
660
661 TRACE( "(%p)\n", ld );
662
663 if (ld)
664 ret = map_error( ldap_unbind_ext( ld, NULL, NULL ));
665 else
667
668#endif
669 return ret;
670}

◆ WLDAP32_ldap_unbind_s()

ULONG CDECL WLDAP32_ldap_unbind_s ( WLDAP32_LDAP ld)

Definition at line 684 of file bind.c.

685{
687#ifdef HAVE_LDAP
688
689 TRACE( "(%p)\n", ld );
690
691 if (ld)
692 ret = map_error( ldap_unbind_ext_s( ld, NULL, NULL ));
693 else
695
696#endif
697 return ret;
698}

◆ WLDAP32_ldap_value_free_len()

ULONG CDECL WLDAP32_ldap_value_free_len ( struct WLDAP32_berval **  vals)

Definition at line 328 of file value.c.

329{
330#ifdef HAVE_LDAP
331
332 TRACE( "(%p)\n", vals );
333 ldap_value_free_len( (struct berval **)vals );
334
335#endif
337}

Variable Documentation

◆ LDAP_CONTROL_VLVRESPONSE_W

const WCHAR LDAP_CONTROL_VLVRESPONSE_W[] = {'2','.','1','6','.','8','4','0','.','1','.','1','1','3','7','3','0','.','3','.','4','.','1','0',0}
static

Definition at line 204 of file winldap_private.h.

◆ LDAP_PAGED_RESULT_OID_STRING_W

const WCHAR LDAP_PAGED_RESULT_OID_STRING_W[] = {'1','.','2','.','8','4','0','.','1','1','3','5','5','6','.','1','.','4','.','3','1','9',0}
static

Definition at line 202 of file winldap_private.h.

◆ LDAP_SERVER_RESP_SORT_OID_W

const WCHAR LDAP_SERVER_RESP_SORT_OID_W[] = {'1','.','2','.','8','4','0','.','1','1','3','5','5','6','.','1','.','4','.','4','7','4',0}
static

Definition at line 203 of file winldap_private.h.