Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
fd5226bf
Commit
fd5226bf
authored
Aug 18, 1998
by
Kurt Zeilenga
Browse files
Added patch from Stuar Lynn to ensure oc_required is not null before loop.
parent
8dd2e34c
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/schema.c
View file @
fd5226bf
...
...
@@ -76,6 +76,11 @@ oc_check_required( Entry *e, char *ocname )
return
(
0
);
}
/* check for empty oc_required */
if
(
oc
->
oc_required
==
NULL
)
{
return
(
0
);
}
/* for each required attribute */
for
(
i
=
0
;
oc
->
oc_required
[
i
]
!=
NULL
;
i
++
)
{
/* see if it's in the entry */
...
...
@@ -111,14 +116,16 @@ oc_check_allowed( char *type, struct berval **ocl )
/* if we know about the oc */
if
(
(
oc
=
oc_find
(
ocl
[
i
]
->
bv_val
))
!=
NULL
)
{
/* does it require the type? */
for
(
j
=
0
;
oc
->
oc_required
[
j
]
!=
NULL
;
j
++
)
{
for
(
j
=
0
;
oc
->
oc_required
!=
NULL
&&
oc
->
oc_required
[
j
]
!=
NULL
;
j
++
)
{
if
(
strcasecmp
(
oc
->
oc_required
[
j
],
type
)
==
0
)
{
return
(
0
);
}
}
/* does it allow the type? */
for
(
j
=
0
;
oc
->
oc_allowed
[
j
]
!=
NULL
;
j
++
)
{
for
(
j
=
0
;
oc
->
oc_allowed
!=
NULL
&&
oc
->
oc_allowed
[
j
]
!=
NULL
;
j
++
)
{
if
(
strcasecmp
(
oc
->
oc_allowed
[
j
],
type
)
==
0
||
strcmp
(
oc
->
oc_allowed
[
j
],
"*"
)
==
0
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment