log what server wasn't found
authorJohn Kohl <jtkohl@mit.edu>
Mon, 25 Mar 1991 11:22:43 +0000 (11:22 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Mon, 25 Mar 1991 11:22:43 +0000 (11:22 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1947 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/kdc_util.c

index 5b4b5c462bff49f02da6d3ef1a9f6450be70172c..d2d1cb9123ace739367101391261d6b1450da286 100644 (file)
@@ -26,6 +26,8 @@ static char rcsid_kdc_util_c[] =
 #include <krb5/ext-proto.h>
 #include <stdio.h>
 
+#include <syslog.h>
+
 /*
  * concatenate first two authdata arrays, returning an allocated replacement.
  * The replacement should be freed with krb5_free_authdata().
@@ -189,7 +191,14 @@ krb5_ticket **ticket;
            cleanup_apreq();
            return(KRB5KDC_ERR_PRINCIPAL_NOT_UNIQUE);
        } else if (nprincs != 1) {
+           char *sname;
+
            krb5_db_free_principal(&server, nprincs);
+           if (!krb5_unparse_name(apreq->ticket->server, &sname)) {
+               syslog(LOG_ERR, "TGS_REQ: can't find key for '%s'",
+                      sname);
+               free(sname);
+           }
            cleanup_apreq();
            return(KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN);
        }