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
Quanah Gibson-Mount
OpenLDAP
Commits
09a22d55
Commit
09a22d55
authored
Sep 14, 2021
by
Howard Chu
Browse files
ITS#9678 slapadd: avoid destroying configDB prematurely
parent
86baf9a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/bconfig.c
View file @
09a22d55
...
...
@@ -5565,6 +5565,8 @@ config_add_oc( ConfigOCs **cop, CfEntryInfo *last, Entry *e, ConfigArgs *ca )
return
rc
;
}
static
BackendDB
*
configDB
;
/* only set by slapadd */
/* Parse an LDAP entry into config directives */
static
int
config_add_internal
(
CfBackInfo
*
cfb
,
Entry
*
e
,
ConfigArgs
*
ca
,
SlapReply
*
rs
,
...
...
@@ -5911,7 +5913,7 @@ ok:
done:
if
(
rc
)
{
if
(
(
coptr
->
co_type
==
Cft_Database
)
&&
ca
->
be
)
{
if
(
ca
->
be
!=
frontendDB
)
if
(
ca
->
be
!=
frontendDB
&&
ca
->
be
!=
configDB
)
backend_destroy_one
(
ca
->
be
,
1
);
}
else
if
(
(
coptr
->
co_type
==
Cft_Overlay
)
&&
ca
->
bi
)
{
overlay_destroy_one
(
ca
->
be
,
(
slap_overinst
*
)
ca
->
bi
);
...
...
@@ -7885,6 +7887,7 @@ config_tool_entry_open( BackendDB *be, int mode )
CfBackInfo
*
cfb
=
be
->
be_private
;
BackendInfo
*
bi
=
cfb
->
cb_db
.
bd_info
;
configDB
=
be
;
if
(
bi
&&
bi
->
bi_tool_entry_open
)
return
bi
->
bi_tool_entry_open
(
&
cfb
->
cb_db
,
mode
);
else
...
...
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