#include <ac/string.h>
#include <ac/time.h>
-#include "lutil.h"
-
#include "ldap_pvt.h"
#include "slap.h"
#ifdef LDAP_SLAPI
#include "slapi.h"
#endif
+#include "lutil.h"
+
int
do_modify(
}
#endif
}
-#endif
if ( StatslogTest( LDAP_DEBUG_STATS ) ) {
char abuf[BUFSIZ/2], *ptr = abuf;
op->o_connid, op->o_opid, abuf, 0, 0 );
}
}
+#endif /* LDAP_DEBUG */
manageDSAit = get_manageDSAit( op );
}
}
+ /*
+ * a rough single value check... an additional check is needed
+ * to catch add of single value to existing single valued attribute
+ */
+ if ((ml->sml_op == LDAP_MOD_ADD || ml->sml_op == LDAP_MOD_REPLACE)
+ && nvals > 1 && is_at_single_value( ad->ad_type ))
+ {
+ snprintf( textbuf, textlen,
+ "%s: multiple values provided",
+ ml->sml_type.bv_val );
+ *text = textbuf;
+ return LDAP_CONSTRAINT_VIOLATION;
+ }
+
#ifdef SLAP_NVALUES
if( nvals && ad->ad_type->sat_equality &&
- ad->ad_type->sat_equality->smr_match &&
- ad->ad_type->sat_syntax->ssyn_normalize )
+ ad->ad_type->sat_equality->smr_normalize )
{
ml->sml_nvalues = ch_malloc( (nvals+1)*sizeof(struct berval) );
for( nvals = 0; ml->sml_values[nvals].bv_val; nvals++ ) {
- rc = ad->ad_type->sat_syntax->ssyn_normalize(
+ rc = ad->ad_type->sat_equality->smr_normalize(
+ 0,
ad->ad_type->sat_syntax,
+ ad->ad_type->sat_equality,
&ml->sml_values[nvals], &ml->sml_nvalues[nvals] );
if( rc ) {
#ifdef NEW_LOGGING
ml->sml_nvalues[nvals].bv_len = 0;
}
#endif
-
- /*
- * a rough single value check... an additional check is needed
- * to catch add of single value to existing single valued attribute
- */
- if ((ml->sml_op == LDAP_MOD_ADD || ml->sml_op == LDAP_MOD_REPLACE)
- && nvals > 1 && is_at_single_value( ad->ad_type ))
- {
- snprintf( textbuf, textlen,
- "%s: multiple value provided",
- ml->sml_type.bv_val );
- *text = textbuf;
- return LDAP_CONSTRAINT_VIOLATION;
- }
}
}