From: Theodore Tso Date: Thu, 3 Jun 1993 11:40:01 +0000 (+0000) Subject: Improve error message logging X-Git-Tag: krb5-1.0-beta3~265 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=29659d85b4fa5ade798713b9a9883edc9ff6cd08;p=krb5.git Improve error message logging git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2573 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kdc/do_as_req.c b/src/kdc/do_as_req.c index 02495fcd7..e24ffc88b 100644 --- a/src/kdc/do_as_req.c +++ b/src/kdc/do_as_req.c @@ -548,9 +548,23 @@ krb5_data **response; krb5_error errpkt; krb5_error_code retval; krb5_data *scratch; - - syslog(LOG_INFO, "AS_REQ: %s while processing request", - error_message(error+KRB5KDC_ERR_NONE)); + char *cname = 0, *sname = 0; + + if (retval = krb5_unparse_name(request->client, &cname)) + syslog(LOG_INFO, "AS_REQ: %s while unparsing client name for error", + error_message(retval)); + if (retval = krb5_unparse_name(request->server, &sname)) + syslog(LOG_INFO, "AS_REQ: %s while unparsing server name for error", + error_message(retval)); + + syslog(LOG_INFO, "AS_REQ: %s while processing request from %s for %s", + error_message(error+KRB5KDC_ERR_NONE), + cname ? cname : "UNKNOWN CLIENT", sname ? sname : "UNKNOWN SERVER"); + + if (cname) + free(cname); + if (sname) + free(sname); errpkt.ctime = request->nonce; errpkt.cusec = 0;