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
orbea -
OpenLDAP
Commits
5a08b661
Commit
5a08b661
authored
10 years ago
by
Howard Chu
Browse files
Options
Downloads
Patches
Plain Diff
ITS#7705,#7800 fix prev commit
Better check for missing IDs
parent
437f21b1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
servers/slapd/back-mdb/dn2id.c
+7
-7
7 additions, 7 deletions
servers/slapd/back-mdb/dn2id.c
with
7 additions
and
7 deletions
servers/slapd/back-mdb/dn2id.c
+
7
−
7
View file @
5a08b661
...
...
@@ -699,11 +699,11 @@ mdb_idscopes(
struct
mdb_info
*
mdb
=
(
struct
mdb_info
*
)
op
->
o_bd
->
be_private
;
MDB_dbi
dbi
=
mdb
->
mi_dn2id
;
MDB_val
key
,
data
;
ID
id
;
ID
id
,
prev
;
ID2
id2
;
char
*
ptr
;
int
rc
=
0
;
unsigned
int
x
,
y
;
unsigned
int
x
;
unsigned
int
nrlen
,
rlen
;
diskNode
*
d
;
...
...
@@ -750,8 +750,12 @@ mdb_idscopes(
}
ptr
=
data
.
mv_data
;
ptr
+=
data
.
mv_size
-
sizeof
(
ID
);
prev
=
id
;
memcpy
(
&
id
,
ptr
,
sizeof
(
ID
)
);
y
=
x
;
/* If we didn't advance, some parent is missing */
if
(
id
==
prev
)
return
MDB_NOTFOUND
;
x
=
mdb_id2l_search
(
isc
->
scopes
,
id
);
if
(
x
<=
isc
->
scopes
[
0
].
mid
&&
isc
->
scopes
[
x
].
mid
==
id
)
{
if
(
!
isc
->
scopes
[
x
].
mval
.
mv_data
)
{
...
...
@@ -767,10 +771,6 @@ mdb_idscopes(
}
data
=
isc
->
scopes
[
x
].
mval
;
rc
=
1
;
}
else
{
/* If we didn't advance, some parent is missing */
if
(
x
==
y
)
return
MDB_NOTFOUND
;
}
if
(
op
->
ors_scope
==
LDAP_SCOPE_ONELEVEL
)
break
;
...
...
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