Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
5d0b23be
Commit
5d0b23be
authored
Feb 15, 2022
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wldap32: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
86891eea
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
72 additions
and
73 deletions
+72
-73
Makefile.in
dlls/wldap32/Makefile.in
+0
-1
bind.c
dlls/wldap32/bind.c
+5
-5
dn.c
dlls/wldap32/dn.c
+2
-2
error.c
dlls/wldap32/error.c
+4
-4
extended.c
dlls/wldap32/extended.c
+1
-1
init.c
dlls/wldap32/init.c
+10
-10
main.c
dlls/wldap32/main.c
+1
-1
misc.c
dlls/wldap32/misc.c
+4
-4
option.c
dlls/wldap32/option.c
+1
-1
page.c
dlls/wldap32/page.c
+8
-7
search.c
dlls/wldap32/search.c
+10
-10
Makefile.in
dlls/wldap32/tests/Makefile.in
+0
-1
ber.c
dlls/wldap32/tests/ber.c
+1
-1
parse.c
dlls/wldap32/tests/parse.c
+25
-25
No files found.
dlls/wldap32/Makefile.in
View file @
5d0b23be
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
wldap32.dll
UNIXLIB
=
wldap32.so
IMPORTLIB
=
wldap32
...
...
dlls/wldap32/bind.c
View file @
5d0b23be
...
...
@@ -41,7 +41,7 @@ ULONG CDECL ldap_bindA( LDAP *ld, char *dn, char *cred, ULONG method )
ULONG
ret
=
LDAP_NO_MEMORY
;
WCHAR
*
dnW
=
NULL
,
*
credW
=
NULL
;
TRACE
(
"(%p, %s, %p,
0x%08
x)
\n
"
,
ld
,
debugstr_a
(
dn
),
cred
,
method
);
TRACE
(
"(%p, %s, %p,
%#l
x)
\n
"
,
ld
,
debugstr_a
(
dn
),
cred
,
method
);
if
(
!
ld
)
return
~
0u
;
...
...
@@ -81,7 +81,7 @@ ULONG CDECL ldap_bindW( LDAP *ld, WCHAR *dn, WCHAR *cred, ULONG method )
struct
bervalU
pwd
=
{
0
,
NULL
};
int
msg
;
TRACE
(
"(%p, %s, %p,
0x%08
x)
\n
"
,
ld
,
debugstr_w
(
dn
),
cred
,
method
);
TRACE
(
"(%p, %s, %p,
%#l
x)
\n
"
,
ld
,
debugstr_w
(
dn
),
cred
,
method
);
if
(
!
ld
)
return
~
0u
;
if
(
method
!=
LDAP_AUTH_SIMPLE
)
return
LDAP_PARAM_ERROR
;
...
...
@@ -119,7 +119,7 @@ ULONG CDECL ldap_bind_sA( LDAP *ld, char *dn, char *cred, ULONG method )
ULONG
ret
=
LDAP_NO_MEMORY
;
WCHAR
*
dnW
=
NULL
,
*
credW
=
NULL
;
TRACE
(
"(%p, %s, %p,
0x%08
x)
\n
"
,
ld
,
debugstr_a
(
dn
),
cred
,
method
);
TRACE
(
"(%p, %s, %p,
%#l
x)
\n
"
,
ld
,
debugstr_a
(
dn
),
cred
,
method
);
if
(
!
ld
)
return
LDAP_PARAM_ERROR
;
...
...
@@ -162,7 +162,7 @@ ULONG CDECL ldap_bind_sW( LDAP *ld, WCHAR *dn, WCHAR *cred, ULONG method )
char
*
dnU
=
NULL
,
*
credU
=
NULL
;
struct
bervalU
pwd
=
{
0
,
NULL
};
TRACE
(
"(%p, %s, %p,
0x%08
x)
\n
"
,
ld
,
debugstr_w
(
dn
),
cred
,
method
);
TRACE
(
"(%p, %s, %p,
%#l
x)
\n
"
,
ld
,
debugstr_w
(
dn
),
cred
,
method
);
if
(
!
ld
)
return
LDAP_PARAM_ERROR
;
...
...
@@ -224,7 +224,7 @@ ULONG CDECL ldap_bind_sW( LDAP *ld, WCHAR *dn, WCHAR *cred, ULONG method )
}
else
{
FIXME
(
"method %#x not supported
\n
"
,
method
);
FIXME
(
"method %#
l
x not supported
\n
"
,
method
);
return
LDAP_PARAM_ERROR
;
}
...
...
dlls/wldap32/dn.c
View file @
5d0b23be
...
...
@@ -96,7 +96,7 @@ char ** CDECL ldap_explode_dnA( char *dn, ULONG notypes )
char
**
ret
;
WCHAR
*
dnW
,
**
retW
;
TRACE
(
"(%s,
0x%08
x)
\n
"
,
debugstr_a
(
dn
),
notypes
);
TRACE
(
"(%s,
%#l
x)
\n
"
,
debugstr_a
(
dn
),
notypes
);
if
(
!
(
dnW
=
strAtoW
(
dn
)))
return
NULL
;
...
...
@@ -130,7 +130,7 @@ WCHAR ** CDECL ldap_explode_dnW( WCHAR *dn, ULONG notypes )
WCHAR
**
ret
=
NULL
;
char
*
dnU
,
**
retU
;
TRACE
(
"(%s,
0x%08
x)
\n
"
,
debugstr_w
(
dn
),
notypes
);
TRACE
(
"(%s,
%#l
x)
\n
"
,
debugstr_w
(
dn
),
notypes
);
if
((
dnU
=
strWtoU
(
dn
)))
{
...
...
dlls/wldap32/error.c
View file @
5d0b23be
...
...
@@ -67,7 +67,7 @@ char * CDECL ldap_err2stringA( ULONG err )
{
static
char
buf
[
256
]
=
""
;
TRACE
(
"(
0x%08
x)
\n
"
,
err
);
TRACE
(
"(
%#l
x)
\n
"
,
err
);
if
(
err
<=
LDAP_REFERRAL_LIMIT_EXCEEDED
)
LoadStringA
(
hwldap32
,
err
,
buf
,
256
);
...
...
@@ -97,7 +97,7 @@ WCHAR * CDECL ldap_err2stringW( ULONG err )
{
static
WCHAR
buf
[
256
]
=
{
0
};
TRACE
(
"(
0x%08
x)
\n
"
,
err
);
TRACE
(
"(
%#l
x)
\n
"
,
err
);
if
(
err
<=
LDAP_REFERRAL_LIMIT_EXCEEDED
)
LoadStringW
(
hwldap32
,
err
,
buf
,
256
);
...
...
@@ -148,7 +148,7 @@ ULONG CDECL ldap_result2error( LDAP *ld, LDAPMessage *res, ULONG free )
{
int
error
;
TRACE
(
"(%p, %p,
0x%08
x)
\n
"
,
ld
,
res
,
free
);
TRACE
(
"(%p, %p,
%#l
x)
\n
"
,
ld
,
res
,
free
);
if
(
ld
&&
res
)
{
...
...
@@ -289,7 +289,7 @@ static const ULONG errormap[] = {
*/
ULONG
CDECL
LdapMapErrorToWin32
(
ULONG
err
)
{
TRACE
(
"(
0x%08
x)
\n
"
,
err
);
TRACE
(
"(
%#l
x)
\n
"
,
err
);
if
(
err
>=
ARRAY_SIZE
(
errormap
))
return
ERROR_DS_GENERIC_ERROR
;
return
errormap
[
err
];
...
...
dlls/wldap32/extended.c
View file @
5d0b23be
...
...
@@ -48,7 +48,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wldap32);
*/
ULONG
CDECL
ldap_close_extended_op
(
LDAP
*
ld
,
ULONG
msgid
)
{
TRACE
(
"(%p,
0x%08
x)
\n
"
,
ld
,
msgid
);
TRACE
(
"(%p,
%#l
x)
\n
"
,
ld
,
msgid
);
if
(
!
ld
)
return
LDAP_PARAM_ERROR
;
return
LDAP_SUCCESS
;
...
...
dlls/wldap32/init.c
View file @
5d0b23be
...
...
@@ -118,10 +118,10 @@ static char *join_hostnames( const char *scheme, char **hostnames, ULONG portnum
{
char
*
res
,
*
p
,
*
q
,
**
v
;
unsigned
int
i
=
0
,
size
=
0
;
static
const
char
sep
[]
=
" "
,
fmt
[]
=
":%d"
;
static
const
char
sep
[]
=
" "
;
char
port
[
7
];
sprintf
(
port
,
fmt
,
portnumber
);
sprintf
(
port
,
":%lu"
,
portnumber
);
for
(
v
=
hostnames
;
*
v
;
v
++
)
{
...
...
@@ -220,7 +220,7 @@ LDAP * CDECL cldap_openA( char *hostname, ULONG portnumber )
LDAP
*
ld
;
WCHAR
*
hostnameW
=
NULL
;
TRACE
(
"(%s, %
d
)
\n
"
,
debugstr_a
(
hostname
),
portnumber
);
TRACE
(
"(%s, %
lu
)
\n
"
,
debugstr_a
(
hostname
),
portnumber
);
if
(
hostname
&&
!
(
hostnameW
=
strAtoW
(
hostname
)))
return
NULL
;
...
...
@@ -256,7 +256,7 @@ LDAP * CDECL cldap_openW( WCHAR *hostname, ULONG portnumber )
LDAP
*
ld
=
NULL
;
char
*
hostnameU
,
*
url
=
NULL
;
TRACE
(
"(%s, %
d
)
\n
"
,
debugstr_w
(
hostname
),
portnumber
);
TRACE
(
"(%s, %
lu
)
\n
"
,
debugstr_w
(
hostname
),
portnumber
);
if
(
!
(
hostnameU
=
strWtoU
(
hostname
?
hostname
:
L"localhost"
)))
return
NULL
;
if
(
!
(
url
=
urlify_hostnames
(
"cldap://"
,
hostnameU
,
portnumber
)))
goto
exit
;
...
...
@@ -305,7 +305,7 @@ LDAP * CDECL ldap_initA( const PCHAR hostname, ULONG portnumber )
LDAP
*
ld
;
WCHAR
*
hostnameW
=
NULL
;
TRACE
(
"(%s, %
d
)
\n
"
,
debugstr_a
(
hostname
),
portnumber
);
TRACE
(
"(%s, %
lu
)
\n
"
,
debugstr_a
(
hostname
),
portnumber
);
if
(
hostname
&&
!
(
hostnameW
=
strAtoW
(
hostname
)))
return
NULL
;
...
...
@@ -342,7 +342,7 @@ LDAP * CDECL ldap_initW( const PWCHAR hostname, ULONG portnumber )
LDAP
*
ld
=
NULL
;
char
*
hostnameU
,
*
url
=
NULL
;
TRACE
(
"(%s, %
d
)
\n
"
,
debugstr_w
(
hostname
),
portnumber
);
TRACE
(
"(%s, %
lu
)
\n
"
,
debugstr_w
(
hostname
),
portnumber
);
if
(
!
(
hostnameU
=
strWtoU
(
hostname
?
hostname
:
L"localhost"
)))
return
NULL
;
if
(
!
(
url
=
urlify_hostnames
(
"ldap://"
,
hostnameU
,
portnumber
)))
goto
exit
;
...
...
@@ -365,7 +365,7 @@ LDAP * CDECL ldap_openA( char *hostname, ULONG portnumber )
LDAP
*
ld
;
WCHAR
*
hostnameW
=
NULL
;
TRACE
(
"(%s, %
d
)
\n
"
,
debugstr_a
(
hostname
),
portnumber
);
TRACE
(
"(%s, %
lu
)
\n
"
,
debugstr_a
(
hostname
),
portnumber
);
if
(
hostname
&&
!
(
hostnameW
=
strAtoW
(
hostname
)))
return
NULL
;
...
...
@@ -401,7 +401,7 @@ LDAP * CDECL ldap_openW( WCHAR *hostname, ULONG portnumber )
LDAP
*
ld
=
NULL
;
char
*
hostnameU
,
*
url
=
NULL
;
TRACE
(
"(%s, %
d
)
\n
"
,
debugstr_w
(
hostname
),
portnumber
);
TRACE
(
"(%s, %
lu
)
\n
"
,
debugstr_w
(
hostname
),
portnumber
);
if
(
!
(
hostnameU
=
strWtoU
(
hostname
?
hostname
:
L"localhost"
)))
return
NULL
;
if
(
!
(
url
=
urlify_hostnames
(
"ldap://"
,
hostnameU
,
portnumber
)))
goto
exit
;
...
...
@@ -424,7 +424,7 @@ LDAP * CDECL ldap_sslinitA( char *hostname, ULONG portnumber, int secure )
LDAP
*
ld
;
WCHAR
*
hostnameW
=
NULL
;
TRACE
(
"(%s, %
d, 0x%08x
)
\n
"
,
debugstr_a
(
hostname
),
portnumber
,
secure
);
TRACE
(
"(%s, %
lu, %d
)
\n
"
,
debugstr_a
(
hostname
),
portnumber
,
secure
);
if
(
hostname
&&
!
(
hostnameW
=
strAtoW
(
hostname
)))
return
NULL
;
...
...
@@ -462,7 +462,7 @@ LDAP * CDECL ldap_sslinitW( WCHAR *hostname, ULONG portnumber, int secure )
LDAP
*
ld
=
NULL
;
char
*
hostnameU
,
*
url
=
NULL
;
TRACE
(
"(%s, %
d, 0x%08x
)
\n
"
,
debugstr_w
(
hostname
),
portnumber
,
secure
);
TRACE
(
"(%s, %
lu, %d
)
\n
"
,
debugstr_w
(
hostname
),
portnumber
,
secure
);
if
(
!
(
hostnameU
=
strWtoU
(
hostname
?
hostname
:
L"localhost"
)))
return
NULL
;
...
...
dlls/wldap32/main.c
View file @
5d0b23be
...
...
@@ -34,7 +34,7 @@ unixlib_handle_t ldap_handle = 0;
BOOL
WINAPI
DllMain
(
HINSTANCE
hinst
,
DWORD
reason
,
LPVOID
reserved
)
{
TRACE
(
"(%p, %
d
, %p)
\n
"
,
hinst
,
reason
,
reserved
);
TRACE
(
"(%p, %
#lx
, %p)
\n
"
,
hinst
,
reason
,
reserved
);
switch
(
reason
)
{
...
...
dlls/wldap32/misc.c
View file @
5d0b23be
...
...
@@ -45,7 +45,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wldap32);
*/
ULONG
CDECL
ldap_abandon
(
LDAP
*
ld
,
ULONG
msgid
)
{
TRACE
(
"(%p,
0x%08
x)
\n
"
,
ld
,
msgid
);
TRACE
(
"(%p,
%#l
x)
\n
"
,
ld
,
msgid
);
if
(
!
ld
)
return
~
0u
;
else
...
...
@@ -223,7 +223,7 @@ ULONG CDECL ldap_escape_filter_elementA( char *src, ULONG srclen, char *dst, ULO
{
ULONG
len
=
get_escape_size
(
src
,
srclen
);
TRACE
(
"(%p,
0x%08x, %p, 0x%08
x)
\n
"
,
src
,
srclen
,
dst
,
dstlen
);
TRACE
(
"(%p,
%#lx, %p, %#l
x)
\n
"
,
src
,
srclen
,
dst
,
dstlen
);
if
(
!
dst
)
return
len
;
if
(
!
src
||
dstlen
<
len
)
return
LDAP_PARAM_ERROR
;
...
...
@@ -251,7 +251,7 @@ ULONG CDECL ldap_escape_filter_elementW( char *src, ULONG srclen, WCHAR *dst, UL
{
ULONG
len
=
get_escape_size
(
src
,
srclen
);
TRACE
(
"(%p,
0x%08x, %p, 0x%08
x)
\n
"
,
src
,
srclen
,
dst
,
dstlen
);
TRACE
(
"(%p,
%#lx, %p, %#l
x)
\n
"
,
src
,
srclen
,
dst
,
dstlen
);
if
(
!
dst
)
return
len
;
...
...
@@ -629,7 +629,7 @@ ULONG CDECL ldap_result( LDAP *ld, ULONG msgid, ULONG all, struct l_timeval *tim
void
*
msgU
=
NULL
;
ULONG
ret
=
~
0u
;
TRACE
(
"(%p,
0x%08x, 0x%08
x, %p, %p)
\n
"
,
ld
,
msgid
,
all
,
timeout
,
res
);
TRACE
(
"(%p,
%#lx, %#l
x, %p, %p)
\n
"
,
ld
,
msgid
,
all
,
timeout
,
res
);
if
(
ld
&&
res
&&
msgid
!=
~
0u
)
{
...
...
dlls/wldap32/option.c
View file @
5d0b23be
...
...
@@ -395,7 +395,7 @@ static BOOL query_supported_server_ctrls( LDAP *ld )
struct
ldap_get_values_len_params
get_params
=
{
CTX
(
ld
),
entry
,
attrs
[
0
],
&
ctrls
};
LDAP_CALL
(
ldap_get_values_len
,
&
get_params
);
count
=
LDAP_CALL
(
ldap_count_values_len
,
ctrls
);
for
(
i
=
0
;
i
<
count
;
i
++
)
TRACE
(
"%u: %s
\n
"
,
i
,
debugstr_an
(
ctrls
[
i
]
->
bv_val
,
ctrls
[
i
]
->
bv_len
)
);
for
(
i
=
0
;
i
<
count
;
i
++
)
TRACE
(
"%lu: %s
\n
"
,
i
,
debugstr_an
(
ctrls
[
i
]
->
bv_val
,
ctrls
[
i
]
->
bv_len
)
);
*
(
struct
bervalU
***
)
&
SERVER_CTRLS
(
ld
)
=
ctrls
;
}
}
...
...
dlls/wldap32/page.c
View file @
5d0b23be
...
...
@@ -45,7 +45,7 @@ ULONG CDECL ldap_create_page_controlA( LDAP *ld, ULONG pagesize, struct berval *
ULONG
ret
;
LDAPControlW
*
controlW
=
NULL
;
TRACE
(
"(%p,
0x%08
x, %p, 0x%02x, %p)
\n
"
,
ld
,
pagesize
,
cookie
,
critical
,
control
);
TRACE
(
"(%p,
%#l
x, %p, 0x%02x, %p)
\n
"
,
ld
,
pagesize
,
cookie
,
critical
,
control
);
if
(
!
ld
||
!
control
||
pagesize
>
INT_MAX
)
return
LDAP_PARAM_ERROR
;
...
...
@@ -129,7 +129,7 @@ static ULONG create_page_control( ULONG pagesize, struct berval *cookie, UCHAR c
ULONG
CDECL
ldap_create_page_controlW
(
LDAP
*
ld
,
ULONG
pagesize
,
struct
berval
*
cookie
,
UCHAR
critical
,
LDAPControlW
**
control
)
{
TRACE
(
"(%p,
0x%08
x, %p, 0x%02x, %p)
\n
"
,
ld
,
pagesize
,
cookie
,
critical
,
control
);
TRACE
(
"(%p,
%#l
x, %p, 0x%02x, %p)
\n
"
,
ld
,
pagesize
,
cookie
,
critical
,
control
);
if
(
!
ld
||
!
control
||
pagesize
>
INT_MAX
)
return
LDAP_PARAM_ERROR
;
return
create_page_control
(
pagesize
,
cookie
,
critical
,
control
);
...
...
@@ -137,7 +137,7 @@ ULONG CDECL ldap_create_page_controlW( LDAP *ld, ULONG pagesize, struct berval *
ULONG
CDECL
ldap_get_next_page
(
LDAP
*
ld
,
LDAPSearch
*
search
,
ULONG
pagesize
,
ULONG
*
message
)
{
FIXME
(
"(%p, %p,
0x%08
x, %p)
\n
"
,
ld
,
search
,
pagesize
,
message
);
FIXME
(
"(%p, %p,
%#l
x, %p)
\n
"
,
ld
,
search
,
pagesize
,
message
);
if
(
!
ld
)
return
~
0u
;
return
LDAP_NOT_SUPPORTED
;
...
...
@@ -148,7 +148,7 @@ ULONG CDECL ldap_get_next_page_s( LDAP *ld, LDAPSearch *search, struct l_timeval
{
ULONG
ret
;
TRACE
(
"(%p, %p, %p, %u, %p, %p)
\n
"
,
ld
,
search
,
timeout
,
pagesize
,
count
,
results
);
TRACE
(
"(%p, %p, %p, %
l
u, %p, %p)
\n
"
,
ld
,
search
,
timeout
,
pagesize
,
count
,
results
);
if
(
!
ld
||
!
search
||
!
count
||
!
results
)
return
~
0u
;
...
...
@@ -203,7 +203,8 @@ ULONG CDECL ldap_get_paged_count( LDAP *ld, LDAPSearch *search, ULONG *count, LD
ret
=
ldap_parse_page_controlW
(
ld
,
server_ctrls
,
count
,
&
search
->
cookie
);
if
(
ret
==
LDAP_SUCCESS
)
TRACE
(
"new search->cookie: %s, count %u
\n
"
,
debugstr_an
(
search
->
cookie
->
bv_val
,
search
->
cookie
->
bv_len
),
*
count
);
TRACE
(
"new search->cookie: %s, count %lu
\n
"
,
debugstr_an
(
search
->
cookie
->
bv_val
,
search
->
cookie
->
bv_len
),
*
count
);
ldap_controls_freeW
(
server_ctrls
);
return
ret
;
...
...
@@ -292,7 +293,7 @@ LDAPSearch * CDECL ldap_search_init_pageA( LDAP *ld, char *dn, ULONG scope, char
ULONG
attrsonly
,
LDAPControlA
**
serverctrls
,
LDAPControlA
**
clientctrls
,
ULONG
timelimit
,
ULONG
sizelimit
,
LDAPSortKeyA
**
sortkeys
)
{
FIXME
(
"(%p, %s,
0x%08x, %s, %p, 0x%08x, %p, %p, 0x%08x, 0x%08
x, %p)
\n
"
,
ld
,
debugstr_a
(
dn
),
scope
,
FIXME
(
"(%p, %s,
%#lx, %s, %p, %#lx, %p, %p, %#lx, %#l
x, %p)
\n
"
,
ld
,
debugstr_a
(
dn
),
scope
,
debugstr_a
(
filter
),
attrs
,
attrsonly
,
serverctrls
,
clientctrls
,
timelimit
,
sizelimit
,
sortkeys
);
return
NULL
;
}
...
...
@@ -304,7 +305,7 @@ LDAPSearch * CDECL ldap_search_init_pageW( LDAP *ld, WCHAR *dn, ULONG scope, WCH
LDAPSearch
*
search
;
DWORD
i
,
len
;
TRACE
(
"(%p, %s,
0x%08x, %s, %p, 0x%08x, %p, %p, 0x%08x, 0x%08
x, %p)
\n
"
,
ld
,
debugstr_w
(
dn
),
scope
,
TRACE
(
"(%p, %s,
%#lx, %s, %p, %#lx, %p, %p, %#lx, %#l
x, %p)
\n
"
,
ld
,
debugstr_w
(
dn
),
scope
,
debugstr_w
(
filter
),
attrs
,
attrsonly
,
serverctrls
,
clientctrls
,
timelimit
,
sizelimit
,
sortkeys
);
if
(
!
(
search
=
calloc
(
1
,
sizeof
(
*
search
)
)))
...
...
dlls/wldap32/search.c
View file @
5d0b23be
...
...
@@ -40,7 +40,7 @@ ULONG CDECL ldap_searchA( LDAP *ld, char *base, ULONG scope, char *filter, char
ULONG
ret
=
LDAP_NO_MEMORY
;
WCHAR
*
baseW
=
NULL
,
*
filterW
=
NULL
,
**
attrsW
=
NULL
;
TRACE
(
"(%p, %s,
0x%08x, %s, %p, 0x%08
x)
\n
"
,
ld
,
debugstr_a
(
base
),
scope
,
debugstr_a
(
filter
),
attrs
,
attrsonly
);
TRACE
(
"(%p, %s,
%#lx, %s, %p, %#l
x)
\n
"
,
ld
,
debugstr_a
(
base
),
scope
,
debugstr_a
(
filter
),
attrs
,
attrsonly
);
if
(
!
ld
)
return
~
0u
;
...
...
@@ -83,7 +83,7 @@ exit:
ULONG
CDECL
ldap_searchW
(
LDAP
*
ld
,
WCHAR
*
base
,
ULONG
scope
,
WCHAR
*
filter
,
WCHAR
**
attrs
,
ULONG
attrsonly
)
{
ULONG
ret
,
msg
;
TRACE
(
"(%p, %s,
0x%08x, %s, %p, 0x%08
x)
\n
"
,
ld
,
debugstr_w
(
base
),
scope
,
debugstr_w
(
filter
),
attrs
,
attrsonly
);
TRACE
(
"(%p, %s,
%#lx, %s, %p, %#l
x)
\n
"
,
ld
,
debugstr_w
(
base
),
scope
,
debugstr_w
(
filter
),
attrs
,
attrsonly
);
ret
=
ldap_search_extW
(
ld
,
base
,
scope
,
filter
,
attrs
,
attrsonly
,
NULL
,
NULL
,
0
,
0
,
&
msg
);
if
(
ret
==
LDAP_SUCCESS
)
return
msg
;
...
...
@@ -102,7 +102,7 @@ ULONG CDECL ldap_search_extA( LDAP *ld, char *base, ULONG scope, char *filter, c
WCHAR
*
baseW
=
NULL
,
*
filterW
=
NULL
,
**
attrsW
=
NULL
;
LDAPControlW
**
serverctrlsW
=
NULL
,
**
clientctrlsW
=
NULL
;
TRACE
(
"(%p, %s,
0x%08x, %s, %p, 0x%08x, %p, %p, 0x%08x, 0x%08
x, %p)
\n
"
,
ld
,
debugstr_a
(
base
),
scope
,
TRACE
(
"(%p, %s,
%#lx, %s, %p, %#lx, %p, %p, %#lx, %#l
x, %p)
\n
"
,
ld
,
debugstr_a
(
base
),
scope
,
debugstr_a
(
filter
),
attrs
,
attrsonly
,
serverctrls
,
clientctrls
,
timelimit
,
sizelimit
,
message
);
if
(
!
ld
)
return
LDAP_PARAM_ERROR
;
...
...
@@ -162,7 +162,7 @@ ULONG CDECL ldap_search_extW( LDAP *ld, WCHAR *base, ULONG scope, WCHAR *filter,
LDAPControlU
**
serverctrlsU
=
NULL
,
**
clientctrlsU
=
NULL
;
struct
timevalU
timevalU
;
TRACE
(
"(%p, %s,
0x%08x, %s, %p, 0x%08x, %p, %p, 0x%08x, 0x%08
x, %p)
\n
"
,
ld
,
debugstr_w
(
base
),
scope
,
TRACE
(
"(%p, %s,
%#lx, %s, %p, %#lx, %p, %p, %#lx, %#l
x, %p)
\n
"
,
ld
,
debugstr_w
(
base
),
scope
,
debugstr_w
(
filter
),
attrs
,
attrsonly
,
serverctrls
,
clientctrls
,
timelimit
,
sizelimit
,
message
);
if
(
!
ld
)
return
~
0u
;
...
...
@@ -203,7 +203,7 @@ ULONG CDECL ldap_search_ext_sA( LDAP *ld, char *base, ULONG scope, char *filter,
WCHAR
*
baseW
=
NULL
,
*
filterW
=
NULL
,
**
attrsW
=
NULL
;
LDAPControlW
**
serverctrlsW
=
NULL
,
**
clientctrlsW
=
NULL
;
TRACE
(
"(%p, %s,
0x%08x, %s, %p, 0x%08x, %p, %p, %p, 0x%08
x, %p)
\n
"
,
ld
,
debugstr_a
(
base
),
scope
,
TRACE
(
"(%p, %s,
%#lx, %s, %p, %#lx, %p, %p, %p, %#l
x, %p)
\n
"
,
ld
,
debugstr_a
(
base
),
scope
,
debugstr_a
(
filter
),
attrs
,
attrsonly
,
serverctrls
,
clientctrls
,
timeout
,
sizelimit
,
res
);
if
(
!
ld
||
!
res
)
return
LDAP_PARAM_ERROR
;
...
...
@@ -262,7 +262,7 @@ ULONG CDECL ldap_search_ext_sW( LDAP *ld, WCHAR *base, ULONG scope, WCHAR *filte
struct
timevalU
timevalU
;
void
*
msgU
=
NULL
;
TRACE
(
"(%p, %s,
0x%08x, %s, %p, 0x%08x, %p, %p, %p, 0x%08
x, %p)
\n
"
,
ld
,
debugstr_w
(
base
),
scope
,
TRACE
(
"(%p, %s,
%#lx, %s, %p, %#lx, %p, %p, %p, %#l
x, %p)
\n
"
,
ld
,
debugstr_w
(
base
),
scope
,
debugstr_w
(
filter
),
attrs
,
attrsonly
,
serverctrls
,
clientctrls
,
timeout
,
sizelimit
,
res
);
if
(
!
ld
||
!
res
)
return
LDAP_PARAM_ERROR
;
...
...
@@ -320,7 +320,7 @@ ULONG CDECL ldap_search_sA( LDAP *ld, char *base, ULONG scope, char *filter, cha
ULONG
ret
=
LDAP_NO_MEMORY
;
WCHAR
*
baseW
=
NULL
,
*
filterW
=
NULL
,
**
attrsW
=
NULL
;
TRACE
(
"(%p, %s,
0x%08x, %s, %p, 0x%08
x, %p)
\n
"
,
ld
,
debugstr_a
(
base
),
scope
,
debugstr_a
(
filter
),
attrs
,
TRACE
(
"(%p, %s,
%#lx, %s, %p, %#l
x, %p)
\n
"
,
ld
,
debugstr_a
(
base
),
scope
,
debugstr_a
(
filter
),
attrs
,
attrsonly
,
res
);
if
(
!
ld
||
!
res
)
return
LDAP_PARAM_ERROR
;
...
...
@@ -363,7 +363,7 @@ exit:
ULONG
CDECL
ldap_search_sW
(
LDAP
*
ld
,
WCHAR
*
base
,
ULONG
scope
,
WCHAR
*
filter
,
WCHAR
**
attrs
,
ULONG
attrsonly
,
LDAPMessage
**
res
)
{
TRACE
(
"(%p, %s,
0x%08x, %s, %p, 0x%08
x, %p)
\n
"
,
ld
,
debugstr_w
(
base
),
scope
,
debugstr_w
(
filter
),
attrs
,
TRACE
(
"(%p, %s,
%#lx, %s, %p, %#l
x, %p)
\n
"
,
ld
,
debugstr_w
(
base
),
scope
,
debugstr_w
(
filter
),
attrs
,
attrsonly
,
res
);
return
ldap_search_ext_sW
(
ld
,
base
,
scope
,
filter
,
attrs
,
attrsonly
,
NULL
,
NULL
,
NULL
,
0
,
res
);
}
...
...
@@ -379,7 +379,7 @@ ULONG CDECL ldap_search_stA( LDAP *ld, const PCHAR base, ULONG scope, const PCHA
ULONG
ret
=
LDAP_NO_MEMORY
;
WCHAR
*
baseW
=
NULL
,
*
filterW
=
NULL
,
**
attrsW
=
NULL
;
TRACE
(
"(%p, %s,
0x%08x, %s, %p, 0x%08
x, %p, %p)
\n
"
,
ld
,
debugstr_a
(
base
),
scope
,
debugstr_a
(
filter
),
attrs
,
TRACE
(
"(%p, %s,
%#lx, %s, %p, %#l
x, %p, %p)
\n
"
,
ld
,
debugstr_a
(
base
),
scope
,
debugstr_a
(
filter
),
attrs
,
attrsonly
,
timeout
,
res
);
if
(
!
ld
||
!
res
)
return
LDAP_PARAM_ERROR
;
...
...
@@ -423,7 +423,7 @@ exit:
ULONG
CDECL
ldap_search_stW
(
LDAP
*
ld
,
const
PWCHAR
base
,
ULONG
scope
,
const
PWCHAR
filter
,
WCHAR
**
attrs
,
ULONG
attrsonly
,
struct
l_timeval
*
timeout
,
LDAPMessage
**
res
)
{
TRACE
(
"(%p, %s,
0x%08x, %s, %p, 0x%08
x, %p, %p)
\n
"
,
ld
,
debugstr_w
(
base
),
scope
,
debugstr_w
(
filter
),
attrs
,
TRACE
(
"(%p, %s,
%#lx, %s, %p, %#l
x, %p, %p)
\n
"
,
ld
,
debugstr_w
(
base
),
scope
,
debugstr_w
(
filter
),
attrs
,
attrsonly
,
timeout
,
res
);
return
ldap_search_ext_sW
(
ld
,
base
,
scope
,
filter
,
attrs
,
attrsonly
,
NULL
,
NULL
,
timeout
,
0
,
res
);
}
dlls/wldap32/tests/Makefile.in
View file @
5d0b23be
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
wldap32.dll
IMPORTS
=
wldap32
...
...
dlls/wldap32/tests/ber.c
View file @
5d0b23be
...
...
@@ -41,7 +41,7 @@ static void test_ber_printf(void)
ret
=
ber_flatten
(
ber
,
&
bv
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
todo_wine
ok
(
bv
->
bv_len
==
12
,
"got %d
\n
"
,
bv
->
bv_len
);
todo_wine
ok
(
bv
->
bv_len
==
12
,
"got %
l
d
\n
"
,
bv
->
bv_len
);
if
(
bv
->
bv_len
==
12
)
ok
(
!
memcmp
(
bv
->
bv_val
,
"0
\x84\x00\x00\x00\x06\x02\x04\xff\xff\xff\xff
"
,
12
),
"got %s
\n
"
,
wine_dbgstr_an
(
bv
->
bv_val
,
12
)
);
ber_bvfree
(
bv
);
...
...
dlls/wldap32/tests/parse.c
View file @
5d0b23be
...
...
@@ -51,7 +51,7 @@ static void test_ldap_parse_sort_control( LDAP *ld )
sortkeys
[
0
]
=
&
key
;
sortkeys
[
1
]
=
NULL
;
ret
=
ldap_create_sort_controlA
(
ld
,
sortkeys
,
0
,
&
sort
);
ok
(
!
ret
,
"ldap_create_sort_controlA failed
0x%
x
\n
"
,
ret
);
ok
(
!
ret
,
"ldap_create_sort_controlA failed
%#l
x
\n
"
,
ret
);
ctrls
[
0
]
=
sort
;
ctrls
[
1
]
=
NULL
;
...
...
@@ -64,33 +64,33 @@ static void test_ldap_parse_sort_control( LDAP *ld )
ldap_control_freeA
(
sort
);
return
;
}
ok
(
!
ret
,
"ldap_search_ext_sA failed
0x%
x
\n
"
,
ret
);
ok
(
!
ret
,
"ldap_search_ext_sA failed
%#l
x
\n
"
,
ret
);
ok
(
res
!=
NULL
,
"expected res != NULL
\n
"
);
if
(
GetProcAddress
(
GetModuleHandleA
(
"wldap32.dll"
),
"ber_init"
))
{
ret
=
ldap_parse_resultA
(
NULL
,
res
,
&
result
,
NULL
,
NULL
,
NULL
,
&
server_ctrls
,
1
);
ok
(
ret
==
LDAP_PARAM_ERROR
,
"ldap_parse_resultA failed
0x%
x
\n
"
,
ret
);
ok
(
ret
==
LDAP_PARAM_ERROR
,
"ldap_parse_resultA failed
%#l
x
\n
"
,
ret
);
}
else
win_skip
(
"Test would crash on older wldap32 versions
\n
"
);
result
=
~
0u
;
ret
=
ldap_parse_resultA
(
ld
,
res
,
&
result
,
NULL
,
NULL
,
NULL
,
&
server_ctrls
,
1
);
ok
(
!
ret
,
"ldap_parse_resultA failed
0x%
x
\n
"
,
ret
);
ok
(
!
result
,
"got
0x%
x expected 0
\n
"
,
result
);
ok
(
!
ret
,
"ldap_parse_resultA failed
%#l
x
\n
"
,
ret
);
ok
(
!
result
,
"got
%#l
x expected 0
\n
"
,
result
);
ret
=
ldap_parse_sort_controlA
(
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
ret
==
LDAP_PARAM_ERROR
,
"ldap_parse_sort_controlA failed
0x%d
\n
"
,
ret
);
ok
(
ret
==
LDAP_PARAM_ERROR
,
"ldap_parse_sort_controlA failed
%#lx
\n
"
,
ret
);
ret
=
ldap_parse_sort_controlA
(
ld
,
NULL
,
NULL
,
NULL
);
ok
(
ret
==
LDAP_CONTROL_NOT_FOUND
,
"ldap_parse_sort_controlA failed
0x%
x
\n
"
,
ret
);
ok
(
ret
==
LDAP_CONTROL_NOT_FOUND
,
"ldap_parse_sort_controlA failed
%#l
x
\n
"
,
ret
);
ret
=
ldap_parse_sort_controlA
(
ld
,
NULL
,
&
result
,
NULL
);
ok
(
ret
==
LDAP_CONTROL_NOT_FOUND
,
"ldap_parse_sort_controlA failed
0x%
x
\n
"
,
ret
);
ok
(
ret
==
LDAP_CONTROL_NOT_FOUND
,
"ldap_parse_sort_controlA failed
%#l
x
\n
"
,
ret
);
ret
=
ldap_parse_sort_controlA
(
ld
,
server_ctrls
,
&
result
,
NULL
);
ok
(
ret
==
LDAP_CONTROL_NOT_FOUND
,
"ldap_parse_sort_controlA failed
0x%
x
\n
"
,
ret
);
ok
(
ret
==
LDAP_CONTROL_NOT_FOUND
,
"ldap_parse_sort_controlA failed
%#l
x
\n
"
,
ret
);
ldap_control_freeA
(
sort
);
ldap_controls_freeA
(
server_ctrls
);
...
...
@@ -108,11 +108,11 @@ static void test_ldap_search_extW( LDAP *ld )
skip
(
"test server can't be reached
\n
"
);
return
;
}
ok
(
!
ret
,
"ldap_search_extW failed
0x%08
x
\n
"
,
ret
);
ok
(
!
ret
,
"ldap_search_extW failed
%#l
x
\n
"
,
ret
);
timelimit
=
0
;
ret
=
ldap_search_extW
(
ld
,
base
,
LDAP_SCOPE_SUBTREE
,
filter
,
NULL
,
0
,
NULL
,
NULL
,
timelimit
,
0
,
&
message
);
ok
(
!
ret
,
"ldap_search_extW failed
0x%08
x
\n
"
,
ret
);
ok
(
!
ret
,
"ldap_search_extW failed
%#l
x
\n
"
,
ret
);
}
static
void
test_ldap_set_optionW
(
LDAP
*
ld
)
...
...
@@ -127,10 +127,10 @@ static void test_ldap_set_optionW( LDAP *ld )
}
ret
=
ldap_set_optionW
(
ld
,
LDAP_OPT_REFERRALS
,
LDAP_OPT_OFF
);
ok
(
!
ret
||
broken
(
ret
==
LDAP_PARAM_ERROR
)
/* nt4, win2k */
,
"ldap_set_optionW failed
0x%08
x
\n
"
,
ret
);
ok
(
!
ret
||
broken
(
ret
==
LDAP_PARAM_ERROR
)
/* nt4, win2k */
,
"ldap_set_optionW failed
%#l
x
\n
"
,
ret
);
ret
=
ldap_set_optionW
(
ld
,
LDAP_OPT_REFERRALS
,
(
void
*
)
&
oldvalue
);
ok
(
!
ret
,
"ldap_set_optionW failed
0x%08
x
\n
"
,
ret
);
ok
(
!
ret
,
"ldap_set_optionW failed
%#l
x
\n
"
,
ret
);
}
static
void
test_ldap_get_optionW
(
LDAP
*
ld
)
...
...
@@ -138,8 +138,8 @@ static void test_ldap_get_optionW( LDAP *ld )
ULONG
ret
,
version
;
ret
=
ldap_get_optionW
(
ld
,
LDAP_OPT_PROTOCOL_VERSION
,
&
version
);
ok
(
!
ret
,
"ldap_get_optionW failed
0x%08
x
\n
"
,
ret
);
ok
(
version
==
LDAP_VERSION3
,
"got %u
\n
"
,
version
);
ok
(
!
ret
,
"ldap_get_optionW failed
%#l
x
\n
"
,
ret
);
ok
(
version
==
LDAP_VERSION3
,
"got %
l
u
\n
"
,
version
);
}
static
void
test_ldap_bind_sA
(
void
)
...
...
@@ -161,10 +161,10 @@ static void test_ldap_bind_sA( void )
}
ret
=
ldap_connect
(
ld
,
NULL
);
ok
(
!
ret
,
"ldap_connect failed
0x%08
x
\n
"
,
ret
);
ok
(
!
ret
,
"ldap_connect failed
%#l
x
\n
"
,
ret
);
ret
=
ldap_bind_sA
(
ld
,
(
char
*
)
"CN=read-only-admin,DC=example,DC=com"
,
(
char
*
)
"password"
,
LDAP_AUTH_SIMPLE
);
ok
(
!
ret
,
"ldap_bind_s failed
0x%08
x
\n
"
,
ret
);
ok
(
!
ret
,
"ldap_bind_s failed
%#l
x
\n
"
,
ret
);
ldap_unbind
(
ld
);
}
...
...
@@ -192,7 +192,7 @@ static void test_ldap_server_control( void )
}
ret
=
ldap_connect
(
ld
,
NULL
);
ok
(
!
ret
,
"ldap_connect failed
0x%08
x
\n
"
,
ret
);
ok
(
!
ret
,
"ldap_connect failed
%#l
x
\n
"
,
ret
);
/* test setting a not supported server control */
mask
.
ldctl_oid
=
(
WCHAR
*
)
L"1.2.840.113556.1.4.801"
;
...
...
@@ -202,11 +202,11 @@ static void test_ldap_server_control( void )
ctrls
[
0
]
=
&
mask
;
ctrls
[
1
]
=
NULL
;
ret
=
ldap_set_optionW
(
ld
,
LDAP_OPT_SERVER_CONTROLS
,
ctrls
);
ok
(
ret
==
LDAP_PARAM_ERROR
,
"ldap_set_optionW should fail:
0x%
x
\n
"
,
ret
);
ok
(
ret
==
LDAP_PARAM_ERROR
,
"ldap_set_optionW should fail:
%#l
x
\n
"
,
ret
);
res
=
NULL
;
ret
=
ldap_search_sA
(
ld
,
(
char
*
)
"OU=scientists,DC=example,DC=com"
,
LDAP_SCOPE_BASE
,
(
char
*
)
"(objectclass=*)"
,
NULL
,
FALSE
,
&
res
);
ok
(
!
ret
,
"ldap_search_sA failed
0x%
x
\n
"
,
ret
);
ok
(
!
ret
,
"ldap_search_sA failed
%#l
x
\n
"
,
ret
);
ok
(
res
!=
NULL
,
"expected res != NULL
\n
"
);
ldap_msgfree
(
res
);
...
...
@@ -242,12 +242,12 @@ static void test_ldap_paged_search(void)
count
=
0xdeadbeef
;
res
=
NULL
;
ret
=
ldap_get_next_page_s
(
ld
,
search
,
NULL
,
1
,
&
count
,
&
res
);
ok
(
!
ret
,
"ldap_get_next_page_s failed
0x%
x
\n
"
,
ret
);
ok
(
!
ret
,
"ldap_get_next_page_s failed
%#l
x
\n
"
,
ret
);
ok
(
res
!=
NULL
,
"expected res != NULL
\n
"
);
ok
(
count
==
0
,
"got %u
\n
"
,
count
);
ok
(
count
==
0
,
"got %
l
u
\n
"
,
count
);
count
=
ldap_count_entries
(
ld
,
res
);
ok
(
count
==
1
,
"got %u
\n
"
,
count
);
ok
(
count
==
1
,
"got %
l
u
\n
"
,
count
);
entry
=
ldap_first_entry
(
ld
,
res
);
ok
(
res
!=
NULL
,
"expected entry != NULL
\n
"
);
...
...
@@ -264,9 +264,9 @@ static void test_ldap_paged_search(void)
count
=
0xdeadbeef
;
res
=
(
void
*
)
0xdeadbeef
;
ret
=
ldap_get_next_page_s
(
ld
,
search
,
NULL
,
1
,
&
count
,
&
res
);
ok
(
ret
==
LDAP_NO_RESULTS_RETURNED
,
"got
0x%
x
\n
"
,
ret
);
ok
(
ret
==
LDAP_NO_RESULTS_RETURNED
,
"got
%#l
x
\n
"
,
ret
);
ok
(
!
res
,
"expected res == NULL
\n
"
);
ok
(
count
==
0
,
"got %u
\n
"
,
count
);
ok
(
count
==
0
,
"got %
l
u
\n
"
,
count
);
ldap_search_abandon_page
(
ld
,
search
);
ldap_unbind
(
ld
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment