Don't use default binddn when password is empty

This commit is contained in:
Kurt Zeilenga 2003-05-22 16:21:14 +00:00
parent dc41a6b37e
commit b166736dbf

View File

@ -77,7 +77,7 @@ ldap_sasl_bind(
if( rc != LDAP_SUCCESS ) return rc;
if( mechanism == LDAP_SASL_SIMPLE ) {
if( dn == NULL && cred != NULL ) {
if( dn == NULL && cred != NULL && cred->bv_len ) {
/* use default binddn */
dn = ld->ld_defbinddn;
}