s4:auth - fixed problem reading bind DN from secrets database
[samba.git] / source4 / auth / credentials / credentials.c
index 09366e8d549ac0254b0cb6fa327269fe6fe2e945..549c2691f0301f246b125eda0a79722a905968fe 100644 (file)
@@ -750,6 +750,11 @@ _PUBLIC_ bool cli_credentials_is_anonymous(struct cli_credentials *cred)
 {
        const char *username;
        
+       /* if bind dn is set it's not anonymous */
+       if (cred->bind_dn) {
+               return false;
+       }
+
        if (cred->machine_account_pending) {
                cli_credentials_set_machine_account(cred,
                                                    cred->machine_account_pending_lp_ctx);