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
openldap
OpenLDAP
Commits
633d40b0
Commit
633d40b0
authored
Aug 10, 2020
by
Howard Chu
Browse files
For ITS
#9309
fix check for duplicate overlays
and pass error message back to frontend
parent
c8c39b84
Pipeline
#683
passed with stage
in 30 minutes and 22 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/backover.c
View file @
633d40b0
...
...
@@ -1355,16 +1355,16 @@ overlay_config( BackendDB *be, const char *ov, int idx, BackendInfo **res, Confi
if
(
be
->
bd_info
==
frontendDB
->
bd_info
||
SLAP_ISGLOBALOVERLAY
(
be
)
)
{
isglobal
=
1
;
if
(
on
->
on_bi
.
bi_flags
&
SLAPO_BFLAG_DBONLY
)
{
Debug
(
LDAP_DEBUG_ANY
,
"overlay_config(): "
"overlay
\"
%s
\"
cannot be global.
\n
"
,
ov
);
snprintf
(
cr
->
msg
,
sizeof
(
cr
->
msg
)
,
"overlay_config(): "
"overlay
\"
%s
\"
cannot be global."
,
ov
);
Debug
(
LDAP_DEBUG_ANY
,
"%s
\n
"
,
cr
->
msg
);
return
1
;
}
}
else
if
(
on
->
on_bi
.
bi_flags
&
SLAPO_BFLAG_GLOBONLY
)
{
Debug
(
LDAP_DEBUG_ANY
,
"overlay_config(): "
"overlay
\"
%s
\"
can only be global.
\n
"
,
ov
);
snprintf
(
cr
->
msg
,
sizeof
(
cr
->
msg
)
,
"overlay_config(): "
"overlay
\"
%s
\"
can only be global."
,
ov
);
Debug
(
LDAP_DEBUG_ANY
,
"%s
\n
"
,
cr
->
msg
);
return
1
;
}
...
...
@@ -1427,10 +1427,10 @@ overlay_config( BackendDB *be, const char *ov, int idx, BackendInfo **res, Confi
}
else
{
if
(
overlay_is_inst
(
be
,
ov
)
)
{
if
(
SLAPO_SINGLE
(
be
)
)
{
Debug
(
LDAP_DEBUG_ANY
,
"overlay_config(): "
"overlay
\"
%s
\"
already in list
\n
"
,
ov
);
if
(
on
->
on_bi
.
bi_flags
&
SLAPO_BFLAG_SINGLE
)
{
snprintf
(
cr
->
msg
,
sizeof
(
cr
->
msg
)
,
"overlay_config(): "
"overlay
\"
%s
\"
already in list"
,
ov
);
Debug
(
LDAP_DEBUG_ANY
,
"%s
\n
"
,
cr
->
msg
);
return
1
;
}
}
...
...
Write
Preview
Supports
Markdown
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