]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
2000-08-25 H.J. Lu <hjl@lucon.org>
authorhjl <hjl>
Sat, 26 Aug 2000 04:19:09 +0000 (04:19 +0000)
committerhjl <hjl>
Sat, 26 Aug 2000 04:19:09 +0000 (04:19 +0000)
* support/misc/tcpwrapper.c (logit): Modify the log output.

ChangeLog
support/misc/tcpwrapper.c

index 6561cf5ba9cbbf0c3e3b9635b07d1b3ad4f1db91..a80a45ec42ba68250f78bec10837d787a4eb02e9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+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,
index ba76864cb84a19adf5005c378f9f68d3feb4bd01..8743a7b420ca7c9a172932b13574060e7b8a4cf8 100644 (file)
@@ -221,9 +221,9 @@ u_long  prognum;
 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;
 
     /*
@@ -242,16 +242,18 @@ char   *text;
        } 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);
     }