From: Pierangelo Masarati Date: Sat, 1 Oct 2005 18:31:14 +0000 (+0000) Subject: deal with the case a pseudorootn is not defined X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~337 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ada7954667c4e153781f1acaf2611ede226540da;p=openldap deal with the case a pseudorootn is not defined --- 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 {