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
Dragoș Haiduc
OpenLDAP
Commits
95a19b94
Commit
95a19b94
authored
19 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
ITS#4260/4263: slapd-bdb/hdb cn=config reindexing issues
parent
a48beed9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGES
+3
-1
3 additions, 1 deletion
CHANGES
servers/slapd/back-bdb/config.c
+59
-17
59 additions, 17 deletions
servers/slapd/back-bdb/config.c
servers/slapd/config.c
+1
-0
1 addition, 0 deletions
servers/slapd/config.c
with
63 additions
and
18 deletions
CHANGES
+
3
−
1
View file @
95a19b94
...
...
@@ -4,7 +4,9 @@ OpenLDAP 2.3.14 Engineering
Fixed slapd assertion control restrictions
Fixed slapd ACL exact attrval clause needs normalization (ITS#4255)
Fixed slapd sc_prev update after free bug (ITS#4237)
Fixed slapd-bdb/hdb mode argument parsing (ITS#425h)
Fixed slapd-bdb/hdb mode argument parsing (ITS#4257)
Fixed slapd-bdb/hdb cn=config reindexing (ITS#4260)
Fixed slapd-bdb/hdb cn=config olcDbIndex modify/replace (ITS#4262)
Fixed slapo-rwm static DN free bug (ITS#4248)
OpenLDAP 2.3.13 Release
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/back-bdb/config.c
+
59
−
17
View file @
95a19b94
...
...
@@ -183,6 +183,7 @@ bdb_online_index( void *ctx, void *arg )
ID
id
,
nid
;
EntryInfo
*
ei
;
int
rc
,
getnext
=
1
;
int
i
;
connection_fake_init
(
&
conn
,
op
,
ctx
);
...
...
@@ -264,6 +265,14 @@ bdb_online_index( void *ctx, void *arg )
getnext
=
1
;
}
for
(
i
=
0
;
i
<
bdb
->
bi_nattrs
;
i
++
)
{
if
(
bdb
->
bi_attrs
[
i
]
->
ai_indexmask
&
BDB_INDEX_DELETING
)
{
continue
;
}
bdb
->
bi_attrs
[
i
]
->
ai_indexmask
=
bdb
->
bi_attrs
[
i
]
->
ai_newmask
;
bdb
->
bi_attrs
[
i
]
->
ai_newmask
=
0
;
}
ldap_pvt_thread_mutex_lock
(
&
slapd_rq
.
rq_mutex
);
ldap_pvt_runqueue_stoptask
(
&
slapd_rq
,
rtask
);
bdb
->
bi_index_task
=
NULL
;
...
...
@@ -458,26 +467,59 @@ bdb_cf_gen(ConfigArgs *c)
case
BDB_NOSYNC
:
bdb
->
bi_dbenv
->
set_flags
(
bdb
->
bi_dbenv
,
DB_TXN_NOSYNC
,
0
);
break
;
case
BDB_INDEX
:
{
AttributeDescription
*
ad
=
NULL
;
struct
berval
bv
,
def
=
BER_BVC
(
"default"
);
char
*
ptr
;
const
char
*
text
;
for
(
ptr
=
c
->
line
;
!
isspace
(
*
ptr
);
ptr
++
);
bv
.
bv_val
=
c
->
line
;
bv
.
bv_len
=
ptr
-
bv
.
bv_val
;
if
(
bvmatch
(
&
bv
,
&
def
))
{
bdb
->
bi_defaultmask
=
0
;
case
BDB_INDEX
:
if
(
c
->
valx
==
-
1
)
{
int
i
;
/* delete all (FIXME) */
for
(
i
=
0
;
i
<
bdb
->
bi_nattrs
;
i
++
)
{
bdb
->
bi_attrs
[
i
]
->
ai_indexmask
|=
BDB_INDEX_DELETING
;
}
bdb
->
bi_flags
|=
BDB_DEL_INDEX
;
c
->
cleanup
=
bdb_cf_cleanup
;
}
else
{
slap_bv2ad
(
&
bv
,
&
ad
,
&
text
);
if
(
ad
)
{
AttrInfo
*
ai
=
bdb_attr_mask
(
bdb
,
ad
);
ai
->
ai_indexmask
|=
BDB_INDEX_DELETING
;
bdb
->
bi_flags
|=
BDB_DEL_INDEX
;
c
->
cleanup
=
bdb_cf_cleanup
;
struct
berval
bv
,
def
=
BER_BVC
(
"default"
);
char
*
ptr
;
for
(
ptr
=
c
->
line
;
!
isspace
(
*
ptr
);
ptr
++
);
bv
.
bv_val
=
c
->
line
;
bv
.
bv_len
=
ptr
-
bv
.
bv_val
;
if
(
bvmatch
(
&
bv
,
&
def
))
{
bdb
->
bi_defaultmask
=
0
;
}
else
{
int
i
;
char
**
attrs
;
char
sep
;
sep
=
bv
.
bv_val
[
bv
.
bv_len
];
bv
.
bv_val
[
bv
.
bv_len
]
=
'\0'
;
attrs
=
ldap_str2charray
(
bv
.
bv_val
,
","
);
for
(
i
=
0
;
attrs
[
i
];
i
++
)
{
AttributeDescription
*
ad
=
NULL
;
const
char
*
text
;
AttrInfo
*
ai
;
slap_str2ad
(
attrs
[
i
],
&
ad
,
&
text
);
/* if we got here... */
assert
(
ad
!=
NULL
);
ai
=
bdb_attr_mask
(
bdb
,
ad
);
/* if we got here... */
assert
(
ai
!=
NULL
);
ai
->
ai_indexmask
|=
BDB_INDEX_DELETING
;
bdb
->
bi_flags
|=
BDB_DEL_INDEX
;
c
->
cleanup
=
bdb_cf_cleanup
;
}
bv
.
bv_val
[
bv
.
bv_len
]
=
sep
;
ldap_charray_free
(
attrs
);
}
}
}
break
;
}
return
rc
;
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/config.c
+
1
−
0
View file @
95a19b94
...
...
@@ -628,6 +628,7 @@ config_parse_vals(ConfigTable *ct, ConfigArgs *c, int valx)
}
rc
=
config_check_vals
(
ct
,
c
,
1
);
ch_free
(
c
->
tline
);
c
->
tline
=
NULL
;
if
(
rc
)
rc
=
LDAP_CONSTRAINT_VIOLATION
;
...
...
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