2005-07-19 22:32:46 +02:00
|
|
|
/*
|
|
|
|
* WLDAP32 - LDAP support for Wine
|
|
|
|
*
|
|
|
|
* Copyright 2005 Hans Leidekker
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2005-07-19 22:32:46 +02:00
|
|
|
*/
|
|
|
|
|
2018-02-20 12:06:10 +01:00
|
|
|
#include "wine/heap.h"
|
2015-11-23 10:56:39 +01:00
|
|
|
#include "wine/unicode.h"
|
|
|
|
|
2011-05-25 19:09:54 +02:00
|
|
|
extern HINSTANCE hwldap32 DECLSPEC_HIDDEN;
|
|
|
|
|
|
|
|
ULONG map_error( int ) DECLSPEC_HIDDEN;
|
2008-10-06 15:47:28 +02:00
|
|
|
|
2005-07-19 22:32:46 +02:00
|
|
|
/* A set of helper functions to convert LDAP data structures
|
|
|
|
* to and from ansi (A), wide character (W) and utf8 (U) encodings.
|
|
|
|
*/
|
|
|
|
|
2005-11-18 17:56:44 +01:00
|
|
|
static inline char *strdupU( const char *src )
|
|
|
|
{
|
|
|
|
char *dst;
|
|
|
|
if (!src) return NULL;
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((dst = heap_alloc( (strlen( src ) + 1) * sizeof(char) ))) strcpy( dst, src );
|
2005-11-18 17:56:44 +01:00
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
2015-11-23 10:56:39 +01:00
|
|
|
static inline WCHAR *strdupW( const WCHAR *src )
|
|
|
|
{
|
|
|
|
WCHAR *dst;
|
|
|
|
if (!src) return NULL;
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((dst = heap_alloc( (strlenW( src ) + 1) * sizeof(WCHAR) ))) strcpyW( dst, src );
|
2015-11-23 10:56:39 +01:00
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
2005-07-19 22:32:46 +02:00
|
|
|
static inline LPWSTR strAtoW( LPCSTR str )
|
|
|
|
{
|
|
|
|
LPWSTR ret = NULL;
|
|
|
|
if (str)
|
|
|
|
{
|
|
|
|
DWORD len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 );
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((ret = heap_alloc( len * sizeof(WCHAR) )))
|
2005-07-19 22:32:46 +02:00
|
|
|
MultiByteToWideChar( CP_ACP, 0, str, -1, ret, len );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LPSTR strWtoA( LPCWSTR str )
|
|
|
|
{
|
|
|
|
LPSTR ret = NULL;
|
|
|
|
if (str)
|
|
|
|
{
|
|
|
|
DWORD len = WideCharToMultiByte( CP_ACP, 0, str, -1, NULL, 0, NULL, NULL );
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((ret = heap_alloc( len )))
|
2005-07-19 22:32:46 +02:00
|
|
|
WideCharToMultiByte( CP_ACP, 0, str, -1, ret, len, NULL, NULL );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline char *strWtoU( LPCWSTR str )
|
|
|
|
{
|
|
|
|
LPSTR ret = NULL;
|
|
|
|
if (str)
|
|
|
|
{
|
|
|
|
DWORD len = WideCharToMultiByte( CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL );
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((ret = heap_alloc( len )))
|
2005-07-19 22:32:46 +02:00
|
|
|
WideCharToMultiByte( CP_UTF8, 0, str, -1, ret, len, NULL, NULL );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LPWSTR strUtoW( char *str )
|
|
|
|
{
|
|
|
|
LPWSTR ret = NULL;
|
|
|
|
if (str)
|
|
|
|
{
|
|
|
|
DWORD len = MultiByteToWideChar( CP_UTF8, 0, str, -1, NULL, 0 );
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((ret = heap_alloc( len * sizeof(WCHAR) )))
|
2005-07-19 22:32:46 +02:00
|
|
|
MultiByteToWideChar( CP_UTF8, 0, str, -1, ret, len );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2020-03-23 14:14:15 +01:00
|
|
|
static inline LPWSTR strnAtoW( LPCSTR str, DWORD inlen, DWORD *outlen )
|
|
|
|
{
|
|
|
|
LPWSTR ret = NULL;
|
|
|
|
*outlen = 0;
|
|
|
|
if (str)
|
|
|
|
{
|
|
|
|
DWORD len = MultiByteToWideChar( CP_ACP, 0, str, inlen, NULL, 0 );
|
|
|
|
if ((ret = heap_alloc( len * sizeof(WCHAR) )))
|
|
|
|
{
|
|
|
|
MultiByteToWideChar( CP_ACP, 0, str, inlen, ret, len );
|
|
|
|
*outlen = len;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline char *strnWtoU( LPCWSTR str, DWORD inlen, DWORD *outlen )
|
|
|
|
{
|
|
|
|
LPSTR ret = NULL;
|
|
|
|
*outlen = 0;
|
|
|
|
if (str)
|
|
|
|
{
|
|
|
|
DWORD len = WideCharToMultiByte( CP_UTF8, 0, str, inlen, NULL, 0, NULL, NULL );
|
|
|
|
if ((ret = heap_alloc( len )))
|
|
|
|
{
|
|
|
|
WideCharToMultiByte( CP_UTF8, 0, str, inlen, ret, len, NULL, NULL );
|
|
|
|
*outlen = len;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2005-07-19 22:32:46 +02:00
|
|
|
static inline void strfreeA( LPSTR str )
|
|
|
|
{
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( str );
|
2005-07-19 22:32:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline void strfreeW( LPWSTR str )
|
|
|
|
{
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( str );
|
2005-07-19 22:32:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline void strfreeU( char *str )
|
|
|
|
{
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( str );
|
2005-07-19 22:32:46 +02:00
|
|
|
}
|
2005-07-21 13:01:29 +02:00
|
|
|
|
|
|
|
static inline DWORD strarraylenA( LPSTR *strarray )
|
|
|
|
{
|
|
|
|
LPSTR *p = strarray;
|
|
|
|
while (*p) p++;
|
|
|
|
return p - strarray;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline DWORD strarraylenW( LPWSTR *strarray )
|
|
|
|
{
|
|
|
|
LPWSTR *p = strarray;
|
|
|
|
while (*p) p++;
|
|
|
|
return p - strarray;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline DWORD strarraylenU( char **strarray )
|
|
|
|
{
|
|
|
|
char **p = strarray;
|
|
|
|
while (*p) p++;
|
|
|
|
return p - strarray;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LPWSTR *strarrayAtoW( LPSTR *strarray )
|
|
|
|
{
|
|
|
|
LPWSTR *strarrayW = NULL;
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
if (strarray)
|
|
|
|
{
|
|
|
|
size = sizeof(WCHAR*) * (strarraylenA( strarray ) + 1);
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((strarrayW = heap_alloc( size )))
|
2005-07-21 13:01:29 +02:00
|
|
|
{
|
|
|
|
LPSTR *p = strarray;
|
|
|
|
LPWSTR *q = strarrayW;
|
|
|
|
|
|
|
|
while (*p) *q++ = strAtoW( *p++ );
|
|
|
|
*q = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return strarrayW;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LPSTR *strarrayWtoA( LPWSTR *strarray )
|
|
|
|
{
|
|
|
|
LPSTR *strarrayA = NULL;
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
if (strarray)
|
|
|
|
{
|
|
|
|
size = sizeof(LPSTR) * (strarraylenW( strarray ) + 1);
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((strarrayA = heap_alloc( size )))
|
2005-07-21 13:01:29 +02:00
|
|
|
{
|
|
|
|
LPWSTR *p = strarray;
|
|
|
|
LPSTR *q = strarrayA;
|
|
|
|
|
|
|
|
while (*p) *q++ = strWtoA( *p++ );
|
|
|
|
*q = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return strarrayA;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline char **strarrayWtoU( LPWSTR *strarray )
|
|
|
|
{
|
|
|
|
char **strarrayU = NULL;
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
if (strarray)
|
|
|
|
{
|
|
|
|
size = sizeof(char*) * (strarraylenW( strarray ) + 1);
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((strarrayU = heap_alloc( size )))
|
2005-07-21 13:01:29 +02:00
|
|
|
{
|
|
|
|
LPWSTR *p = strarray;
|
|
|
|
char **q = strarrayU;
|
|
|
|
|
|
|
|
while (*p) *q++ = strWtoU( *p++ );
|
|
|
|
*q = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return strarrayU;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LPWSTR *strarrayUtoW( char **strarray )
|
|
|
|
{
|
|
|
|
LPWSTR *strarrayW = NULL;
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
if (strarray)
|
|
|
|
{
|
|
|
|
size = sizeof(WCHAR*) * (strarraylenU( strarray ) + 1);
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((strarrayW = heap_alloc( size )))
|
2005-07-21 13:01:29 +02:00
|
|
|
{
|
|
|
|
char **p = strarray;
|
|
|
|
LPWSTR *q = strarrayW;
|
|
|
|
|
|
|
|
while (*p) *q++ = strUtoW( *p++ );
|
|
|
|
*q = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return strarrayW;
|
|
|
|
}
|
|
|
|
|
2020-04-17 11:11:54 +02:00
|
|
|
static inline LPWSTR *strarraydupW( LPWSTR *strarray )
|
|
|
|
{
|
|
|
|
LPWSTR *strarrayW = NULL;
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
if (strarray)
|
|
|
|
{
|
|
|
|
size = sizeof(WCHAR*) * (strarraylenW( strarray ) + 1);
|
|
|
|
if ((strarrayW = heap_alloc( size )))
|
|
|
|
{
|
|
|
|
LPWSTR *p = strarray;
|
|
|
|
LPWSTR *q = strarrayW;
|
|
|
|
|
|
|
|
while (*p) *q++ = strdupW( *p++ );
|
|
|
|
*q = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return strarrayW;
|
|
|
|
}
|
|
|
|
|
2005-07-21 13:01:29 +02:00
|
|
|
static inline void strarrayfreeA( LPSTR *strarray )
|
|
|
|
{
|
|
|
|
if (strarray)
|
|
|
|
{
|
|
|
|
LPSTR *p = strarray;
|
|
|
|
while (*p) strfreeA( *p++ );
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( strarray );
|
2005-07-21 13:01:29 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void strarrayfreeW( LPWSTR *strarray )
|
|
|
|
{
|
|
|
|
if (strarray)
|
|
|
|
{
|
|
|
|
LPWSTR *p = strarray;
|
|
|
|
while (*p) strfreeW( *p++ );
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( strarray );
|
2005-07-21 13:01:29 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void strarrayfreeU( char **strarray )
|
|
|
|
{
|
|
|
|
if (strarray)
|
|
|
|
{
|
|
|
|
char **p = strarray;
|
|
|
|
while (*p) strfreeU( *p++ );
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( strarray );
|
2005-07-21 13:01:29 +02:00
|
|
|
}
|
|
|
|
}
|
2005-07-22 21:47:37 +02:00
|
|
|
|
|
|
|
#ifdef HAVE_LDAP
|
|
|
|
|
2005-12-31 13:13:05 +01:00
|
|
|
static inline struct berval *bvdup( struct berval *bv )
|
|
|
|
{
|
|
|
|
struct berval *berval;
|
|
|
|
DWORD size = sizeof(struct berval) + bv->bv_len;
|
|
|
|
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((berval = heap_alloc( size )))
|
2005-12-31 13:13:05 +01:00
|
|
|
{
|
|
|
|
char *val = (char *)berval + sizeof(struct berval);
|
|
|
|
|
|
|
|
berval->bv_len = bv->bv_len;
|
|
|
|
berval->bv_val = val;
|
|
|
|
memcpy( val, bv->bv_val, bv->bv_len );
|
|
|
|
}
|
|
|
|
return berval;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline DWORD bvarraylen( struct berval **bv )
|
|
|
|
{
|
|
|
|
struct berval **p = bv;
|
|
|
|
while (*p) p++;
|
|
|
|
return p - bv;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline struct berval **bvarraydup( struct berval **bv )
|
|
|
|
{
|
|
|
|
struct berval **berval = NULL;
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
if (bv)
|
|
|
|
{
|
|
|
|
size = sizeof(struct berval *) * (bvarraylen( bv ) + 1);
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((berval = heap_alloc( size )))
|
2005-12-31 13:13:05 +01:00
|
|
|
{
|
|
|
|
struct berval **p = bv;
|
|
|
|
struct berval **q = berval;
|
|
|
|
|
|
|
|
while (*p) *q++ = bvdup( *p++ );
|
|
|
|
*q = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return berval;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void bvarrayfree( struct berval **bv )
|
|
|
|
{
|
|
|
|
struct berval **p = bv;
|
2018-02-20 12:06:10 +01:00
|
|
|
while (*p) heap_free( *p++ );
|
|
|
|
heap_free( bv );
|
2005-12-31 13:13:05 +01:00
|
|
|
}
|
|
|
|
|
2005-08-10 15:00:21 +02:00
|
|
|
static inline LDAPModW *modAtoW( LDAPModA *mod )
|
|
|
|
{
|
|
|
|
LDAPModW *modW;
|
|
|
|
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((modW = heap_alloc( sizeof(LDAPModW) )))
|
2005-08-10 15:00:21 +02:00
|
|
|
{
|
|
|
|
modW->mod_op = mod->mod_op;
|
|
|
|
modW->mod_type = strAtoW( mod->mod_type );
|
|
|
|
|
|
|
|
if (mod->mod_op & LDAP_MOD_BVALUES)
|
2005-12-31 13:13:05 +01:00
|
|
|
modW->mod_vals.modv_bvals = bvarraydup( mod->mod_vals.modv_bvals );
|
2005-08-10 15:00:21 +02:00
|
|
|
else
|
|
|
|
modW->mod_vals.modv_strvals = strarrayAtoW( mod->mod_vals.modv_strvals );
|
|
|
|
}
|
|
|
|
return modW;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LDAPMod *modWtoU( LDAPModW *mod )
|
|
|
|
{
|
|
|
|
LDAPMod *modU;
|
|
|
|
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((modU = heap_alloc( sizeof(LDAPMod) )))
|
2005-08-10 15:00:21 +02:00
|
|
|
{
|
|
|
|
modU->mod_op = mod->mod_op;
|
|
|
|
modU->mod_type = strWtoU( mod->mod_type );
|
|
|
|
|
|
|
|
if (mod->mod_op & LDAP_MOD_BVALUES)
|
2005-12-31 13:13:05 +01:00
|
|
|
modU->mod_vals.modv_bvals = bvarraydup( mod->mod_vals.modv_bvals );
|
2005-08-10 15:00:21 +02:00
|
|
|
else
|
|
|
|
modU->mod_vals.modv_strvals = strarrayWtoU( mod->mod_vals.modv_strvals );
|
|
|
|
}
|
|
|
|
return modU;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void modfreeW( LDAPModW *mod )
|
|
|
|
{
|
2005-12-31 13:13:05 +01:00
|
|
|
if (mod->mod_op & LDAP_MOD_BVALUES)
|
|
|
|
bvarrayfree( mod->mod_vals.modv_bvals );
|
|
|
|
else
|
2005-08-10 15:00:21 +02:00
|
|
|
strarrayfreeW( mod->mod_vals.modv_strvals );
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( mod );
|
2005-08-10 15:00:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline void modfreeU( LDAPMod *mod )
|
|
|
|
{
|
2005-12-31 13:13:05 +01:00
|
|
|
if (mod->mod_op & LDAP_MOD_BVALUES)
|
|
|
|
bvarrayfree( mod->mod_vals.modv_bvals );
|
|
|
|
else
|
2005-08-10 15:00:21 +02:00
|
|
|
strarrayfreeU( mod->mod_vals.modv_strvals );
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( mod );
|
2005-08-10 15:00:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline DWORD modarraylenA( LDAPModA **modarray )
|
|
|
|
{
|
|
|
|
LDAPModA **p = modarray;
|
|
|
|
while (*p) p++;
|
|
|
|
return p - modarray;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline DWORD modarraylenW( LDAPModW **modarray )
|
|
|
|
{
|
|
|
|
LDAPModW **p = modarray;
|
|
|
|
while (*p) p++;
|
|
|
|
return p - modarray;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LDAPModW **modarrayAtoW( LDAPModA **modarray )
|
|
|
|
{
|
|
|
|
LDAPModW **modarrayW = NULL;
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
if (modarray)
|
|
|
|
{
|
|
|
|
size = sizeof(LDAPModW*) * (modarraylenA( modarray ) + 1);
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((modarrayW = heap_alloc( size )))
|
2005-08-10 15:00:21 +02:00
|
|
|
{
|
|
|
|
LDAPModA **p = modarray;
|
|
|
|
LDAPModW **q = modarrayW;
|
|
|
|
|
|
|
|
while (*p) *q++ = modAtoW( *p++ );
|
|
|
|
*q = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return modarrayW;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LDAPMod **modarrayWtoU( LDAPModW **modarray )
|
|
|
|
{
|
|
|
|
LDAPMod **modarrayU = NULL;
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
if (modarray)
|
|
|
|
{
|
|
|
|
size = sizeof(LDAPMod*) * (modarraylenW( modarray ) + 1);
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((modarrayU = heap_alloc( size )))
|
2005-08-10 15:00:21 +02:00
|
|
|
{
|
|
|
|
LDAPModW **p = modarray;
|
|
|
|
LDAPMod **q = modarrayU;
|
|
|
|
|
|
|
|
while (*p) *q++ = modWtoU( *p++ );
|
|
|
|
*q = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return modarrayU;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void modarrayfreeW( LDAPModW **modarray )
|
|
|
|
{
|
|
|
|
if (modarray)
|
|
|
|
{
|
|
|
|
LDAPModW **p = modarray;
|
|
|
|
while (*p) modfreeW( *p++ );
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( modarray );
|
2005-08-10 15:00:21 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void modarrayfreeU( LDAPMod **modarray )
|
|
|
|
{
|
|
|
|
if (modarray)
|
|
|
|
{
|
|
|
|
LDAPMod **p = modarray;
|
|
|
|
while (*p) modfreeU( *p++ );
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( modarray );
|
2005-08-10 15:00:21 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-07-22 21:47:37 +02:00
|
|
|
static inline LDAPControlW *controlAtoW( LDAPControlA *control )
|
|
|
|
{
|
|
|
|
LDAPControlW *controlW;
|
2005-12-31 13:13:05 +01:00
|
|
|
DWORD len = control->ldctl_value.bv_len;
|
|
|
|
char *val = NULL;
|
|
|
|
|
|
|
|
if (control->ldctl_value.bv_val)
|
|
|
|
{
|
2018-02-20 12:06:10 +01:00
|
|
|
if (!(val = heap_alloc( len ))) return NULL;
|
2005-12-31 13:13:05 +01:00
|
|
|
memcpy( val, control->ldctl_value.bv_val, len );
|
|
|
|
}
|
2005-07-22 21:47:37 +02:00
|
|
|
|
2018-02-20 12:06:10 +01:00
|
|
|
if (!(controlW = heap_alloc( sizeof(LDAPControlW) )))
|
2005-07-22 21:47:37 +02:00
|
|
|
{
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( val );
|
2005-12-31 13:13:05 +01:00
|
|
|
return NULL;
|
2005-07-22 21:47:37 +02:00
|
|
|
}
|
2005-12-31 13:13:05 +01:00
|
|
|
|
|
|
|
controlW->ldctl_oid = strAtoW( control->ldctl_oid );
|
|
|
|
controlW->ldctl_value.bv_len = len;
|
|
|
|
controlW->ldctl_value.bv_val = val;
|
|
|
|
controlW->ldctl_iscritical = control->ldctl_iscritical;
|
|
|
|
|
2005-07-22 21:47:37 +02:00
|
|
|
return controlW;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LDAPControlA *controlWtoA( LDAPControlW *control )
|
|
|
|
{
|
|
|
|
LDAPControlA *controlA;
|
2005-12-31 13:13:05 +01:00
|
|
|
DWORD len = control->ldctl_value.bv_len;
|
|
|
|
char *val = NULL;
|
|
|
|
|
|
|
|
if (control->ldctl_value.bv_val)
|
|
|
|
{
|
2018-02-20 12:06:10 +01:00
|
|
|
if (!(val = heap_alloc( len ))) return NULL;
|
2005-12-31 13:13:05 +01:00
|
|
|
memcpy( val, control->ldctl_value.bv_val, len );
|
|
|
|
}
|
2005-07-22 21:47:37 +02:00
|
|
|
|
2018-02-20 12:06:10 +01:00
|
|
|
if (!(controlA = heap_alloc( sizeof(LDAPControlA) )))
|
2005-07-22 21:47:37 +02:00
|
|
|
{
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( val );
|
2005-12-31 13:13:05 +01:00
|
|
|
return NULL;
|
2005-07-22 21:47:37 +02:00
|
|
|
}
|
2005-12-31 13:13:05 +01:00
|
|
|
|
|
|
|
controlA->ldctl_oid = strWtoA( control->ldctl_oid );
|
|
|
|
controlA->ldctl_value.bv_len = len;
|
|
|
|
controlA->ldctl_value.bv_val = val;
|
|
|
|
controlA->ldctl_iscritical = control->ldctl_iscritical;
|
|
|
|
|
2005-07-22 21:47:37 +02:00
|
|
|
return controlA;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LDAPControl *controlWtoU( LDAPControlW *control )
|
|
|
|
{
|
|
|
|
LDAPControl *controlU;
|
2005-12-31 13:13:05 +01:00
|
|
|
DWORD len = control->ldctl_value.bv_len;
|
|
|
|
char *val = NULL;
|
|
|
|
|
|
|
|
if (control->ldctl_value.bv_val)
|
|
|
|
{
|
2018-02-20 12:06:10 +01:00
|
|
|
if (!(val = heap_alloc( len ))) return NULL;
|
2005-12-31 13:13:05 +01:00
|
|
|
memcpy( val, control->ldctl_value.bv_val, len );
|
|
|
|
}
|
2005-07-22 21:47:37 +02:00
|
|
|
|
2018-02-20 12:06:10 +01:00
|
|
|
if (!(controlU = heap_alloc( sizeof(LDAPControl) )))
|
2005-07-22 21:47:37 +02:00
|
|
|
{
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( val );
|
2005-12-31 13:13:05 +01:00
|
|
|
return NULL;
|
2005-07-22 21:47:37 +02:00
|
|
|
}
|
2005-12-31 13:13:05 +01:00
|
|
|
|
|
|
|
controlU->ldctl_oid = strWtoU( control->ldctl_oid );
|
|
|
|
controlU->ldctl_value.bv_len = len;
|
|
|
|
controlU->ldctl_value.bv_val = val;
|
|
|
|
controlU->ldctl_iscritical = control->ldctl_iscritical;
|
|
|
|
|
2005-07-22 21:47:37 +02:00
|
|
|
return controlU;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LDAPControlW *controlUtoW( LDAPControl *control )
|
|
|
|
{
|
|
|
|
LDAPControlW *controlW;
|
2005-12-31 13:13:05 +01:00
|
|
|
DWORD len = control->ldctl_value.bv_len;
|
|
|
|
char *val = NULL;
|
|
|
|
|
|
|
|
if (control->ldctl_value.bv_val)
|
|
|
|
{
|
2018-02-20 12:06:10 +01:00
|
|
|
if (!(val = heap_alloc( len ))) return NULL;
|
2005-12-31 13:13:05 +01:00
|
|
|
memcpy( val, control->ldctl_value.bv_val, len );
|
|
|
|
}
|
2005-07-22 21:47:37 +02:00
|
|
|
|
2018-02-20 12:06:10 +01:00
|
|
|
if (!(controlW = heap_alloc( sizeof(LDAPControlW) )))
|
2005-07-22 21:47:37 +02:00
|
|
|
{
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( val );
|
2005-12-31 13:13:05 +01:00
|
|
|
return NULL;
|
2005-07-22 21:47:37 +02:00
|
|
|
}
|
2005-12-31 13:13:05 +01:00
|
|
|
|
|
|
|
controlW->ldctl_oid = strUtoW( control->ldctl_oid );
|
2020-04-17 11:11:54 +02:00
|
|
|
controlW->ldctl_value.bv_len = len;
|
|
|
|
controlW->ldctl_value.bv_val = val;
|
|
|
|
controlW->ldctl_iscritical = control->ldctl_iscritical;
|
|
|
|
|
|
|
|
return controlW;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LDAPControlW *controldupW( LDAPControlW *control )
|
|
|
|
{
|
|
|
|
LDAPControlW *controlW;
|
|
|
|
DWORD len = control->ldctl_value.bv_len;
|
|
|
|
char *val = NULL;
|
|
|
|
|
|
|
|
if (control->ldctl_value.bv_val)
|
|
|
|
{
|
|
|
|
if (!(val = heap_alloc( len ))) return NULL;
|
|
|
|
memcpy( val, control->ldctl_value.bv_val, len );
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!(controlW = heap_alloc( sizeof(LDAPControlW) )))
|
|
|
|
{
|
|
|
|
heap_free( val );
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
controlW->ldctl_oid = strdupW( control->ldctl_oid );
|
|
|
|
controlW->ldctl_value.bv_len = len;
|
|
|
|
controlW->ldctl_value.bv_val = val;
|
2005-12-31 13:13:05 +01:00
|
|
|
controlW->ldctl_iscritical = control->ldctl_iscritical;
|
2018-02-20 12:06:10 +01:00
|
|
|
|
2005-07-22 21:47:37 +02:00
|
|
|
return controlW;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void controlfreeA( LDAPControlA *control )
|
|
|
|
{
|
|
|
|
if (control)
|
|
|
|
{
|
|
|
|
strfreeA( control->ldctl_oid );
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( control->ldctl_value.bv_val );
|
|
|
|
heap_free( control );
|
2005-07-22 21:47:37 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void controlfreeW( LDAPControlW *control )
|
|
|
|
{
|
|
|
|
if (control)
|
|
|
|
{
|
|
|
|
strfreeW( control->ldctl_oid );
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( control->ldctl_value.bv_val );
|
|
|
|
heap_free( control );
|
2005-07-22 21:47:37 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void controlfreeU( LDAPControl *control )
|
|
|
|
{
|
|
|
|
if (control)
|
|
|
|
{
|
|
|
|
strfreeU( control->ldctl_oid );
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( control->ldctl_value.bv_val );
|
|
|
|
heap_free( control );
|
2005-07-22 21:47:37 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline DWORD controlarraylenA( LDAPControlA **controlarray )
|
|
|
|
{
|
|
|
|
LDAPControlA **p = controlarray;
|
|
|
|
while (*p) p++;
|
|
|
|
return p - controlarray;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline DWORD controlarraylenW( LDAPControlW **controlarray )
|
|
|
|
{
|
|
|
|
LDAPControlW **p = controlarray;
|
|
|
|
while (*p) p++;
|
|
|
|
return p - controlarray;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline DWORD controlarraylenU( LDAPControl **controlarray )
|
|
|
|
{
|
|
|
|
LDAPControl **p = controlarray;
|
|
|
|
while (*p) p++;
|
|
|
|
return p - controlarray;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LDAPControlW **controlarrayAtoW( LDAPControlA **controlarray )
|
|
|
|
{
|
|
|
|
LDAPControlW **controlarrayW = NULL;
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
if (controlarray)
|
|
|
|
{
|
|
|
|
size = sizeof(LDAPControlW*) * (controlarraylenA( controlarray ) + 1);
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((controlarrayW = heap_alloc( size )))
|
2005-07-22 21:47:37 +02:00
|
|
|
{
|
|
|
|
LDAPControlA **p = controlarray;
|
|
|
|
LDAPControlW **q = controlarrayW;
|
|
|
|
|
|
|
|
while (*p) *q++ = controlAtoW( *p++ );
|
|
|
|
*q = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return controlarrayW;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LDAPControlA **controlarrayWtoA( LDAPControlW **controlarray )
|
|
|
|
{
|
|
|
|
LDAPControlA **controlarrayA = NULL;
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
if (controlarray)
|
|
|
|
{
|
|
|
|
size = sizeof(LDAPControl*) * (controlarraylenW( controlarray ) + 1);
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((controlarrayA = heap_alloc( size )))
|
2005-07-22 21:47:37 +02:00
|
|
|
{
|
|
|
|
LDAPControlW **p = controlarray;
|
|
|
|
LDAPControlA **q = controlarrayA;
|
|
|
|
|
|
|
|
while (*p) *q++ = controlWtoA( *p++ );
|
|
|
|
*q = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return controlarrayA;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LDAPControl **controlarrayWtoU( LDAPControlW **controlarray )
|
|
|
|
{
|
|
|
|
LDAPControl **controlarrayU = NULL;
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
if (controlarray)
|
|
|
|
{
|
|
|
|
size = sizeof(LDAPControl*) * (controlarraylenW( controlarray ) + 1);
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((controlarrayU = heap_alloc( size )))
|
2005-07-22 21:47:37 +02:00
|
|
|
{
|
|
|
|
LDAPControlW **p = controlarray;
|
|
|
|
LDAPControl **q = controlarrayU;
|
|
|
|
|
|
|
|
while (*p) *q++ = controlWtoU( *p++ );
|
|
|
|
*q = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return controlarrayU;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LDAPControlW **controlarrayUtoW( LDAPControl **controlarray )
|
|
|
|
{
|
|
|
|
LDAPControlW **controlarrayW = NULL;
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
if (controlarray)
|
|
|
|
{
|
|
|
|
size = sizeof(LDAPControlW*) * (controlarraylenU( controlarray ) + 1);
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((controlarrayW = heap_alloc( size )))
|
2005-07-22 21:47:37 +02:00
|
|
|
{
|
|
|
|
LDAPControl **p = controlarray;
|
|
|
|
LDAPControlW **q = controlarrayW;
|
|
|
|
|
|
|
|
while (*p) *q++ = controlUtoW( *p++ );
|
|
|
|
*q = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return controlarrayW;
|
|
|
|
}
|
|
|
|
|
2020-04-17 11:11:54 +02:00
|
|
|
static inline LDAPControlW **controlarraydupW( LDAPControlW **controlarray )
|
|
|
|
{
|
|
|
|
LDAPControlW **controlarrayW = NULL;
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
if (controlarray)
|
|
|
|
{
|
|
|
|
size = sizeof(LDAPControlW*) * (controlarraylenW( controlarray ) + 1);
|
|
|
|
if ((controlarrayW = heap_alloc( size )))
|
|
|
|
{
|
|
|
|
LDAPControlW **p = controlarray;
|
|
|
|
LDAPControlW **q = controlarrayW;
|
|
|
|
|
|
|
|
while (*p) *q++ = controldupW( *p++ );
|
|
|
|
*q = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return controlarrayW;
|
|
|
|
}
|
|
|
|
|
2005-07-22 21:47:37 +02:00
|
|
|
static inline void controlarrayfreeA( LDAPControlA **controlarray )
|
|
|
|
{
|
|
|
|
if (controlarray)
|
|
|
|
{
|
|
|
|
LDAPControlA **p = controlarray;
|
|
|
|
while (*p) controlfreeA( *p++ );
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( controlarray );
|
2005-07-22 21:47:37 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void controlarrayfreeW( LDAPControlW **controlarray )
|
|
|
|
{
|
|
|
|
if (controlarray)
|
|
|
|
{
|
|
|
|
LDAPControlW **p = controlarray;
|
|
|
|
while (*p) controlfreeW( *p++ );
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( controlarray );
|
2005-07-22 21:47:37 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void controlarrayfreeU( LDAPControl **controlarray )
|
|
|
|
{
|
|
|
|
if (controlarray)
|
|
|
|
{
|
|
|
|
LDAPControl **p = controlarray;
|
|
|
|
while (*p) controlfreeU( *p++ );
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( controlarray );
|
2005-07-22 21:47:37 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-08-08 13:03:40 +02:00
|
|
|
static inline LDAPSortKeyW *sortkeyAtoW( LDAPSortKeyA *sortkey )
|
|
|
|
{
|
|
|
|
LDAPSortKeyW *sortkeyW;
|
|
|
|
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((sortkeyW = heap_alloc( sizeof(LDAPSortKeyW) )))
|
2005-08-08 13:03:40 +02:00
|
|
|
{
|
|
|
|
sortkeyW->sk_attrtype = strAtoW( sortkey->sk_attrtype );
|
|
|
|
sortkeyW->sk_matchruleoid = strAtoW( sortkey->sk_matchruleoid );
|
|
|
|
sortkeyW->sk_reverseorder = sortkey->sk_reverseorder;
|
|
|
|
}
|
|
|
|
return sortkeyW;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LDAPSortKeyA *sortkeyWtoA( LDAPSortKeyW *sortkey )
|
|
|
|
{
|
|
|
|
LDAPSortKeyA *sortkeyA;
|
|
|
|
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((sortkeyA = heap_alloc( sizeof(LDAPSortKeyA) )))
|
2005-08-08 13:03:40 +02:00
|
|
|
{
|
|
|
|
sortkeyA->sk_attrtype = strWtoA( sortkey->sk_attrtype );
|
|
|
|
sortkeyA->sk_matchruleoid = strWtoA( sortkey->sk_matchruleoid );
|
|
|
|
sortkeyA->sk_reverseorder = sortkey->sk_reverseorder;
|
|
|
|
}
|
|
|
|
return sortkeyA;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LDAPSortKey *sortkeyWtoU( LDAPSortKeyW *sortkey )
|
|
|
|
{
|
|
|
|
LDAPSortKey *sortkeyU;
|
|
|
|
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((sortkeyU = heap_alloc( sizeof(LDAPSortKey) )))
|
2005-08-08 13:03:40 +02:00
|
|
|
{
|
|
|
|
sortkeyU->attributeType = strWtoU( sortkey->sk_attrtype );
|
|
|
|
sortkeyU->orderingRule = strWtoU( sortkey->sk_matchruleoid );
|
|
|
|
sortkeyU->reverseOrder = sortkey->sk_reverseorder;
|
|
|
|
}
|
|
|
|
return sortkeyU;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void sortkeyfreeA( LDAPSortKeyA *sortkey )
|
|
|
|
{
|
|
|
|
if (sortkey)
|
|
|
|
{
|
|
|
|
strfreeA( sortkey->sk_attrtype );
|
|
|
|
strfreeA( sortkey->sk_matchruleoid );
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( sortkey );
|
2005-08-08 13:03:40 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void sortkeyfreeW( LDAPSortKeyW *sortkey )
|
|
|
|
{
|
|
|
|
if (sortkey)
|
|
|
|
{
|
|
|
|
strfreeW( sortkey->sk_attrtype );
|
|
|
|
strfreeW( sortkey->sk_matchruleoid );
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( sortkey );
|
2005-08-08 13:03:40 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void sortkeyfreeU( LDAPSortKey *sortkey )
|
|
|
|
{
|
|
|
|
if (sortkey)
|
|
|
|
{
|
|
|
|
strfreeU( sortkey->attributeType );
|
|
|
|
strfreeU( sortkey->orderingRule );
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( sortkey );
|
2005-08-08 13:03:40 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline DWORD sortkeyarraylenA( LDAPSortKeyA **sortkeyarray )
|
|
|
|
{
|
|
|
|
LDAPSortKeyA **p = sortkeyarray;
|
|
|
|
while (*p) p++;
|
|
|
|
return p - sortkeyarray;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline DWORD sortkeyarraylenW( LDAPSortKeyW **sortkeyarray )
|
|
|
|
{
|
|
|
|
LDAPSortKeyW **p = sortkeyarray;
|
|
|
|
while (*p) p++;
|
|
|
|
return p - sortkeyarray;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LDAPSortKeyW **sortkeyarrayAtoW( LDAPSortKeyA **sortkeyarray )
|
|
|
|
{
|
|
|
|
LDAPSortKeyW **sortkeyarrayW = NULL;
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
if (sortkeyarray)
|
|
|
|
{
|
|
|
|
size = sizeof(LDAPSortKeyW*) * (sortkeyarraylenA( sortkeyarray ) + 1);
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((sortkeyarrayW = heap_alloc( size )))
|
2005-08-08 13:03:40 +02:00
|
|
|
{
|
|
|
|
LDAPSortKeyA **p = sortkeyarray;
|
|
|
|
LDAPSortKeyW **q = sortkeyarrayW;
|
|
|
|
|
|
|
|
while (*p) *q++ = sortkeyAtoW( *p++ );
|
|
|
|
*q = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return sortkeyarrayW;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LDAPSortKey **sortkeyarrayWtoU( LDAPSortKeyW **sortkeyarray )
|
|
|
|
{
|
|
|
|
LDAPSortKey **sortkeyarrayU = NULL;
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
if (sortkeyarray)
|
|
|
|
{
|
|
|
|
size = sizeof(LDAPSortKey*) * (sortkeyarraylenW( sortkeyarray ) + 1);
|
2018-02-20 12:06:10 +01:00
|
|
|
if ((sortkeyarrayU = heap_alloc( size )))
|
2005-08-08 13:03:40 +02:00
|
|
|
{
|
|
|
|
LDAPSortKeyW **p = sortkeyarray;
|
|
|
|
LDAPSortKey **q = sortkeyarrayU;
|
|
|
|
|
|
|
|
while (*p) *q++ = sortkeyWtoU( *p++ );
|
|
|
|
*q = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return sortkeyarrayU;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void sortkeyarrayfreeW( LDAPSortKeyW **sortkeyarray )
|
|
|
|
{
|
|
|
|
if (sortkeyarray)
|
|
|
|
{
|
|
|
|
LDAPSortKeyW **p = sortkeyarray;
|
|
|
|
while (*p) sortkeyfreeW( *p++ );
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( sortkeyarray );
|
2005-08-08 13:03:40 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void sortkeyarrayfreeU( LDAPSortKey **sortkeyarray )
|
|
|
|
{
|
|
|
|
if (sortkeyarray)
|
|
|
|
{
|
|
|
|
LDAPSortKey **p = sortkeyarray;
|
|
|
|
while (*p) sortkeyfreeU( *p++ );
|
2018-02-20 12:06:10 +01:00
|
|
|
heap_free( sortkeyarray );
|
2005-08-08 13:03:40 +02:00
|
|
|
}
|
|
|
|
}
|
2005-07-22 21:47:37 +02:00
|
|
|
#endif /* HAVE_LDAP */
|