/*
* AVA sorting inside a RDN
*
- * rule: sort attributeTypes in alphabetical order; in case of multiple
- * occurrences of the same attributeType, sort values in byte order
- * (use memcmp, which implies alphabetical order in case of IA5 value;
- * this should guarantee the repeatability of the operation).
+ * Rule: sort attributeTypes in alphabetical order.
*
* Note: the sorting can be slightly improved by sorting first
* by attribute type length, then by alphabetical order.
ava_j = rdn[ j ];
a = strcmp( ava_i->la_attr.bv_val, ava_j->la_attr.bv_val );
- if ( a == 0 ) {
- int d;
-
- d = ava_i->la_value.bv_len - ava_j->la_value.bv_len;
-
- a = memcmp( ava_i->la_value.bv_val,
- ava_j->la_value.bv_val,
- d <= 0 ? ava_i->la_value.bv_len
- : ava_j->la_value.bv_len );
-
- if ( a == 0 ) {
- a = d;
- }
- }
- /* Duplicates are not allowed */
+ /* RFC4512 does not allow multiple AVAs
+ * with the same attribute type in RDN (ITS#5968) */
if ( a == 0 )
return LDAP_INVALID_DN_SYNTAX;