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
accdabad
Commit
accdabad
authored
Oct 05, 2017
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wldap32: Create version 3 contexts by default.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8fc6b58d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
3 deletions
+24
-3
init.c
dlls/wldap32/init.c
+14
-3
parse.c
dlls/wldap32/tests/parse.c
+10
-0
No files found.
dlls/wldap32/init.c
View file @
accdabad
...
...
@@ -206,6 +206,17 @@ static char *urlify_hostnames( const char *scheme, char *hostnames, ULONG port )
WINE_DEFAULT_DEBUG_CHANNEL
(
wldap32
);
#ifdef HAVE_LDAP
static
LDAP
*
create_context
(
const
char
*
url
)
{
LDAP
*
ld
;
int
version
=
LDAP_VERSION3
;
if
(
ldap_initialize
(
&
ld
,
url
)
!=
LDAP_SUCCESS
)
return
NULL
;
ldap_set_option
(
ld
,
LDAP_OPT_PROTOCOL_VERSION
,
&
version
);
return
ld
;
}
#endif
/***********************************************************************
* cldap_openA (WLDAP32.@)
*
...
...
@@ -276,7 +287,7 @@ WLDAP32_LDAP * CDECL cldap_openW( PWCHAR hostname, ULONG portnumber )
url
=
urlify_hostnames
(
"cldap://"
,
hostnameU
,
portnumber
);
if
(
!
url
)
goto
exit
;
ld
ap_initialize
(
&
ld
,
url
);
ld
=
create_context
(
url
);
exit:
strfreeU
(
hostnameU
);
...
...
@@ -385,7 +396,7 @@ WLDAP32_LDAP * CDECL ldap_initW( const PWCHAR hostname, ULONG portnumber )
url
=
urlify_hostnames
(
"ldap://"
,
hostnameU
,
portnumber
);
if
(
!
url
)
goto
exit
;
ld
ap_initialize
(
&
ld
,
url
);
ld
=
create_context
(
url
);
exit:
strfreeU
(
hostnameU
);
...
...
@@ -467,7 +478,7 @@ WLDAP32_LDAP * CDECL ldap_openW( PWCHAR hostname, ULONG portnumber )
url
=
urlify_hostnames
(
"ldap://"
,
hostnameU
,
portnumber
);
if
(
!
url
)
goto
exit
;
ld
ap_initialize
(
&
ld
,
url
);
ld
=
create_context
(
url
);
exit:
strfreeU
(
hostnameU
);
...
...
dlls/wldap32/tests/parse.c
View file @
accdabad
...
...
@@ -123,6 +123,15 @@ static void test_ldap_set_optionW( LDAP *ld )
ok
(
!
ret
,
"ldap_set_optionW failed 0x%08x
\n
"
,
ret
);
}
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%08x
\n
"
,
ret
);
ok
(
version
==
LDAP_VERSION3
,
"got %u
\n
"
,
version
);
}
START_TEST
(
parse
)
{
LDAP
*
ld
;
...
...
@@ -132,6 +141,7 @@ START_TEST (parse)
test_ldap_parse_sort_control
(
ld
);
test_ldap_search_extW
(
ld
);
test_ldap_get_optionW
(
ld
);
test_ldap_set_optionW
(
ld
);
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