summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-11-15 12:10:33 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-11-15 02:09:39 +0000
commit02d320394fbe485ec706601c3edda7d90c8222da (patch)
tree4abf01c209042aee75afbf602a337068d4128d6f /source4
parentbe8526a0a1dbc070ce14414b0ab132816ddd20f6 (diff)
downloadsamba-02d320394fbe485ec706601c3edda7d90c8222da.tar.gz
samba-02d320394fbe485ec706601c3edda7d90c8222da.tar.bz2
samba-02d320394fbe485ec706601c3edda7d90c8222da.zip
auth/gensec Handle incorrect username or password in Kerberos client code
Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Mon Nov 15 02:09:40 UTC 2010 on sn-devel-104
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/gensec/gensec_gssapi.c2
-rw-r--r--source4/auth/gensec/gensec_krb5.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/source4/auth/gensec/gensec_gssapi.c b/source4/auth/gensec/gensec_gssapi.c
index a03cf9edd7..1a2e03f08a 100644
--- a/source4/auth/gensec/gensec_gssapi.c
+++ b/source4/auth/gensec/gensec_gssapi.c
@@ -370,6 +370,8 @@ static NTSTATUS gensec_gssapi_client_start(struct gensec_security *gensec_securi
case 0:
break;
case KRB5KDC_ERR_PREAUTH_FAILED:
+ case KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN:
+ DEBUG(1, ("Wrong username or password: %s\n", error_string));
return NT_STATUS_LOGON_FAILURE;
case KRB5_KDC_UNREACH:
DEBUG(3, ("Cannot reach a KDC we require to contact %s : %s\n", gensec_gssapi_state->target_principal, error_string));
diff --git a/source4/auth/gensec/gensec_krb5.c b/source4/auth/gensec/gensec_krb5.c
index 345ef361ed..b0ab3f61e7 100644
--- a/source4/auth/gensec/gensec_krb5.c
+++ b/source4/auth/gensec/gensec_krb5.c
@@ -285,6 +285,7 @@ static NTSTATUS gensec_krb5_common_client_start(struct gensec_security *gensec_s
case 0:
break;
case KRB5KDC_ERR_PREAUTH_FAILED:
+ case KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN:
return NT_STATUS_LOGON_FAILURE;
case KRB5_KDC_UNREACH:
DEBUG(3, ("Cannot reach a KDC we require to contact %s: %s\n", principal, error_string));