Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
ecdd6c1c
Commit
ecdd6c1c
authored
Apr 19, 2010
by
Quanah Gibson-Mount
Browse files
cleanup
parent
cde6f260
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/config.c
View file @
ecdd6c1c
...
...
@@ -1210,30 +1210,6 @@ static slap_verbmasks versionkey[] = {
{
BER_BVNULL
,
0
}
};
static
int
slap_sb_uri
(
struct
berval
*
val
,
void
*
bcp
,
slap_cf_aux_table
*
tab0
,
const
char
*
tabmsg
,
int
unparse
)
{
slap_bindconf
*
bc
=
bcp
;
if
(
unparse
)
{
if
(
bc
->
sb_uri
.
bv_len
>=
val
->
bv_len
)
return
-
1
;
val
->
bv_len
=
bc
->
sb_uri
.
bv_len
;
AC_MEMCPY
(
val
->
bv_val
,
bc
->
sb_uri
.
bv_val
,
val
->
bv_len
);
}
else
{
bc
->
sb_uri
=
*
val
;
#ifdef HAVE_TLS
if
(
ldap_is_ldaps_url
(
val
->
bv_val
))
bc
->
sb_tls_do_init
=
1
;
#endif
}
return
0
;
}
static
int
slap_keepalive_parse
(
struct
berval
*
val
,
...
...
@@ -1320,6 +1296,30 @@ slap_keepalive_parse(
return
0
;
}
static
int
slap_sb_uri
(
struct
berval
*
val
,
void
*
bcp
,
slap_cf_aux_table
*
tab0
,
const
char
*
tabmsg
,
int
unparse
)
{
slap_bindconf
*
bc
=
bcp
;
if
(
unparse
)
{
if
(
bc
->
sb_uri
.
bv_len
>=
val
->
bv_len
)
return
-
1
;
val
->
bv_len
=
bc
->
sb_uri
.
bv_len
;
AC_MEMCPY
(
val
->
bv_val
,
bc
->
sb_uri
.
bv_val
,
val
->
bv_len
);
}
else
{
bc
->
sb_uri
=
*
val
;
#ifdef HAVE_TLS
if
(
ldap_is_ldaps_url
(
val
->
bv_val
))
bc
->
sb_tls_do_init
=
1
;
#endif
}
return
0
;
}
static
slap_cf_aux_table
bindkey
[]
=
{
{
BER_BVC
(
"uri="
),
0
,
'x'
,
1
,
slap_sb_uri
},
{
BER_BVC
(
"version="
),
offsetof
(
slap_bindconf
,
sb_version
),
'i'
,
0
,
versionkey
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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