From: Pierangelo Masarati Date: Sat, 17 Jan 2004 12:25:46 +0000 (+0000) Subject: improve fix to ITS#2923; note that suffix massaging is inherently flawed, because... X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~15 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d65f40205837f462be1ba51b95b425f5d4da52b5;p=openldap improve fix to ITS#2923; note that suffix massaging is inherently flawed, because comperisons should always occur on Normalized DN, while massaging can also occur on Pretty DN, but there is no guarantee they have the same length or any length-based comparison can work; so in any case, we should pass the Normalized DN and, if the Pretty DN is present, massage it as well accordingly --- diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index d666d3e87a..4dd6d8ccde 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -144,7 +144,7 @@ ldap_back_search( dc.ctx = "searchBase"; #else dc.tofrom = 1; - dc.normalized = 1; + dc.normalized = 0; #endif if ( ldap_back_dn_massage( &dc, &op->o_req_ndn, &mbase ) ) { send_ldap_result( op, rs ); diff --git a/servers/slapd/back-ldap/suffixmassage.c b/servers/slapd/back-ldap/suffixmassage.c index fb66fee3cc..2cee684451 100644 --- a/servers/slapd/back-ldap/suffixmassage.c +++ b/servers/slapd/back-ldap/suffixmassage.c @@ -135,7 +135,7 @@ ldap_back_dn_massage( /* At a DN Separator */ } - if ( !strcmp( dc->rwmap->rwm_suffix_massage[i+src].bv_val, &dn->bv_val[diff] ) ) { + if ( !strcasecmp( dc->rwmap->rwm_suffix_massage[i+src].bv_val, &dn->bv_val[diff] ) ) { res->bv_len = diff + dc->rwmap->rwm_suffix_massage[i+dst].bv_len; res->bv_val = ch_malloc( res->bv_len + 1 ); strncpy( res->bv_val, dn->bv_val, diff );