deal with the case a pseudorootn is not defined

This commit is contained in:
Pierangelo Masarati 2005-10-01 18:31:14 +00:00
parent 01bb0fa1ea
commit ada7954667

View file

@ -351,8 +351,16 @@ retry:;
*/
if ( ispriv ) {
ber_dupbv( &msc->msc_cred, &mt->mt_pseudorootpw );
ber_dupbv( &msc->msc_bound_ndn, &mt->mt_pseudorootdn );
if ( !BER_BVISNULL( &mt->mt_pseudorootdn ) ) {
ber_dupbv( &msc->msc_bound_ndn, &mt->mt_pseudorootdn );
if ( !BER_BVISNULL( &mt->mt_pseudorootpw ) ) {
ber_dupbv( &msc->msc_cred, &mt->mt_pseudorootpw );
}
} else {
ber_str2bv( "", 0, 1, &msc->msc_bound_ndn );
}
LDAP_BACK_CONN_ISPRIV_SET( msc );
} else {