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
374c25c4
Commit
374c25c4
authored
Nov 05, 2013
by
Jorge Perez Burgos
Committed by
Quanah Gibson-Mount
Nov 05, 2013
Browse files
ITS#7740 back-meta: avoid blocking other threads
Don't lock other threads while trying to connect to remote node.
parent
d6fcda4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-meta/bind.c
View file @
374c25c4
...
...
@@ -618,6 +618,10 @@ meta_back_single_dobind(
/* FIXME: should we check if at least some of the op->o_ctrls
* can/should be passed? */
if
(
!
dolock
)
{
ldap_pvt_thread_mutex_unlock
(
&
mi
->
mi_conninfo
.
lai_mutex
);
}
for
(;;)
{
rs
->
sr_err
=
ldap_sasl_bind
(
msc
->
msc_ld
,
binddn
,
LDAP_SASL_SIMPLE
,
&
cred
,
...
...
@@ -628,6 +632,10 @@ meta_back_single_dobind(
ldap_pvt_thread_yield
();
}
if
(
!
dolock
)
{
ldap_pvt_thread_mutex_lock
(
&
mi
->
mi_conninfo
.
lai_mutex
);
}
rs
->
sr_err
=
meta_back_bind_op_result
(
op
,
rs
,
mc
,
candidate
,
msgid
,
sendok
,
dolock
);
/* if bind succeeded, but anonymous, clear msc_bound_ndn */
...
...
@@ -1578,6 +1586,11 @@ meta_back_proxy_authz_bind(
switch
(
method
)
{
case
LDAP_AUTH_NONE
:
case
LDAP_AUTH_SIMPLE
:
if
(
!
dolock
)
{
ldap_pvt_thread_mutex_unlock
(
&
mi
->
mi_conninfo
.
lai_mutex
);
}
for
(;;)
{
rs
->
sr_err
=
ldap_sasl_bind
(
msc
->
msc_ld
,
binddn
.
bv_val
,
LDAP_SASL_SIMPLE
,
...
...
@@ -1587,6 +1600,11 @@ meta_back_proxy_authz_bind(
}
ldap_pvt_thread_yield
();
}
if
(
!
dolock
)
{
ldap_pvt_thread_mutex_lock
(
&
mi
->
mi_conninfo
.
lai_mutex
);
}
rc
=
meta_back_bind_op_result
(
op
,
rs
,
mc
,
candidate
,
msgid
,
sendok
,
dolock
);
if
(
rc
==
LDAP_SUCCESS
)
{
/* set rebind stuff in case of successful proxyAuthz bind,
...
...
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