diff --git a/servers/slapd/back-meta/conn.c b/servers/slapd/back-meta/conn.c index 303c4e6147..1d0a548958 100644 --- a/servers/slapd/back-meta/conn.c +++ b/servers/slapd/back-meta/conn.c @@ -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 {