/* schema_check.c - routines to enforce schema definitions */
/* $OpenLDAP$ */
-/*
- * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2004 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
*/
#include "portable.h"
}
/* naming check */
- if ( !is_entry_objectclass ( e, slap_schema.si_oc_glue, 0 ) ) {
- rc = entry_naming_check( e, text, textbuf, textlen );
- if( rc != LDAP_SUCCESS ) {
- return rc;
- }
- } else {
- /* Glue Entry */
- }
+ if ( !is_entry_objectclass ( e, slap_schema.si_oc_glue, 0 ) ) {
+ rc = entry_naming_check( e, text, textbuf, textlen );
+ if( rc != LDAP_SUCCESS ) {
+ return rc;
+ }
+ } else {
+ /* Glue Entry */
+ }
/* find the content rule for the structural class */
cr = cr_find( sc->soc_oid );
return LDAP_OBJECT_CLASS_VIOLATION;
}
- if( ocmod->sml_bvalues == NULL || ocmod->sml_bvalues[0].bv_val == NULL ) {
+ if( ocmod->sml_values == NULL || ocmod->sml_values[0].bv_val == NULL ) {
*text = "objectClass attribute has no values";
return LDAP_OBJECT_CLASS_VIOLATION;
}
- return structural_class( ocmod->sml_bvalues, sc, NULL,
+ return structural_class( ocmod->sml_values, sc, NULL,
text, textbuf, textlen );
}
if( desc->ad_type->sat_obsolete ) {
snprintf( textbuf, textlen,
- "naming attribute '%s' is collective",
+ "naming attribute '%s' is obsolete",
ava->la_attr.bv_val );
rc = LDAP_NAMING_VIOLATION;
break;