mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[WLDAP32]
* Sync with Wine 1.7.1. CORE-7469 svn path=/trunk/; revision=60432
This commit is contained in:
parent
f2e60c9794
commit
5e1de63072
9 changed files with 37 additions and 36 deletions
|
@ -24,11 +24,10 @@ list(APPEND SOURCE
|
|||
rename.c
|
||||
search.c
|
||||
value.c
|
||||
wldap32.rc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/wldap32_stubs.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/wldap32.def)
|
||||
|
||||
add_library(wldap32 SHARED ${SOURCE})
|
||||
add_library(wldap32 SHARED ${SOURCE} wldap32.rc)
|
||||
set_module_type(wldap32 win32dll)
|
||||
target_link_libraries(wldap32 wine)
|
||||
add_importlibs(wldap32 user32 msvcrt kernel32 ntdll)
|
||||
|
|
|
@ -19,22 +19,21 @@
|
|||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
//#include "wine/port.h"
|
||||
#include <wine/debug.h>
|
||||
|
||||
//#include <stdio.h>
|
||||
//#include <stdarg.h>
|
||||
|
||||
//#include "windef.h"
|
||||
//#include "winbase.h"
|
||||
//#include "winnls.h"
|
||||
|
||||
#ifdef HAVE_LDAP_H
|
||||
#include <ldap.h>
|
||||
#endif
|
||||
|
||||
#include <windef.h>
|
||||
//#include "winbase.h"
|
||||
//#include "winnls.h"
|
||||
|
||||
#include "winldap_private.h"
|
||||
//#include "wldap32.h"
|
||||
#include <wine/debug.h>
|
||||
|
||||
#ifdef HAVE_LDAP
|
||||
/* Should eventually be determined by the algorithm documented on MSDN. */
|
||||
|
@ -124,7 +123,7 @@ static int has_ldap_scheme( char *url )
|
|||
}
|
||||
|
||||
/* Flatten an array of hostnames into a space separated string of URLs.
|
||||
* Prepend a given scheme and append a given portnumber to each hostname
|
||||
* Prepend a given scheme and append a given port number to each hostname
|
||||
* if necessary.
|
||||
*/
|
||||
static char *join_hostnames( const char *scheme, char **hostnames, ULONG portnumber )
|
||||
|
@ -244,7 +243,7 @@ exit:
|
|||
*
|
||||
* PARAMS
|
||||
* hostname [I] Name of the host to connect to.
|
||||
* portnumber [I] Portnumber to use.
|
||||
* portnumber [I] Port number to use.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: Pointer to an LDAP context.
|
||||
|
@ -254,8 +253,8 @@ exit:
|
|||
* The hostname string can be a space separated string of hostnames,
|
||||
* in which case the LDAP runtime will try to connect to the hosts
|
||||
* in order, until a connection can be made. A hostname may have a
|
||||
* trailing portnumber (separated from the hostname by a ':'), which
|
||||
* will take precedence over the portnumber supplied as a parameter
|
||||
* trailing port number (separated from the hostname by a ':'), which
|
||||
* will take precedence over the port number supplied as a parameter
|
||||
* to this function.
|
||||
*/
|
||||
WLDAP32_LDAP * CDECL cldap_openW( PWCHAR hostname, ULONG portnumber )
|
||||
|
@ -352,7 +351,7 @@ exit:
|
|||
*
|
||||
* PARAMS
|
||||
* hostname [I] Name of the host to connect to.
|
||||
* portnumber [I] Portnumber to use.
|
||||
* portnumber [I] Port number to use.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: Pointer to an LDAP context.
|
||||
|
@ -362,8 +361,8 @@ exit:
|
|||
* The hostname string can be a space separated string of hostnames,
|
||||
* in which case the LDAP runtime will try to connect to the hosts
|
||||
* in order, until a connection can be made. A hostname may have a
|
||||
* trailing portnumber (separated from the hostname by a ':'), which
|
||||
* will take precedence over the portnumber supplied as a parameter
|
||||
* trailing port number (separated from the hostname by a ':'), which
|
||||
* will take precedence over the port number supplied as a parameter
|
||||
* to this function. The connection will not be made until the first
|
||||
* LDAP function that needs it is called.
|
||||
*/
|
||||
|
@ -435,7 +434,7 @@ exit:
|
|||
*
|
||||
* PARAMS
|
||||
* hostname [I] Name of the host to connect to.
|
||||
* portnumber [I] Portnumber to use.
|
||||
* portnumber [I] Port number to use.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: Pointer to an LDAP context.
|
||||
|
@ -445,8 +444,8 @@ exit:
|
|||
* The hostname string can be a space separated string of hostnames,
|
||||
* in which case the LDAP runtime will try to connect to the hosts
|
||||
* in order, until a connection can be made. A hostname may have a
|
||||
* trailing portnumber (separated from the hostname by a ':'), which
|
||||
* will take precedence over the portnumber supplied as a parameter
|
||||
* trailing port number (separated from the hostname by a ':'), which
|
||||
* will take precedence over the port number supplied as a parameter
|
||||
* to this function.
|
||||
*/
|
||||
WLDAP32_LDAP * CDECL ldap_openW( PWCHAR hostname, ULONG portnumber )
|
||||
|
@ -516,7 +515,7 @@ WLDAP32_LDAP * CDECL ldap_sslinitA( PCHAR hostname, ULONG portnumber, int secure
|
|||
*
|
||||
* PARAMS
|
||||
* hostname [I] Name of the host to connect to.
|
||||
* portnumber [I] Portnumber to use.
|
||||
* portnumber [I] Port number to use.
|
||||
* secure [I] Ask the server to create an SSL connection.
|
||||
*
|
||||
* RETURNS
|
||||
|
@ -527,8 +526,8 @@ WLDAP32_LDAP * CDECL ldap_sslinitA( PCHAR hostname, ULONG portnumber, int secure
|
|||
* The hostname string can be a space separated string of hostnames,
|
||||
* in which case the LDAP runtime will try to connect to the hosts
|
||||
* in order, until a connection can be made. A hostname may have a
|
||||
* trailing portnumber (separated from the hostname by a ':'), which
|
||||
* will take precedence over the portnumber supplied as a parameter
|
||||
* trailing port number (separated from the hostname by a ':'), which
|
||||
* will take precedence over the port number supplied as a parameter
|
||||
* to this function. The connection will not be made until the first
|
||||
* LDAP function that needs it is called.
|
||||
*/
|
||||
|
|
|
@ -40,8 +40,6 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
|||
hwldap32 = hinst;
|
||||
DisableThreadLibraryCalls( hinst );
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -319,7 +319,7 @@ ULONG CDECL ldap_set_optionA( WLDAP32_LDAP *ld, int option, void *value )
|
|||
|
||||
TRACE( "(%p, 0x%08x, %p)\n", ld, option, value );
|
||||
|
||||
if (!ld || !value) return WLDAP32_LDAP_PARAM_ERROR;
|
||||
if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
|
||||
|
||||
switch (option)
|
||||
{
|
||||
|
@ -422,7 +422,7 @@ ULONG CDECL ldap_set_optionW( WLDAP32_LDAP *ld, int option, void *value )
|
|||
|
||||
TRACE( "(%p, 0x%08x, %p)\n", ld, option, value );
|
||||
|
||||
if (!ld || !value) return WLDAP32_LDAP_PARAM_ERROR;
|
||||
if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
|
||||
|
||||
switch (option)
|
||||
{
|
||||
|
|
|
@ -444,7 +444,7 @@ INT CDECL ldap_parse_vlv_controlW( WLDAP32_LDAP *ld, PLDAPControlW *control,
|
|||
|
||||
#ifdef HAVE_LDAP_PARSE_VLV_CONTROL
|
||||
if (!(ret = ldap_parse_vlv_control( ld, controlU, &pos, &count,
|
||||
context, errcode )))
|
||||
(struct berval **)context, errcode )))
|
||||
{
|
||||
*targetpos = pos;
|
||||
*listcount = count;
|
||||
|
|
|
@ -243,7 +243,7 @@ ULONG CDECL ldap_search_extW( WLDAP32_LDAP *ld, PWCHAR base, ULONG scope,
|
|||
#ifdef HAVE_LDAP
|
||||
char *baseU = NULL, *filterU = NULL, **attrsU = NULL;
|
||||
LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
|
||||
struct timeval tv;
|
||||
struct timeval tv, *tvp = NULL;
|
||||
|
||||
ret = WLDAP32_LDAP_NO_MEMORY;
|
||||
|
||||
|
@ -274,11 +274,15 @@ ULONG CDECL ldap_search_extW( WLDAP32_LDAP *ld, PWCHAR base, ULONG scope,
|
|||
if (!clientctrlsU) goto exit;
|
||||
}
|
||||
|
||||
tv.tv_sec = timelimit;
|
||||
tv.tv_usec = 0;
|
||||
if (timelimit)
|
||||
{
|
||||
tv.tv_sec = timelimit;
|
||||
tv.tv_usec = 0;
|
||||
tvp = &tv;
|
||||
}
|
||||
|
||||
ret = map_error( ldap_search_ext( ld, baseU, scope, filterU, attrsU, attrsonly,
|
||||
serverctrlsU, clientctrlsU, &tv, sizelimit, (int *)message ));
|
||||
serverctrlsU, clientctrlsU, tvp, sizelimit, (int *)message ));
|
||||
|
||||
exit:
|
||||
strfreeU( baseU );
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
ULONG map_error( int );
|
||||
extern HINSTANCE hwldap32 DECLSPEC_HIDDEN;
|
||||
|
||||
ULONG map_error( int ) DECLSPEC_HIDDEN;
|
||||
|
||||
/* A set of helper functions to convert LDAP data structures
|
||||
* to and from ansi (A), wide character (W) and utf8 (U) encodings.
|
||||
|
@ -854,5 +856,4 @@ static inline void sortkeyarrayfreeU( LDAPSortKey **sortkeyarray )
|
|||
HeapFree( GetProcessHeap(), 0, sortkeyarray );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* HAVE_LDAP */
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
62 cdecl ldap_add_extW(ptr wstr ptr ptr ptr ptr)
|
||||
63 cdecl ldap_add_ext_s(ptr str ptr ptr ptr) ldap_add_ext_sA
|
||||
64 cdecl ldap_add_ext_sA(ptr str ptr ptr ptr)
|
||||
65 cdecl ldap_add_ext_sW(ptr str ptr ptr ptr)
|
||||
65 cdecl ldap_add_ext_sW(ptr wstr ptr ptr ptr)
|
||||
66 cdecl ldap_add_sA(ptr str ptr)
|
||||
67 cdecl ldap_modrdn2(ptr str ptr long) ldap_modrdn2A
|
||||
68 cdecl ldap_modrdn2_s(ptr str ptr long) ldap_modrdn2_sA
|
||||
|
@ -206,7 +206,7 @@
|
|||
216 cdecl ldap_simple_bind_sW(ptr wstr wstr)
|
||||
217 cdecl ldap_sslinit(str long long) ldap_sslinitA
|
||||
218 cdecl ldap_sslinitA(str long long)
|
||||
219 cdecl ldap_sslinitW(str long long)
|
||||
219 cdecl ldap_sslinitW(wstr long long)
|
||||
220 cdecl ldap_ufn2dn(str ptr) ldap_ufn2dnA
|
||||
221 cdecl ldap_ufn2dnA(str ptr)
|
||||
222 cdecl ldap_ufn2dnW(wstr ptr)
|
||||
|
|
|
@ -208,7 +208,7 @@ reactos/dll/win32/winmm # Forked at Wine-20050628
|
|||
reactos/dll/win32/winmm/midimap # Forked at Wine-20050628
|
||||
reactos/dll/win32/winmm/wavemap # Forked at Wine-20050628
|
||||
reactos/dll/win32/wintrust # Synced to Wine-1.7.1
|
||||
reactos/dll/win32/wldap32 # Autosync
|
||||
reactos/dll/win32/wldap32 # Synced to Wine-1.7.1
|
||||
reactos/dll/win32/wmi # Synced to Wine-1.5.19
|
||||
reactos/dll/win32/wtsapi32 # Synced to Wine-1.5.4
|
||||
reactos/dll/win32/wuapi # Synced to Wine-1.5.19
|
||||
|
|
Loading…
Reference in a new issue