]> git.sur5r.net Git - openldap/commitdiff
Don't use default binddn when password is empty
authorKurt Zeilenga <kurt@openldap.org>
Thu, 22 May 2003 16:21:14 +0000 (16:21 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 22 May 2003 16:21:14 +0000 (16:21 +0000)
libraries/libldap/sasl.c

index 1601354cad76289a95fe777637b618169974804b..28802c868feb971fa2cf0d46f69682a8c14103b0 100644 (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;
                }