From 27c0ce3c58f85c62f9c53a261fd19a9e8c7e85e8 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Wed, 2 May 1990 18:53:58 +0000 Subject: [PATCH] log who it's from/for git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@682 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kdc/do_as_req.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/kdc/do_as_req.c b/src/kdc/do_as_req.c index ef54b2dd1..d197c9b30 100644 --- a/src/kdc/do_as_req.c +++ b/src/kdc/do_as_req.c @@ -23,6 +23,7 @@ static char rcsid_do_as_req_c[] = #include #include #include +#include #include #include @@ -30,6 +31,9 @@ static char rcsid_do_as_req_c[] = #include #include +#ifdef KRB5_USE_INET +#include +#endif #include "kdc_util.h" #include "policy.h" @@ -66,7 +70,7 @@ krb5_data **response; /* filled in with a response packet */ krb5_keyblock encrypting_key; krb5_timestamp until, rtime; - char *cname = 0, *sname = 0; + char *cname = 0, *sname = 0, *fromstring = 0; if (retval = krb5_unparse_name(request->client, &cname)) return(retval); @@ -74,7 +78,14 @@ krb5_data **response; /* filled in with a response packet */ free(cname); return(retval); } - syslog(LOG_INFO, "AS_REQ: %s for %s", cname, sname); +#ifdef KRB5_USE_INET + if (from->address->addrtype == ADDRTYPE_INET) + fromstring = inet_ntoa(*(struct in_addr *)from->address->contents); +#endif + if (!fromstring) + fromstring = ""; + + syslog(LOG_INFO, "AS_REQ: host %s, %s for %s", fromstring, cname, sname); free(cname); free(sname); -- 2.26.2