From ba8671b7af6008666911f0273bca3bbe506dc888 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 4 Jul 2007 03:51:45 +0000 Subject: [PATCH] If error is KDC_ERR_S_PRINCIPAL_UNKNOWN, report the server name git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19666 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/gc_via_tkt.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/lib/krb5/krb/gc_via_tkt.c b/src/lib/krb5/krb/gc_via_tkt.c index 9d992d810..518d0244b 100644 --- a/src/lib/krb5/krb/gc_via_tkt.c +++ b/src/lib/krb5/krb/gc_via_tkt.c @@ -247,6 +247,20 @@ krb5_get_cred_via_tkt (krb5_context context, krb5_creds *tkt, "KDC returned error string: %s", err_reply->text.data); break; + case KDC_ERR_S_PRINCIPAL_UNKNOWN: + { + char *s_name; + if (krb5_unparse_name(context, in_cred->server, &s_name) == 0) { + krb5_set_error_message(context, retval, + "Server %s not found in Kerberos database", + s_name); + krb5_free_unparsed_name(context, s_name); + } else + /* In case there's a stale S_PRINCIPAL_UNKNOWN + report already noted. */ + krb5_clear_error_message(context); + } + break; default: #if 0 /* We should stop the KDC from sending back this text, because if the local language doesn't match the KDC's language, we'd -- 2.26.2