dc.ctx = "compareDN";
for ( i = 0; i < mi->mi_ntargets; i++ ) {
- metasingleconn_t *msc = &mc->mc_conns[ i ];
struct berval mdn = BER_BVNULL;
struct berval mapped_attr = op->orc_ava->aa_desc->ad_cname;
struct berval mapped_value = op->orc_ava->aa_value;
metasingleconn_t *msc = &mc->mc_conns[ i ];
int lrc;
LDAPMessage *res = NULL;
- struct timeval tv = { 0 };
+ struct timeval tv;
- tv.tv_sec = 0;
- tv.tv_usec = 0;
+ LDAP_BACK_TV_SET( &tv );
if ( msgid[ i ] == -1 ) {
continue;
* At least one compare failed with matched portion,
* and none was successful
*/
- } else if ( match != NULL && match[0] != '\0' ) {
- struct berval matched;
+ } else if ( match != NULL && match[ 0 ] != '\0' ) {
+ struct berval matched, pmatched;
ber_str2bv( match, 0, 0, &matched );
dc.ctx = "matchedDN";
ldap_back_dn_massage( &dc, &matched, &mmatch );
+ if ( dnPretty( NULL, &mmatch, &pmatched, NULL ) == LDAP_SUCCESS ) {
+ if ( mmatch.bv_val != match ) {
+ free( mmatch.bv_val );
+ }
+ mmatch = pmatched;
+ }
}
if ( rres != LDAP_SUCCESS ) {