mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 07:39:35 -05:00
Must use case-insensitive comparisons on attr types
This commit is contained in:
parent
5ef5652125
commit
f58ea89c20
1 changed files with 4 additions and 2 deletions
|
|
@ -207,6 +207,8 @@ str2entry2( char *s, int checkvals )
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define bvcasematch(bv1, bv2) ( ((bv1)->bv_len == (bv2)->bv_len) && (strncasecmp((bv1)->bv_val, (bv2)->bv_val, (bv1)->bv_len) == 0) )
|
||||||
|
|
||||||
/* Make sure all attributes with multiple values are contiguous */
|
/* Make sure all attributes with multiple values are contiguous */
|
||||||
if ( checkvals ) {
|
if ( checkvals ) {
|
||||||
int j, k;
|
int j, k;
|
||||||
|
|
@ -215,7 +217,7 @@ str2entry2( char *s, int checkvals )
|
||||||
|
|
||||||
for (i=0; i<lines; i++) {
|
for (i=0; i<lines; i++) {
|
||||||
for ( j=i+1; j<lines; j++ ) {
|
for ( j=i+1; j<lines; j++ ) {
|
||||||
if ( bvmatch( type+i, type+j )) {
|
if ( bvcasematch( type+i, type+j )) {
|
||||||
/* out of order, move intervening attributes down */
|
/* out of order, move intervening attributes down */
|
||||||
if ( j != i+1 ) {
|
if ( j != i+1 ) {
|
||||||
bv = vals[j];
|
bv = vals[j];
|
||||||
|
|
@ -238,7 +240,7 @@ str2entry2( char *s, int checkvals )
|
||||||
|
|
||||||
for ( i=0; i<=lines; i++ ) {
|
for ( i=0; i<=lines; i++ ) {
|
||||||
ad_prev = ad;
|
ad_prev = ad;
|
||||||
if ( !ad || ( i<lines && !bvmatch( type+i, &ad->ad_cname ))) {
|
if ( !ad || ( i<lines && !bvcasematch( type+i, &ad->ad_cname ))) {
|
||||||
ad = NULL;
|
ad = NULL;
|
||||||
rc = slap_bv2ad( type+i, &ad, &text );
|
rc = slap_bv2ad( type+i, &ad, &text );
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue