diff options
author | kim <kim> | 2000-06-19 00:28:36 +0000 |
---|---|---|
committer | kim <kim> | 2000-06-19 00:28:36 +0000 |
commit | 28ce5155747afa952489733f81f0d781216abe25 (patch) | |
tree | 679457bb42954ca402b3687b46fc30875ed585e9 | |
parent | 917441823651957b093c5e26cd13e5db2a7d3578 (diff) | |
download | pkgsrc-28ce5155747afa952489733f81f0d781216abe25.tar.gz |
Log the IP address (IPv4 assumedly) when the name of the remote host
would not fit in the wtmp ut_host field (truncated hostnames are not
at all useful).
-rw-r--r-- | net/wu-ftpd/files/patch-sum | 4 | ||||
-rw-r--r-- | net/wu-ftpd/patches/patch-ai | 47 |
2 files changed, 44 insertions, 7 deletions
diff --git a/net/wu-ftpd/files/patch-sum b/net/wu-ftpd/files/patch-sum index fe65a17e915..cabeecdb0fb 100644 --- a/net/wu-ftpd/files/patch-sum +++ b/net/wu-ftpd/files/patch-sum @@ -1,4 +1,4 @@ -$NetBSD: patch-sum,v 1.3 1999/12/27 12:13:06 rh Exp $ +$NetBSD: patch-sum,v 1.4 2000/06/19 00:28:36 kim Exp $ MD5 (patch-aa) = 4365668d156c10867e9ca700b4fdb8b7 MD5 (patch-ab) = 972bad15ee6b2487196d6c86c2fa0081 @@ -6,4 +6,4 @@ MD5 (patch-ac) = 25f0b246d679a3139896e7d29e2073be MD5 (patch-ad) = 1c030b87e02b0636892f2f63dba516b6 MD5 (patch-af) = 2d21677acf70f895a9fcb6327f6fae78 MD5 (patch-ag) = 0cc37eeffd18e73ee0cfb888fba5f2b6 -MD5 (patch-ai) = e17e8aab45aa2af1b0c3b6211356b509 +MD5 (patch-ai) = b0a7e561425e018f6a2344b5c091b064 diff --git a/net/wu-ftpd/patches/patch-ai b/net/wu-ftpd/patches/patch-ai index aa0c3cd8d20..a02d1ab8398 100644 --- a/net/wu-ftpd/patches/patch-ai +++ b/net/wu-ftpd/patches/patch-ai @@ -1,8 +1,16 @@ -$NetBSD: patch-ai,v 1.5 1999/12/27 12:13:13 rh Exp $ +$NetBSD: patch-ai,v 1.6 2000/06/19 00:28:37 kim Exp $ ---- src/ftpd.c.orig Thu Oct 14 16:41:47 1999 -+++ src/ftpd.c Mon Dec 27 11:57:37 1999 -@@ -88,6 +88,9 @@ +--- src/ftpd.c.orig Thu Oct 14 10:41:47 1999 ++++ src/ftpd.c Sun Jun 18 20:24:20 2000 +@@ -75,6 +75,7 @@ + #include <grp.h> + #endif + #include <sys/stat.h> ++#include <utmp.h> + + #define VA_LOCAL_DECL va_list ap; + #define VA_START(f) va_start(ap, f) +@@ -88,6 +89,9 @@ #ifdef HAVE_SYS_FS_UFS_QUOTA_H #include <sys/fs/ufs_quota.h> #endif @@ -12,7 +20,27 @@ $NetBSD: patch-ai,v 1.5 1999/12/27 12:13:13 rh Exp $ #ifdef HAVE_SYS_SYSLOG_H #include <sys/syslog.h> -@@ -5317,7 +5320,9 @@ +@@ -2296,7 +2300,8 @@ + (void) seteuid((uid_t) 0); + if (logged_in) + if (wtmp_logging) +- wu_logwtmp(ttyline, pw->pw_name, remotehost, 0); ++ wu_logwtmp(ttyline, pw->pw_name, strlen(remotehost) > UT_HOSTSIZE ++ ? remoteaddr : remotehost, 0); + pw = NULL; + #ifdef AFS_AUTH + ktc_ForgetAllTokens(); +@@ -2785,7 +2790,8 @@ + #ifdef DEBUG + syslog(LOG_DEBUG, "about to call wtmp"); + #endif +- wu_logwtmp(ttyline, pw->pw_name, remotehost, 1); ++ wu_logwtmp(ttyline, pw->pw_name, strlen(remotehost) > UT_HOSTSIZE ++ ? remoteaddr : remotehost, 1); + } + logged_in = 1; + +@@ -5317,7 +5323,9 @@ *p = '\0'; /* send a line...(note that this overrides dolreplies!) */ @@ -22,3 +50,12 @@ $NetBSD: patch-ai,v 1.5 1999/12/27 12:13:13 rh Exp $ if (p) ptr = p + 1; /* set to the next line... (\0 is handled in the while) */ +@@ -5941,6 +5949,8 @@ + (void) seteuid((uid_t) 0); + if (wtmp_logging) + wu_logwtmp(ttyline, pw->pw_name, remotehost, 0); ++ wu_logwtmp(ttyline, pw->pw_name, strlen(remotehost) > UT_HOSTSIZE ++ ? remoteaddr : remotehost, 0); + } + if (logging) + syslog(LOG_INFO, "FTP session closed"); |