- for ( m = mods; *m != NULL; m = &(*m)->mod_next ) {
- if ( strcasecmp( (*m)->mod_type, "modifytimestamp" ) == 0 ||
- strcasecmp( (*m)->mod_type, "modifiersname" ) == 0 ||
- strcasecmp( (*m)->mod_type, "createtimestamp" ) == 0 ||
- strcasecmp( (*m)->mod_type, "creatorsname" ) == 0 ) {
-
- Debug( LDAP_DEBUG_TRACE,
- "add_lastmods: found lastmod attr: %s\n",
- (*m)->mod_type, 0, 0 );
- tmp = *m;
- *m = (*m)->mod_next;
- free( tmp->mod_type );
- if ( tmp->mod_bvalues != NULL ) {
- ber_bvecfree( tmp->mod_bvalues );
- }
- free( tmp );
- if (!*m)
- break;
- }
- }
+ for ( m = *modlist; m != NULL; m = m->ml_next ) {
+ if ( oc_check_no_usermod_attr( m->ml_type ) ) {
+ return LDAP_CONSTRAINT_VIOLATION;
+ }
+ }