summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2019-04-01 15:59:10 +0200
committerKarolin Seeger <kseeger@samba.org>2019-04-09 09:49:52 +0000
commit33ec6f827efbc636263421a565c20e378d4a0789 (patch)
tree80fc47ee4a5a6f618e8359b747442e8e288f5d12
parent1a239fa0bdb381fb36d8bea3e01273c505875b4e (diff)
downloadsamba-33ec6f827efbc636263421a565c20e378d4a0789.tar.gz
auth:creds: Prefer the principal over DOMAIN/username when using NTLM
If we want to authenticate using -Wadmin@otherdomain the DC should do take care of the authentication with the right DC for us. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13861 Pair-Programmed-With: Guenther Deschner <gd@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 5c7f0a6902cfdd698e5f4159d37537bb4c9c1cc3)
-rw-r--r--auth/credentials/credentials.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/auth/credentials/credentials.c b/auth/credentials/credentials.c
index 4663185c979..7ef58d0752c 100644
--- a/auth/credentials/credentials.c
+++ b/auth/credentials/credentials.c
@@ -1115,7 +1115,7 @@ _PUBLIC_ void cli_credentials_get_ntlm_username_domain(struct cli_credentials *c
const char **username,
const char **domain)
{
- if (cred->principal_obtained > cred->username_obtained) {
+ if (cred->principal_obtained >= cred->username_obtained) {
*domain = talloc_strdup(mem_ctx, "");
*username = cli_credentials_get_principal(cred, mem_ctx);
} else {