Skip to content
Snippets Groups Projects
Commit abb07973 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Move optimistic ret setting

parent 8a22a0e0
No related branches found
No related tags found
No related merge requests found
......@@ -52,8 +52,6 @@ entry_schema_check(
return LDAP_OBJECT_CLASS_VIOLATION;
}
ret = LDAP_SUCCESS;
/* check that the entry has required attrs for each oc */
for ( i = 0; aoc->a_vals[i] != NULL; i++ ) {
if ( (oc = oc_find( aoc->a_vals[i]->bv_val )) == NULL ) {
......@@ -99,6 +97,9 @@ entry_schema_check(
return LDAP_SUCCESS;
}
/* optimistic */
ret = LDAP_SUCCESS;
/* check that each attr in the entry is allowed by some oc */
for ( a = e->e_attrs; a != NULL; a = a->a_next ) {
ret = oc_check_allowed( a->a_desc->ad_type, aoc->a_vals );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment