diff options
author | christos <christos@pkgsrc.org> | 2005-07-10 19:57:07 +0000 |
---|---|---|
committer | christos <christos@pkgsrc.org> | 2005-07-10 19:57:07 +0000 |
commit | 40282604c36a8b91c0a934ccaea552f4c7727e6c (patch) | |
tree | 4666273bb930b1410fa2ceb04dd0fb33afed6a1f /net/proftpd | |
parent | 4479ffee96dd30428dbb93d117e90e824426c302 (diff) | |
download | pkgsrc-40282604c36a8b91c0a934ccaea552f4c7727e6c.tar.gz |
Simplify (and correct) the previous ut_ss filling code.
Diffstat (limited to 'net/proftpd')
-rw-r--r-- | net/proftpd/distinfo | 4 | ||||
-rw-r--r-- | net/proftpd/patches/patch-ac | 18 |
2 files changed, 6 insertions, 16 deletions
diff --git a/net/proftpd/distinfo b/net/proftpd/distinfo index f12eeafd63b..dfd5139852d 100644 --- a/net/proftpd/distinfo +++ b/net/proftpd/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.11 2005/06/23 04:49:26 christos Exp $ +$NetBSD: distinfo,v 1.12 2005/07/10 19:57:07 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 +SHA1 (patch-ac) = 5c05fb0c21288af6cd718f8792cc829bc348dd47 diff --git a/net/proftpd/patches/patch-ac b/net/proftpd/patches/patch-ac index c965a5ee447..fd2a8a461a4 100644 --- a/net/proftpd/patches/patch-ac +++ b/net/proftpd/patches/patch-ac @@ -1,7 +1,7 @@ -$NetBSD: patch-ac,v 1.1 2005/06/23 04:49:26 christos Exp $ +$NetBSD: patch-ac,v 1.2 2005/07/10 19:57:07 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 ++++ src/log.c 2005-07-10 15:50:13.000000000 -0400 @@ -59,7 +59,8 @@ int res = 0; static int fd = -1; @@ -23,7 +23,7 @@ $NetBSD: patch-ac,v 1.1 2005/06/23 04:49:26 christos Exp $ 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 @@ +@@ -89,14 +94,20 @@ 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)); @@ -31,17 +31,7 @@ $NetBSD: patch-ac,v 1.1 2005/06/23 04:49:26 christos Exp $ 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 */ -+ } ++ memcpy(&utx.ut_ss, &ip->na_addr, sizeof(ip->na_addr)); + gettimeofday(&utx.ut_tv, NULL); +#else /* SVR4 */ + utx.ut_syslen = strlen(utx.ut_host)+1; |