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
1dd0e513
Commit
1dd0e513
authored
Jun 27, 2017
by
Ondřej Kuzník
Committed by
Ondřej Kuzník
Nov 17, 2020
Browse files
Only one bind at a time
parent
33a99355
Changes
2
Hide whitespace changes
Inline
Side-by-side
servers/lloadd/bind.c
View file @
1dd0e513
...
...
@@ -100,6 +100,7 @@ request_bind( Operation *op )
avl_dup_error
)
)
{
assert
(
0
);
}
upstream
->
c_state
=
SLAP_C_ACTIVE
;
CONNECTION_UNLOCK
(
upstream
);
ldap_pvt_thread_mutex_unlock
(
&
upstream
->
c_io_mutex
);
...
...
servers/lloadd/upstream.c
View file @
1dd0e513
...
...
@@ -86,7 +86,7 @@ forward_final_response( Operation *op, BerElement *ber )
static
int
handle_bind_response
(
Operation
*
op
,
BerElement
*
ber
)
{
Connection
*
c
=
op
->
o_client
;
Connection
*
c
lient
=
op
->
o_client
,
*
upstream
=
op
->
o_upstream
;
BerValue
response
;
BerElement
*
copy
;
ber_int_t
result
;
...
...
@@ -116,28 +116,35 @@ handle_bind_response( Operation *op, BerElement *ber )
"result=%d
\n
"
,
op
->
o_client_connid
,
result
);
CONNECTION_LOCK
(
c
);
CONNECTION_LOCK
(
upstream
);
if
(
result
!=
LDAP_SASL_BIND_IN_PROGRESS
)
{
upstream
->
c_state
=
SLAP_C_READY
;
}
CONNECTION_UNLOCK
(
upstream
);
CONNECTION_LOCK
(
client
);
switch
(
result
)
{
case
LDAP_SASL_BIND_IN_PROGRESS
:
break
;
case
LDAP_SUCCESS
:
default:
{
c
->
c_state
=
SLAP_C_READY
;
c
->
c_type
=
SLAP_C_OPEN
;
c
lient
->
c_state
=
SLAP_C_READY
;
c
lient
->
c_type
=
SLAP_C_OPEN
;
if
(
result
!=
LDAP_SUCCESS
)
{
ber_memfree
(
c
->
c_auth
.
bv_val
);
BER_BVZERO
(
&
c
->
c_auth
);
}
else
if
(
!
ber_bvstrcasecmp
(
&
c
->
c_auth
,
&
lloadd_identity
)
)
{
c
->
c_type
=
SLAP_C_PRIVILEGED
;
ber_memfree
(
client
->
c_auth
.
bv_val
);
BER_BVZERO
(
&
client
->
c_auth
);
}
else
if
(
!
ber_bvstrcasecmp
(
&
client
->
c_auth
,
&
lloadd_identity
)
)
{
client
->
c_type
=
SLAP_C_PRIVILEGED
;
}
if
(
!
BER_BVISNULL
(
&
c
->
c_sasl_bind_mech
)
)
{
ber_memfree
(
c
->
c_sasl_bind_mech
.
bv_val
);
BER_BVZERO
(
&
c
->
c_sasl_bind_mech
);
if
(
!
BER_BVISNULL
(
&
c
lient
->
c_sasl_bind_mech
)
)
{
ber_memfree
(
c
lient
->
c_sasl_bind_mech
.
bv_val
);
BER_BVZERO
(
&
c
lient
->
c_sasl_bind_mech
);
}
break
;
}
}
CONNECTION_UNLOCK
(
c
);
CONNECTION_UNLOCK
(
c
lient
);
done:
if
(
rc
)
{
...
...
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