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
Lukas However
OpenLDAP
Commits
499b8fdc
Commit
499b8fdc
authored
25 years ago
by
Juan Gomez
Browse files
Options
Downloads
Patches
Plain Diff
Added index_delete_values() in preparation for changes that will keep
index files clean.
parent
24ec5ded
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
servers/slapd/back-ldbm/index.c
+23
-2
23 additions, 2 deletions
servers/slapd/back-ldbm/index.c
servers/slapd/back-ldbm/modify.c
+17
-0
17 additions, 0 deletions
servers/slapd/back-ldbm/modify.c
servers/slapd/back-ldbm/proto-back-ldbm.h
+1
-0
1 addition, 0 deletions
servers/slapd/back-ldbm/proto-back-ldbm.h
with
41 additions
and
2 deletions
servers/slapd/back-ldbm/index.c
+
23
−
2
View file @
499b8fdc
...
...
@@ -69,13 +69,19 @@ index_add_mods(
LDAPMod
*
mod
=
&
ml
->
ml_mod
;
switch
(
mod
->
mod_op
&
~
LDAP_MOD_BVALUES
)
{
case
LDAP_MOD_ADD
:
case
LDAP_MOD_REPLACE
:
/* XXX: Delete old index data==>problem when this
* gets called we lost values already!
*/
case
LDAP_MOD_ADD
:
rc
=
index_add_values
(
be
,
mod
->
mod_type
,
mod
->
mod_bvalues
,
id
);
break
;
case
LDAP_MOD_SOFTADD
:
/* SOFTADD means index was there */
case
LDAP_MOD_DELETE
:
rc
=
index_delete_values
(
be
,
mod
->
mod_type
,
mod
->
mod_bvalues
,
id
);
break
;
case
LDAP_MOD_SOFTADD
:
/* SOFTADD means index was there */
rc
=
0
;
break
;
}
...
...
@@ -220,6 +226,21 @@ add_value(
return
(
rc
);
}
/* Remove entries from index files */
int
index_delete_values
(
Backend
*
be
,
char
*
type
,
struct
berval
**
vals
,
ID
id
)
{
return
0
;
}
int
index_add_values
(
Backend
*
be
,
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/back-ldbm/modify.c
+
17
−
0
View file @
499b8fdc
...
...
@@ -109,6 +109,7 @@ int ldbm_modify_internal(
int
err
;
LDAPMod
*
mod
;
LDAPModList
*
ml
;
Attribute
*
a
;
if
(
((
be
->
be_lastmod
==
ON
)
||
((
be
->
be_lastmod
==
UNDEFINED
)
&&
(
global_lastmod
==
ON
)))
...
...
@@ -142,6 +143,17 @@ int ldbm_modify_internal(
break
;
case
LDAP_MOD_REPLACE
:
/* Need to remove all values from indexes before they
* are lost.
*/
if
(
e
->
e_attrs
&&
((
a
=
attr_find
(
e
->
e_attrs
,
mod
->
mod_type
))
!=
NULL
)
)
{
(
void
)
index_delete_values
(
be
,
mod
->
mod_type
,
a
->
a_vals
,
e
->
e_id
);
}
err
=
replace_values
(
e
,
mod
,
op
->
o_ndn
);
break
;
...
...
@@ -339,6 +351,11 @@ replace_values(
char
*
dn
)
{
/* XXX: BEFORE YOU GET RID OF PREVIOUS VALUES REMOVE FROM INDEX
* FILES
*/
(
void
)
attr_delete
(
&
e
->
e_attrs
,
mod
->
mod_type
);
if
(
attr_merge
(
e
,
mod
->
mod_type
,
mod
->
mod_bvalues
)
!=
0
)
{
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/back-ldbm/proto-back-ldbm.h
+
1
−
0
View file @
499b8fdc
...
...
@@ -130,6 +130,7 @@ int index_add_entry LDAP_P(( Backend *be, Entry *e ));
int
index_add_mods
LDAP_P
((
Backend
*
be
,
LDAPModList
*
ml
,
ID
id
));
ID_BLOCK
*
index_read
LDAP_P
((
Backend
*
be
,
char
*
type
,
int
indextype
,
char
*
val
));
int
index_add_values
LDAP_P
((
Backend
*
be
,
char
*
type
,
struct
berval
**
vals
,
ID
id
));
int
index_delete_values
LDAP_P
((
Backend
*
be
,
char
*
type
,
struct
berval
**
vals
,
ID
id
));
/*
* kerberos.c
...
...
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