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
05e0906f
Commit
05e0906f
authored
May 24, 2018
by
Ondřej Kuzník
Browse files
Fix backend starttls= setting being ignored
parent
9444dfc9
Changes
2
Hide whitespace changes
Inline
Side-by-side
servers/lloadd/config.c
View file @
05e0906f
...
...
@@ -1044,7 +1044,7 @@ backend_config_url( LloadBackend *b, struct berval *uri )
{
LDAPURLDesc
*
lud
=
NULL
;
char
*
host
=
NULL
;
int
rc
,
proto
,
tls
;
int
rc
,
proto
,
tls
=
b
->
b_tls_conf
;
/* Effect no changes until we've checked everything */
...
...
@@ -1056,8 +1056,7 @@ backend_config_url( LloadBackend *b, struct berval *uri )
return
-
1
;
}
tls
=
ldap_pvt_url_scheme2tls
(
lud
->
lud_scheme
);
if
(
tls
)
{
if
(
ldap_pvt_url_scheme2tls
(
lud
->
lud_scheme
)
)
{
#ifdef HAVE_TLS
/* Specifying ldaps:// overrides starttls= settings */
tls
=
LLOAD_LDAPS
;
...
...
@@ -2724,7 +2723,7 @@ static slap_cf_aux_table backendkey[] = {
{
BER_BVC
(
"max-pending-ops="
),
offsetof
(
LloadBackend
,
b_max_pending
),
'i'
,
0
,
NULL
},
{
BER_BVC
(
"conn-max-pending="
),
offsetof
(
LloadBackend
,
b_max_conn_pending
),
'i'
,
0
,
NULL
},
{
BER_BVC
(
"starttls="
),
offsetof
(
LloadBackend
,
b_tls
),
'i'
,
0
,
tlskey
},
{
BER_BVC
(
"starttls="
),
offsetof
(
LloadBackend
,
b_tls
_conf
),
'i'
,
0
,
tlskey
},
{
BER_BVNULL
,
0
,
0
,
0
,
NULL
}
};
...
...
@@ -3568,7 +3567,7 @@ backend_cf_gen( ConfigArgs *c )
c
->
value_uint
=
b
->
b_max_pending
;
break
;
case
CFG_STARTTLS
:
enum_to_verb
(
tlskey
,
b
->
b_tls
,
&
c
->
value_bv
);
enum_to_verb
(
tlskey
,
b
->
b_tls
_conf
,
&
c
->
value_bv
);
break
;
default:
rc
=
1
;
...
...
@@ -3581,7 +3580,7 @@ backend_cf_gen( ConfigArgs *c )
* attributes */
switch
(
c
->
type
)
{
case
CFG_STARTTLS
:
b
->
b_tls
=
LLOAD_CLEARTEXT
;
b
->
b_tls
_conf
=
LLOAD_CLEARTEXT
;
break
;
default:
break
;
...
...
@@ -3639,7 +3638,7 @@ backend_cf_gen( ConfigArgs *c )
Debug
(
LDAP_DEBUG_ANY
,
"%s: %s
\n
"
,
c
->
log
,
c
->
cr_msg
);
return
1
;
}
b
->
b_tls
=
tlskey
[
i
].
mask
;
b
->
b_tls
_conf
=
tlskey
[
i
].
mask
;
}
break
;
default:
rc
=
1
;
...
...
servers/lloadd/lload.h
View file @
05e0906f
...
...
@@ -203,7 +203,7 @@ struct LloadBackend {
struct
berval
b_name
,
b_uri
;
int
b_proto
,
b_port
;
enum
lload_tls_type
b_tls
;
enum
lload_tls_type
b_tls
,
b_tls_conf
;
char
*
b_host
;
int
b_retry_timeout
,
b_failed
;
...
...
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