From 8677b9941078cccf6c63cf5f21b31bf8192df4f4 Mon Sep 17 00:00:00 2001 From: alfred Date: Thu, 11 Jul 2002 17:44:59 +0000 Subject: Log the IP of the machine if an invalid host is passed over the wire. PR: bin/29406 --- usr.sbin/rpc.statd/procs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'usr.sbin') diff --git a/usr.sbin/rpc.statd/procs.c b/usr.sbin/rpc.statd/procs.c index bbe9d4a..142040a 100644 --- a/usr.sbin/rpc.statd/procs.c +++ b/usr.sbin/rpc.statd/procs.c @@ -101,6 +101,7 @@ int sm_check_hostname(struct svc_req *req, char *arg) struct sm_stat_res *sm_stat_1_svc(sm_name *arg, struct svc_req *req) { static sm_stat_res res; + struct sockaddr_in *claddr; static int err; err = 1; @@ -116,7 +117,9 @@ struct sm_stat_res *sm_stat_1_svc(sm_name *arg, struct svc_req *req) res.res_stat = stat_succ; else { - syslog(LOG_ERR, "invalid hostname to sm_stat: %s", arg->mon_name); + claddr = svc_getcaller(req->rq_xprt); + syslog(LOG_ERR, "invalid hostname to sm_stat from %s: %s", + inet_ntoa(claddr->sin_addr), arg->mon_name); res.res_stat = stat_fail; } } -- cgit v1.1