+2000-08-25 H.J. Lu <hjl@lucon.org>
+
+ * support/misc/tcpwrapper.c (logit): Modify the log output.
+
2000-08-25 Ion Badulescu <ionut@cs.columbia.edu>
* utils/rquotad/rquotad.man, utils/statd/statd.man,
char *text;
{
char *procname;
- char procbuf[4 * sizeof(u_long)];
+ char procbuf[16 + 4 * sizeof(u_long)];
char *progname;
- char progbuf[4 * sizeof(u_long)];
+ char progbuf[16 + 4 * sizeof(u_long)];
struct rpcent *rpc;
/*
} else if ((rpc = getrpcbynumber((int) prognum))) {
progname = rpc->r_name;
} else {
- sprintf(progname = progbuf, "%lu", prognum);
+ snprintf(progname = progbuf, sizeof (progbuf),
+ "prog (%lu)", prognum);
}
/* Try to map procedure number to name. */
- sprintf(procname = procbuf, "%lu", (u_long) procnum);
+ snprintf(procname = procbuf, sizeof (procbuf),
+ "proc (%lu)", (u_long) procnum);
/* Write syslog record. */
- syslog(severity, "connect from %s to %s(%s)%s",
+ syslog(severity, "connect from %s to %s in %s%s",
inet_ntoa(addr->sin_addr), procname, progname, text);
exit(0);
}