Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
42d0fa8b
Commit
42d0fa8b
authored
Apr 02, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Apr 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wldap32: Allow LDAP_OPT_REFERRALS to be set from a pointer.
parent
e2ead2fb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
11 deletions
+42
-11
option.c
dlls/wldap32/option.c
+21
-2
parse.c
dlls/wldap32/tests/parse.c
+18
-9
winldap_private.h
dlls/wldap32/winldap_private.h
+3
-0
No files found.
dlls/wldap32/option.c
View file @
42d0fa8b
...
...
@@ -431,12 +431,31 @@ ULONG CDECL ldap_set_optionW( LDAP *ld, int option, void *value )
}
case
WLDAP32_LDAP_OPT_REFERRALS
:
{
if
(
value
==
WLDAP32_LDAP_OPT_OFF
)
value
=
LDAP_OPT_OFF
;
else
if
(
value
!=
WLDAP32_LDAP_OPT_ON
)
if
(
value
==
WLDAP32_LDAP_OPT_ON
)
value
=
LDAP_OPT_ON
;
else
if
(
value
==
WLDAP32_LDAP_OPT_OFF
)
value
=
LDAP_OPT_OFF
;
else
if
(
value
==
(
void
*
)
LDAP_CHASE_SUBORDINATE_REFERRALS
||
value
==
(
void
*
)
LDAP_CHASE_EXTERNAL_REFERRALS
||
value
==
(
void
*
)(
LDAP_CHASE_SUBORDINATE_REFERRALS
|
LDAP_CHASE_EXTERNAL_REFERRALS
))
{
FIXME
(
"upgrading referral value %p to LDAP_OPT_ON (OpenLDAP lacks sufficient granularity)
\n
"
,
value
);
value
=
LDAP_OPT_ON
;
}
else
if
(
*
(
ULONG
*
)
value
==
1
)
value
=
LDAP_OPT_ON
;
else
if
(
*
(
ULONG
*
)
value
==
0
)
value
=
LDAP_OPT_OFF
;
else
if
(
*
(
ULONG
*
)
value
==
LDAP_CHASE_SUBORDINATE_REFERRALS
||
*
(
ULONG
*
)
value
==
LDAP_CHASE_EXTERNAL_REFERRALS
||
*
(
ULONG
*
)
value
==
(
LDAP_CHASE_SUBORDINATE_REFERRALS
|
LDAP_CHASE_EXTERNAL_REFERRALS
))
{
FIXME
(
"upgrading referral value 0x%lx to LDAP_OPT_ON (OpenLDAP lacks sufficient granularity)
\n
"
,
*
(
ULONG
*
)
value
);
value
=
LDAP_OPT_ON
;
}
else
return
WLDAP32_LDAP_PARAM_ERROR
;
return
map_error
(
ldap_set_option
(
CTX
(
ld
),
option
,
value
)
);
}
case
WLDAP32_LDAP_OPT_REFERRAL_HOP_LIMIT
:
...
...
dlls/wldap32/tests/parse.c
View file @
42d0fa8b
...
...
@@ -116,20 +116,29 @@ static void test_ldap_search_extW( LDAP *ld )
static
void
test_opt_referrals
(
LDAP
*
ld
)
{
ULONG
ret
,
old
value
;
ULONG
ret
,
value
;
ret
=
ldap_get_optionW
(
ld
,
LDAP_OPT_REFERRALS
,
&
oldvalue
);
if
(
ret
==
LDAP_SERVER_DOWN
||
ret
==
LDAP_UNAVAILABLE
)
{
skip
(
"test server can't be reached
\n
"
);
return
;
}
value
=
0xdeadbeef
;
ret
=
ldap_get_optionW
(
ld
,
LDAP_OPT_REFERRALS
,
&
value
);
ok
(
!
ret
,
"ldap_get_optionW failed %#lx
\n
"
,
ret
);
todo_wine
ok
(
value
==
1
,
"got %lu
\n
"
,
value
);
ret
=
ldap_set_optionW
(
ld
,
LDAP_OPT_REFERRALS
,
LDAP_OPT_OFF
);
value
=
0
;
ret
=
ldap_set_optionW
(
ld
,
LDAP_OPT_REFERRALS
,
(
void
*
)
&
value
);
ok
(
!
ret
,
"ldap_set_optionW failed %#lx
\n
"
,
ret
);
ret
=
ldap_set_optionW
(
ld
,
LDAP_OPT_REFERRALS
,
(
void
*
)
&
oldvalue
);
value
=
0xdeadbeef
;
ret
=
ldap_get_optionW
(
ld
,
LDAP_OPT_REFERRALS
,
&
value
);
ok
(
!
ret
,
"ldap_get_optionW failed %#lx
\n
"
,
ret
);
ok
(
!
value
,
"got %lu
\n
"
,
value
);
ret
=
ldap_set_optionW
(
ld
,
LDAP_OPT_REFERRALS
,
LDAP_OPT_ON
);
ok
(
!
ret
,
"ldap_set_optionW failed %#lx
\n
"
,
ret
);
value
=
0xdeadbeef
;
ret
=
ldap_get_optionW
(
ld
,
LDAP_OPT_REFERRALS
,
&
value
);
ok
(
!
ret
,
"ldap_get_optionW failed %#lx
\n
"
,
ret
);
todo_wine
ok
(
value
==
1
,
"got %lu
\n
"
,
value
);
}
static
void
test_opt_protocol_version
(
LDAP
*
ld
)
...
...
dlls/wldap32/winldap_private.h
View file @
42d0fa8b
...
...
@@ -168,6 +168,9 @@ typedef enum {
#define WLDAP32_LDAP_VERSION3 3
#define WLDAP32_LDAP_VERSION WLDAP32_LDAP_VERSION2
#define LDAP_CHASE_SUBORDINATE_REFERRALS 0x20
#define LDAP_CHASE_EXTERNAL_REFERRALS 0x40
#define WLDAP32_LDAP_AUTH_SIMPLE 0x80
#define WLDAP32_LDAP_AUTH_SASL 0x83
#define WLDAP32_LDAP_AUTH_OTHERKIND 0x86
...
...
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