summaryrefslogtreecommitdiff
path: root/net/proftpd
diff options
context:
space:
mode:
authorchristos <christos>2005-06-23 04:49:26 +0000
committerchristos <christos>2005-06-23 04:49:26 +0000
commita47d068e0f59b7b57b8776a0caad1b597c1db032 (patch)
tree46a8a3d2b69ce068845b2fcbd17ac38c0ae349cf /net/proftpd
parent9d3a88ea0659168482b9bfd6ce4e130d185427c6 (diff)
downloadpkgsrc-a47d068e0f59b7b57b8776a0caad1b597c1db032.tar.gz
Make it log in wtmpx properly.
XXX: someone should fix the array has type char issues.
Diffstat (limited to 'net/proftpd')
-rw-r--r--net/proftpd/Makefile4
-rw-r--r--net/proftpd/distinfo3
-rw-r--r--net/proftpd/patches/patch-ac60
3 files changed, 64 insertions, 3 deletions
diff --git a/net/proftpd/Makefile b/net/proftpd/Makefile
index a7115984b4d..ee8d8ced7d3 100644
--- a/net/proftpd/Makefile
+++ b/net/proftpd/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.22 2005/06/22 22:43:37 salo Exp $
+# $NetBSD: Makefile,v 1.23 2005/06/23 04:49:26 christos Exp $
DISTNAME= proftpd-1.2.10
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= net
MASTER_SITES= ftp://ftp.proftpd.org/distrib/source/ \
ftp://ftp.servus.at/ProFTPD/distrib/source/ \
diff --git a/net/proftpd/distinfo b/net/proftpd/distinfo
index 579e0854732..f12eeafd63b 100644
--- a/net/proftpd/distinfo
+++ b/net/proftpd/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.10 2005/06/22 22:43:37 salo Exp $
+$NetBSD: distinfo,v 1.11 2005/06/23 04:49:26 christos Exp $
SHA1 (proftpd-1.2.10.tar.gz) = ea12d139b8b47168cabcd993b137b2360bba1465
RMD160 (proftpd-1.2.10.tar.gz) = c96cadc6bfef0f77f2d44ed901b55474c6f6a464
Size (proftpd-1.2.10.tar.gz) = 1182176 bytes
SHA1 (patch-aa) = 3784f6aed87b327741685d45d453aa2ac98dd98b
SHA1 (patch-ab) = cc760fc91846a0fc595e2e76d5a1ef582915034d
+SHA1 (patch-ac) = fc6cb354338338d724d78151c37b256a80842307
diff --git a/net/proftpd/patches/patch-ac b/net/proftpd/patches/patch-ac
new file mode 100644
index 00000000000..c965a5ee447
--- /dev/null
+++ b/net/proftpd/patches/patch-ac
@@ -0,0 +1,60 @@
+$NetBSD: patch-ac,v 1.1 2005/06/23 04:49:26 christos Exp $
+
+--- src/log.c.orig 2004-08-07 18:22:42.000000000 -0400
++++ src/log.c 2005-06-23 00:42:29.000000000 -0400
+@@ -59,7 +59,8 @@
+ int res = 0;
+ static int fd = -1;
+
+-#if (defined(SVR4) || defined(__SVR4)) && \
++#if ((defined(SVR4) || defined(__SVR4)) || \
++ (defined(__NetBSD__) && defined(HAVE_UTMPX_H))) && \
+ !(defined(LINUX) || defined(__hpux) || defined (_AIX))
+ /* This "auxilliary" utmp doesn't exist under linux. */
+ #ifdef __sparcv9
+@@ -70,6 +71,10 @@
+ #endif
+ static int fdx = -1;
+
++#if !defined(WTMPX_FILE) && defined(_PATH_WTMPX)
++# define WTMPX_FILE _PATH_WTMPX
++#endif
++
+ if (fdx < 0 &&
+ (fdx = open(WTMPX_FILE, O_WRONLY|O_APPEND, 0)) < 0) {
+ pr_log_pri(PR_LOG_WARNING, "wtmpx %s: %s", WTMPX_FILE, strerror(errno));
+@@ -89,14 +94,30 @@
+ sstrncpy(utx.ut_id, "ftp", sizeof(utx.ut_user));
+ sstrncpy(utx.ut_line, line, sizeof(utx.ut_line));
+ sstrncpy(utx.ut_host, host, sizeof(utx.ut_host));
+- utx.ut_syslen = strlen(utx.ut_host)+1;
+ utx.ut_pid = getpid();
+-#ifdef __sparcv9
++#if defined(__NetBSD__) && defined(HAVE_UTMPX_H)
++ {
++ /* XXX: may return (size_t) -1 */
++ size_t len = pr_netaddr_get_inaddr_len(ip);
++ if (len > sizeof(utx.ut_ss))
++ len = sizeof(utx.ut_ss);
++# ifndef USE_IPV6
++ memcpy(&utx.ut_ss, pr_netaddr_get_inaddr(ip), len);
++# else
++ memcpy(&utx.ut_ss, pr_netaddr_get_inaddr(ip), len);
++# endif /* !USE_IPV6 */
++ }
++ gettimeofday(&utx.ut_tv, NULL);
++#else /* SVR4 */
++ utx.ut_syslen = strlen(utx.ut_host)+1;
++# ifdef __sparcv9
+ time(&t);
+ utx.ut_tv.tv_sec = (time32_t)t;
+-#else
++# else
+ time(&utx.ut_tv.tv_sec);
+-#endif
++# endif
++#endif /* SVR4 */
++
+ if (*name)
+ utx.ut_type = USER_PROCESS;
+ else