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
Joe Martin
OpenLDAP
Commits
4ce7f5dd
Commit
4ce7f5dd
authored
14 years ago
by
Quanah Gibson-Mount
Browse files
Options
Downloads
Patches
Plain Diff
ITS#6663
parent
8b81ed1e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGES
+1
-0
1 addition, 0 deletions
CHANGES
servers/slapd/overlays/refint.c
+12
-23
12 additions, 23 deletions
servers/slapd/overlays/refint.c
with
13 additions
and
23 deletions
CHANGES
+
1
−
0
View file @
4ce7f5dd
...
...
@@ -49,6 +49,7 @@ OpenLDAP 2.4.24 Engineering
Fixed slapo-pcache callback freeing (ITS#6640)
Fixed slapo-pcache to ignore undefined attrs (ITS#6600)
Fixed slapo-ppolicy don't update opattrs on consumers (ITS#6608)
Fixed slapo-refint when last group member is deleted (ITS#6663)
Fixed slapo-sssvlv initialization (ITS#6649)
Fixed slapo-syncprov to send error if consumer is newer (ITS#6606)
Fixed slapo-syncprov filter race condition (ITS#6708)
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/overlays/refint.c
+
12
−
23
View file @
4ce7f5dd
...
...
@@ -55,6 +55,7 @@ typedef struct refint_attrs_s {
BerVarray
new_vals
;
BerVarray
new_nvals
;
int
ra_numvals
;
int
dont_empty
;
}
refint_attrs
;
typedef
struct
dependents_s
{
...
...
@@ -415,8 +416,7 @@ refint_search_cb(
** if this attr exists in the search result,
** and it has a value matching the target:
** allocate an attr;
** if this is a delete and there's only one value:
** allocate the same attr again;
** handle olcRefintNothing;
**
*/
...
...
@@ -433,8 +433,6 @@ refint_search_cb(
na
=
NULL
;
for
(
i
=
0
,
b
=
a
->
a_nvals
;
b
[
i
].
bv_val
;
i
++
)
{
count
++
;
if
(
dnIsSuffix
(
&
b
[
i
],
&
rq
->
oldndn
))
{
/* first match? create structure */
if
(
na
==
NULL
)
{
...
...
@@ -512,23 +510,14 @@ refint_search_cb(
deleted
++
;
}
}
}
/* If this is a delete and no value would be left, and
* we have a nothing DN configured, allocate the attr again.
*/
if
(
count
==
deleted
&&
!
BER_BVISNULL
(
&
dd
->
nothing
)
)
{
na
=
op
->
o_tmpcalloc
(
1
,
sizeof
(
refint_attrs
),
op
->
o_tmpmemctx
);
na
->
next
=
ip
->
attrs
;
ip
->
attrs
=
na
;
na
->
attr
=
ia
->
attr
;
}
/* Deleting/replacing all values and a nothing DN is configured? */
if
(
deleted
==
i
&&
na
&&
!
BER_BVISNULL
(
&
dd
->
nothing
)
)
na
->
dont_empty
=
1
;
Debug
(
LDAP_DEBUG_TRACE
,
"refint_search_cb: %s: %s (#%d)
\n
"
,
a
->
a_desc
->
ad_cname
.
bv_val
,
rq
->
olddn
.
bv_val
,
count
);
}
Debug
(
LDAP_DEBUG_TRACE
,
"refint_search_cb: %s: %s (#%d)
\n
"
,
a
->
a_desc
->
ad_cname
.
bv_val
,
rq
->
olddn
.
bv_val
,
i
);
}
}
...
...
@@ -621,9 +610,9 @@ refint_repair(
m
->
sml_values
[
0
]
=
id
->
refint_dn
;
m
->
sml_nvalues
[
0
]
=
id
->
refint_ndn
;
}
if
(
!
BER_BVISEMPTY
(
&
rq
->
newdn
)
||
(
ra
->
next
&&
ra
->
attr
==
ra
->
next
->
attr
)
)
{
/* Add values */
if
(
ra
->
dont_empty
||
!
BER_BVISEMPTY
(
&
rq
->
newdn
)
)
{
len
=
sizeof
(
Modifications
);
if
(
ra
->
new_vals
==
NULL
)
{
...
...
@@ -657,11 +646,11 @@ refint_repair(
}
}
/* Delete values */
len
=
sizeof
(
Modifications
);
if
(
ra
->
old_vals
==
NULL
)
{
len
+=
4
*
sizeof
(
BerValue
);
}
m
=
op2
.
o_tmpalloc
(
len
,
op2
.
o_tmpmemctx
);
m
->
sml_next
=
op2
.
orm_modlist
;
op2
.
orm_modlist
=
m
;
...
...
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