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
622b87d5
Commit
622b87d5
authored
Jul 07, 2017
by
Ondřej Kuzník
Committed by
Ondřej Kuzník
Nov 17, 2020
Browse files
Make ready only when still alive
parent
16010e5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/lloadd/upstream.c
View file @
622b87d5
...
...
@@ -123,26 +123,30 @@ handle_bind_response( Operation *op, BerElement *ber )
CONNECTION_UNLOCK
(
upstream
);
CONNECTION_LOCK
(
client
);
switch
(
result
)
{
case
LDAP_SASL_BIND_IN_PROGRESS
:
break
;
case
LDAP_SUCCESS
:
default:
{
client
->
c_state
=
SLAP_C_READY
;
client
->
c_type
=
SLAP_C_OPEN
;
if
(
result
!=
LDAP_SUCCESS
)
{
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
(
&
client
->
c_sasl_bind_mech
)
)
{
ber_memfree
(
client
->
c_sasl_bind_mech
.
bv_val
);
BER_BVZERO
(
&
client
->
c_sasl_bind_mech
);
if
(
client
->
c_state
==
SLAP_C_BINDING
)
{
switch
(
result
)
{
case
LDAP_SASL_BIND_IN_PROGRESS
:
break
;
case
LDAP_SUCCESS
:
default:
{
client
->
c_state
=
SLAP_C_READY
;
client
->
c_type
=
SLAP_C_OPEN
;
if
(
result
!=
LDAP_SUCCESS
)
{
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
(
&
client
->
c_sasl_bind_mech
)
)
{
ber_memfree
(
client
->
c_sasl_bind_mech
.
bv_val
);
BER_BVZERO
(
&
client
->
c_sasl_bind_mech
);
}
break
;
}
break
;
}
}
else
{
assert
(
client
->
c_state
==
SLAP_C_INVALID
);
}
CONNECTION_UNLOCK
(
client
);
...
...
@@ -227,29 +231,34 @@ handle_vc_bind_response( Operation *op, BerElement *ber )
}
}
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
;
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
;
}
if
(
!
BER_BVISNULL
(
&
c
->
c_vc_cookie
)
)
{
ber_memfree
(
c
->
c_vc_cookie
.
bv_val
);
BER_BVZERO
(
&
c
->
c_vc_cookie
);
}
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
(
c
->
c_state
==
SLAP_C_BINDING
)
{
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
;
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
;
}
if
(
!
BER_BVISNULL
(
&
c
->
c_vc_cookie
)
)
{
ber_memfree
(
c
->
c_vc_cookie
.
bv_val
);
BER_BVZERO
(
&
c
->
c_vc_cookie
);
}
if
(
!
BER_BVISNULL
(
&
c
->
c_sasl_bind_mech
)
)
{
ber_memfree
(
c
->
c_sasl_bind_mech
.
bv_val
);
BER_BVZERO
(
&
c
->
c_sasl_bind_mech
);
}
break
;
}
break
;
}
}
else
{
assert
(
c
->
c_state
==
SLAP_C_INVALID
);
}
CONNECTION_UNLOCK_INCREF
(
c
);
...
...
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