dn->bv_val = ch_malloc( len+1 );
p = slap_strcopy( dn->bv_val, "uid=" );
p = slap_strcopy( p, c1 );
- ch_free( c1 );
if( realm ) {
p = slap_strcopy( p, ",cn=" );
p = slap_strcopy( p, realm );
- realm[-1] = '@';
} else if( user_realm && *user_realm ) {
p = slap_strcopy( p, ",cn=" );
p = slap_strcopy( p, user_realm );
}
+ ch_free( c1 );
+
if( conn->c_sasl_bind_mech.bv_len ) {
p = slap_strcopy( p, ",cn=" );
p = slap_strcopy( p, conn->c_sasl_bind_mech.bv_val );