char textbuf[SLAP_TEXT_BUFLEN] = { '\0' };
size_t textlen = sizeof textbuf;
const char *progname = "slapadd";
+ int manage = 0;
struct berval csn;
struct berval maxcsn;
break;
}
- if( global_schemacheck ) {
+ {
Attribute *sc = attr_find( e->e_attrs,
slap_schema.si_ad_structuralObjectClass );
Attribute *oc = attr_find( e->e_attrs,
}
if( sc == NULL ) {
- struct berval vals[2];
+ struct berval val;
- rc = structural_class( oc->a_vals, vals,
+ rc = structural_class( oc->a_vals, &val,
NULL, &text, textbuf, textlen );
if( rc != LDAP_SUCCESS ) {
break;
}
- vals[1].bv_len = 0;
- vals[1].bv_val = NULL;
-
- attr_merge( e, slap_schema.si_ad_structuralObjectClass,
- vals, NULL /* FIXME */ );
+ attr_merge_one( e, slap_schema.si_ad_structuralObjectClass,
+ &val, NULL );
}
/* check schema */
- rc = entry_schema_check( be, e, NULL, &text, textbuf, textlen );
+ rc = entry_schema_check( be, e, NULL, manage,
+ &text, textbuf, textlen );
if( rc != LDAP_SUCCESS ) {
fprintf( stderr, "%s: dn=\"%s\" (line=%d): (%d) %s\n",
{
vals[0].bv_len = lutil_uuidstr( uuidbuf, sizeof( uuidbuf ) );
vals[0].bv_val = uuidbuf;
- attr_merge_normalize_one( e,
- slap_schema.si_ad_entryUUID, vals, NULL );
+ attr_merge_normalize_one( e, slap_schema.si_ad_entryUUID, vals, NULL );
}
if( attr_find( e->e_attrs, slap_schema.si_ad_creatorsName )