#endif
{
#ifdef SLAPD_SCHEMA_NOT_COMPAT
- rc = slap_mods_opattrs( op, &mods, &text );
+ Modifications **modstail;
+ for( modstail = &mods;
+ *modstail != NULL;
+ modstail = &(*modstail)->sml_next )
+ {
+ assert( (*modstail)->sml_op == LDAP_MOD_ADD );
+ assert( (*modstail)->sml_desc != NULL );
+ }
+ rc = slap_mods_opattrs( op, modstail, &text );
#else
char *text = "no-user-modification attribute type";
rc = add_created_attrs( op, e );
Attribute *attr;
assert( mods->sml_op == LDAP_MOD_ADD );
+ assert( mods->sml_desc != NULL );
attr = attr_find( (*e)->e_attrs, mods->sml_desc );
attr = ch_calloc( 1, sizeof(Attribute) );
- /* should check for duplicates */
+ /* move ad to attr structure */
+ attr->a_desc = mods->sml_desc;
+ mods->sml_desc = NULL;
+
+ /* move values to attr structure */
+ /* should check for duplicates */
attr->a_vals = mods->sml_bvalues;
mods->sml_bvalues = NULL;
global_lastmod == ON)) && !update )
{
#ifdef SLAPD_SCHEMA_NOT_COMPAT
- rc = slap_mods_opattrs( op, &mods, &text );
+ Modifications **modstail;
+ for( modstail = &mods;
+ *modstail != NULL;
+ modstail = &(*modstail)->sml_next )
+ {
+ /* empty */
+ }
+ rc = slap_mods_opattrs( op, modstail, &text );
#else
char *text = "no-user-modification attribute type";
rc = add_modified_attrs( op, &mods );
mod = (Modifications *)
ch_calloc( 1, sizeof(Modifications) );
- ad = mod->sml_desc;
-
/* convert to attribute description */
- rc = slap_str2ad( ml->ml_type, &ad, text );
+ rc = slap_str2ad( ml->ml_type, &mod->sml_desc, text );
if( rc != LDAP_SUCCESS ) {
slap_mods_free( mod );
return rc;
}
+ ad = mod->sml_desc;
+
if( slap_syntax_is_binary( ad->ad_type->sat_syntax )
&& !slap_ad_is_binary( ad ))
{
int mop = op->o_tag == LDAP_REQ_ADD
? LDAP_MOD_ADD : LDAP_MOD_REPLACE;
+ assert( modtail != NULL );
+ assert( *modtail == NULL );
+
ldap_pvt_thread_mutex_lock( &gmtime_mutex );
ltm = gmtime( &now );
strftime( timebuf, sizeof(timebuf), "%Y%m%d%H%M%SZ", ltm );