Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review 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
Christopher Ng
OpenLDAP
Commits
8f0dc1a4
Commit
8f0dc1a4
authored
22 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
Fix ocflags tests
parent
be0d59db
No related branches found
Branches containing commit
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/oc.c
+14
-5
14 additions, 5 deletions
servers/slapd/oc.c
with
14 additions
and
5 deletions
servers/slapd/oc.c
+
14
−
5
View file @
8f0dc1a4
...
...
@@ -57,9 +57,16 @@ int is_entry_objectclass(
ObjectClass
*
oc
,
int
set_flags
)
{
/*
* set_flags should only be true if oc is one of operational
* object classes which we support objectClass flags for
* (e.g., referral, alias, ...). See <slap.h>.
*/
Attribute
*
attr
;
struct
berval
*
bv
;
AttributeDescription
*
objectClass
=
slap_schema
.
si_ad_objectClass
;
assert
(
!
(
e
==
NULL
||
oc
==
NULL
));
if
(
e
==
NULL
||
oc
==
NULL
)
{
...
...
@@ -67,14 +74,14 @@ int is_entry_objectclass(
}
if
(
set_flags
&&
(
e
->
e_ocflags
&
SLAP_OC__END
))
{
return
(
e
->
e_ocflags
&
oc
->
soc_flags
)
==
oc
->
soc_flags
;
/* flags are set, use them */
return
e
->
e_ocflags
&
oc
->
soc_flags
&
SLAP_OC__MASK
;
}
/*
* find objectClass attribute
*/
attr
=
attr_find
(
e
->
e_attrs
,
objectClass
);
if
(
attr
==
NULL
)
{
/* no objectClass attribute */
#ifdef NEW_LOGGING
...
...
@@ -95,7 +102,7 @@ int is_entry_objectclass(
for
(
bv
=
attr
->
a_vals
;
bv
->
bv_val
;
bv
++
)
{
ObjectClass
*
objectClass
=
oc_bvfind
(
bv
);
if
(
objectClass
==
oc
&&
!
set_flags
)
{
if
(
!
set_flags
&&
objectClass
==
oc
)
{
return
1
;
}
...
...
@@ -103,9 +110,11 @@ int is_entry_objectclass(
e
->
e_ocflags
|=
objectClass
->
soc_flags
;
}
}
e
->
e_ocflags
|=
SLAP_OC__END
;
/* We've finished this */
return
(
e
->
e_ocflags
&
oc
->
soc_flags
)
==
oc
->
soc_flags
;
/* mark flags as set */
e
->
e_ocflags
|=
SLAP_OC__END
;
return
e
->
e_ocflags
&
oc
->
soc_flags
&
SLAP_OC__MASK
;
}
...
...
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