ldap_memfree( at->at_syntax_oid );
at->at_syntax_oid = oid;
}
-
}
if ( at->at_names && at->at_names[0] ) {
return SLAP_SCHERR_ATTR_BAD_USAGE;
}
+ if ( supsat->sat_obsolete && !sat->sat_obsolete ) {
+ /* subtypes must be obsolete if super is */
+ return SLAP_SCHERR_ATTR_BAD_SUP;
+ }
+
if ( sat->sat_flags & SLAP_AT_FINAL ) {
/* cannot subtype a "final" attribute type */
return SLAP_SCHERR_ATTR_BAD_SUP;
}
#endif
-#if defined( SLAPD_SCHEMA_DN )
int
at_schema_info( Entry *e )
{
vals[1].bv_val = NULL;
for ( at = attr_list; at; at = at->sat_next ) {
+ if( at->sat_flags & SLAP_AT_HIDE ) continue;
+
if ( ldap_attributetype2bv( &at->sat_atype, vals ) == NULL ) {
return -1;
}
- if( at->sat_flags & SLAP_AT_HIDE ) continue;
-
-#if 0
- Debug( LDAP_DEBUG_TRACE, "Merging at [%ld] %s\n",
- (long) vals[0].bv_len, vals[0].bv_val, 0 );
-#endif
- attr_merge( e, ad_attributeTypes, vals );
+ if( attr_merge( e, ad_attributeTypes, vals ) )
+ return -1;
ldap_memfree( vals[0].bv_val );
}
return 0;
}
-#endif