Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
4e5c69d1
Commit
4e5c69d1
authored
Jun 10, 2010
by
Quanah Gibson-Mount
Browse files
make sure bind credentials are consistent
parent
3ee97b4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-meta/search.c
View file @
4e5c69d1
...
...
@@ -232,6 +232,21 @@ meta_search_dobind_init(
assert
(
msc
->
msc_ld
!=
NULL
);
if
(
!
BER_BVISEMPTY
(
&
binddn
)
&&
BER_BVISEMPTY
(
&
cred
)
)
{
/* bind anonymously? */
Debug
(
LDAP_DEBUG_ANY
,
"%s meta_search_dobind_init[%d] mc=%p: "
"non-empty dn with empty cred; binding anonymously
\n
"
,
op
->
o_log_prefix
,
candidate
,
(
void
*
)
mc
);
cred
=
slap_empty_bv
;
}
else
if
(
BER_BVISEMPTY
(
&
binddn
)
&&
!
BER_BVISEMPTY
(
&
cred
)
)
{
/* error */
Debug
(
LDAP_DEBUG_ANY
,
"%s meta_search_dobind_init[%d] mc=%p: "
"empty dn with non-empty cred: error
\n
"
,
op
->
o_log_prefix
,
candidate
,
(
void
*
)
mc
);
goto
other
;
}
/* connect must be async only the first time... */
ldap_set_option
(
msc
->
msc_ld
,
LDAP_OPT_CONNECT_ASYNC
,
LDAP_OPT_ON
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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