Improve error message logging
authorTheodore Tso <tytso@mit.edu>
Thu, 3 Jun 1993 11:40:01 +0000 (11:40 +0000)
committerTheodore Tso <tytso@mit.edu>
Thu, 3 Jun 1993 11:40:01 +0000 (11:40 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2573 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/do_as_req.c

index 02495fcd7bb02123be96c25cceba75d985c0aa5f..e24ffc88bfce41cda8f3a84c59f59dbaef72e659 100644 (file)
@@ -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;