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
Compare Revisions
0c17e0ec89d989bb4a36550bc4f055bf9e67b095...1c6031c2ac96b9a1e5054e667c88c6c3c1ded6ea
Commits (2)
ITS
#9309
don't allow ppolicy to be configured more than once on a backend
· f244d985
Howard Chu
authored
Aug 10, 2020
and
Quanah Gibson-Mount
committed
Aug 10, 2020
f244d985
For ITS
#9309
fix check for duplicate overlays
· 1c6031c2
Howard Chu
authored
Aug 10, 2020
and
Quanah Gibson-Mount
committed
Aug 10, 2020
and pass error message back to frontend
1c6031c2
Hide whitespace changes
Inline
Side-by-side
servers/slapd/backover.c
View file @
1c6031c2
...
...
@@ -1314,16 +1314,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
,
0
,
0
);
snprintf
(
cr
->
msg
,
sizeof
(
cr
->
msg
)
,
"overlay_config(): "
"overlay
\"
%s
\"
cannot be global."
,
ov
);
Debug
(
LDAP_DEBUG_ANY
,
"%s
\n
"
,
cr
->
msg
,
0
,
0
);
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
,
0
,
0
);
snprintf
(
cr
->
msg
,
sizeof
(
cr
->
msg
)
,
"overlay_config(): "
"overlay
\"
%s
\"
can only be global."
,
ov
);
Debug
(
LDAP_DEBUG_ANY
,
"%s
\n
"
,
cr
->
msg
,
0
,
0
);
return
1
;
}
...
...
@@ -1386,10 +1386,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
,
0
,
0
);
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
,
0
,
0
);
return
1
;
}
}
...
...
servers/slapd/overlays/ppolicy.c
View file @
1c6031c2
...
...
@@ -2580,6 +2580,7 @@ int ppolicy_initialize()
ldap_pvt_thread_mutex_init
(
&
chk_syntax_mutex
);
ppolicy
.
on_bi
.
bi_type
=
"ppolicy"
;
ppolicy
.
on_bi
.
bi_flags
=
SLAPO_BFLAG_SINGLE
;
ppolicy
.
on_bi
.
bi_db_init
=
ppolicy_db_init
;
ppolicy
.
on_bi
.
bi_db_open
=
ppolicy_db_open
;
ppolicy
.
on_bi
.
bi_db_close
=
ppolicy_db_close
;
...
...