Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
2ae02fc1
Commit
2ae02fc1
authored
Jan 10, 2001
by
Kurt Zeilenga
Browse files
Treat unrecognized object classes as an objecdt class violation (per X.511)
parent
6d0479b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/schema_check.c
View file @
2ae02fc1
...
...
@@ -42,10 +42,8 @@ entry_schema_check(
if
(
(
aoc
=
attr_find
(
e
->
e_attrs
,
ad_objectClass
))
==
NULL
)
{
Debug
(
LDAP_DEBUG_ANY
,
"No object class for entry (%s)
\n
"
,
e
->
e_dn
,
0
,
0
);
*
text
=
"no objectclass attribute"
;
return
oldattrs
!=
NULL
?
LDAP_OBJECT_CLASS_VIOLATION
:
LDAP_NO_OBJECT_CLASS_MODS
;
*
text
=
"no objectClass attribute"
;
return
LDAP_OBJECT_CLASS_VIOLATION
;
}
ret
=
LDAP_SUCCESS
;
...
...
@@ -54,8 +52,10 @@ entry_schema_check(
for
(
i
=
0
;
aoc
->
a_vals
[
i
]
!=
NULL
;
i
++
)
{
if
(
(
oc
=
oc_find
(
aoc
->
a_vals
[
i
]
->
bv_val
))
==
NULL
)
{
Debug
(
LDAP_DEBUG_ANY
,
"entry_check_schema(%s): objectclass
\"
%s
\"
not
defin
ed
\n
"
,
"entry_check_schema(%s): objectclass
\"
%s
\"
not
recogniz
ed
\n
"
,
e
->
e_dn
,
aoc
->
a_vals
[
i
]
->
bv_val
,
0
);
*
text
=
"unrecognized object class"
;
return
LDAP_OBJECT_CLASS_VIOLATION
;
}
else
{
char
*
s
=
oc_check_required
(
e
,
aoc
->
a_vals
[
i
]
);
...
...
@@ -65,22 +65,16 @@ entry_schema_check(
"Entry (%s), oc
\"
%s
\"
requires attr
\"
%s
\"\n
"
,
e
->
e_dn
,
aoc
->
a_vals
[
i
]
->
bv_val
,
s
);
*
text
=
"missing required attribute"
;
ret
=
LDAP_OBJECT_CLASS_VIOLATION
;
break
;
return
LDAP_OBJECT_CLASS_VIOLATION
;
}
if
(
oc
==
slap_schema
.
si_oc_extensibleObject
)
{
if
(
oc
==
slap_schema
.
si_oc_extensibleObject
)
{
extensible
=
1
;
}
}
}
if
(
ret
!=
LDAP_SUCCESS
)
{
return
ret
;
}
if
(
extensible
)
{
return
LDAP_SUCCESS
;
}
...
...
Howard Chu
@hyc
mentioned in merge request
!413 (merged)
·
Sep 22, 2021
mentioned in merge request
!413 (merged)
mentioned in merge request !413
Toggle commit list
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment