static int entry_naming_check(
Entry *e,
+ int manage,
const char** text,
char *textbuf, size_t textlen );
/*
Backend *be,
Entry *e,
Attribute *oldattrs,
+ int manage,
const char** text,
char *textbuf, size_t textlen )
{
return LDAP_OTHER;
}
- if( sc->soc_obsolete ) {
+ if( !manage && sc->soc_obsolete ) {
snprintf( textbuf, textlen,
"structuralObjectClass '%s' is OBSOLETE",
asc->a_vals[0].bv_val );
/* naming check */
if ( !is_entry_objectclass ( e, slap_schema.si_oc_glue, 0 ) ) {
- rc = entry_naming_check( e, text, textbuf, textlen );
+ rc = entry_naming_check( e, manage, text, textbuf, textlen );
if( rc != LDAP_SUCCESS ) {
return rc;
}
/* check that the entry has required attrs of the content rule */
if( cr ) {
- if( cr->scr_obsolete ) {
+ if( !manage && cr->scr_obsolete ) {
snprintf( textbuf, textlen,
"content rule '%s' is obsolete",
ldap_contentrule2name( &cr->scr_crule ));
return LDAP_OBJECT_CLASS_VIOLATION;
}
- if ( oc->soc_obsolete ) {
+ if ( !manage && oc->soc_obsolete ) {
/* disallow obsolete classes */
snprintf( textbuf, textlen,
"objectClass '%s' is OBSOLETE",
static int
entry_naming_check(
Entry *e,
+ int manage,
const char** text,
char *textbuf, size_t textlen )
{
break;
}
- if( desc->ad_type->sat_obsolete ) {
+ if( !manage && desc->ad_type->sat_obsolete ) {
snprintf( textbuf, textlen,
"naming attribute '%s' is obsolete",
ava->la_attr.bv_val );