Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Barchiesi
OpenLDAP
Commits
7daf7713
Commit
7daf7713
authored
14 years ago
by
Ralf Haferkamp
Committed by
Quanah Gibson-Mount
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ITS#6843 Fix cn=config slapadd for global overlays with private
database instances (e.g. slapo-chain)
parent
059048b9
No related branches found
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
servers/slapd/bconfig.c
+28
-1
28 additions, 1 deletion
servers/slapd/bconfig.c
with
28 additions
and
1 deletion
servers/slapd/bconfig.c
+
28
−
1
View file @
7daf7713
...
...
@@ -6935,6 +6935,7 @@ config_tool_entry_put( BackendDB *be, Entry *e, struct berval *text )
Operation
*
op
=
NULL
;
void
*
thrctx
;
int
isFrontend
=
0
;
int
isFrontendChild
=
0
;
/* Create entry for frontend database if it does not exist already */
if
(
!
entry_put_got_frontend
)
{
...
...
@@ -6988,8 +6989,34 @@ config_tool_entry_put( BackendDB *be, Entry *e, struct berval *text )
}
}
}
/* Child entries of the frontend database, e.g. slapo-chain's back-ldap
* instances, may appear before the config database entry in the ldif, skip
* auto-creation of olcDatabase={0}config in such a case */
if
(
!
entry_put_got_config
&&
!
strncmp
(
e
->
e_nname
.
bv_val
,
"olcDatabase"
,
STRLENOF
(
"olcDatabase"
)))
{
struct
berval
pdn
;
dnParent
(
&
e
->
e_nname
,
&
pdn
);
while
(
pdn
.
bv_len
)
{
if
(
!
strncmp
(
pdn
.
bv_val
,
"olcDatabase"
,
STRLENOF
(
"olcDatabase"
)))
{
if
(
!
strncmp
(
pdn
.
bv_val
+
STRLENOF
(
"olcDatabase"
),
"={-1}frontend"
,
STRLENOF
(
"={-1}frontend"
))
||
!
strncmp
(
pdn
.
bv_val
+
STRLENOF
(
"olcDatabase"
),
"=frontend"
,
STRLENOF
(
"=frontend"
)))
{
isFrontendChild
=
1
;
break
;
}
}
dnParent
(
&
pdn
,
&
pdn
);
}
}
/* Create entry for config database if it does not exist already */
if
(
!
entry_put_got_config
&&
!
isFrontend
)
{
if
(
!
entry_put_got_config
&&
!
isFrontend
&&
!
isFrontendChild
)
{
if
(
!
strncmp
(
e
->
e_nname
.
bv_val
,
"olcDatabase"
,
STRLENOF
(
"olcDatabase"
)))
{
if
(
strncmp
(
e
->
e_nname
.
bv_val
+
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment