diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2006-12-14 12:34:40 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2006-12-14 12:34:40 +0000 |
commit | ae012243f604b5221ab942fa7e17bd677a0e7cc1 (patch) | |
tree | c031f1961c1e6d8984517f918e991bc4bf60975e /ftp | |
parent | a92c740f29db6ea59680b458448ab2743e170f46 (diff) | |
download | ports-ae012243f604b5221ab942fa7e17bd677a0e7cc1.tar.gz ports-ae012243f604b5221ab942fa7e17bd677a0e7cc1.zip |
Notes
Diffstat (limited to 'ftp')
-rw-r--r-- | ftp/tnftpd/Makefile | 14 | ||||
-rw-r--r-- | ftp/tnftpd/distinfo | 6 | ||||
-rw-r--r-- | ftp/tnftpd/files/patch-configure | 11 | ||||
-rw-r--r-- | ftp/tnftpd/files/patch-libnetbsd-glob.c | 12 | ||||
-rw-r--r-- | ftp/tnftpd/files/patch-src-Makefile.in | 8 | ||||
-rw-r--r-- | ftp/tnftpd/files/patch-src-ftpd.c | 98 | ||||
-rw-r--r-- | ftp/tnftpd/files/patch-src-logutmp.c | 8 | ||||
-rw-r--r-- | ftp/tnftpd/files/patch-src-logwtmp.c | 16 | ||||
-rw-r--r-- | ftp/tnftpd/files/patch-tnftpd.h | 12 | ||||
-rw-r--r-- | ftp/tnftpd/pkg-descr | 4 | ||||
-rw-r--r-- | ftp/tnftpd/pkg-plist | 6 |
11 files changed, 148 insertions, 47 deletions
diff --git a/ftp/tnftpd/Makefile b/ftp/tnftpd/Makefile index 7d894473290d..78743cd08b3d 100644 --- a/ftp/tnftpd/Makefile +++ b/ftp/tnftpd/Makefile @@ -6,8 +6,7 @@ # PORTNAME= tnftpd -PORTVERSION= 20040810 -PORTREVISION= 1 +PORTVERSION= 20061204 CATEGORIES= ftp ipv6 MASTER_SITES= ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/ @@ -28,6 +27,12 @@ DOCS= ChangeLog README THANKS COPYING MAN5= ftpd.conf.5 ftpusers.5 MAN8= tnftpd.8 +PLIST_FILES= libexec/tnftpd \ + %%PORTDOCS%%%%DOCSDIR%%/ChangeLog \ + %%PORTDOCS%%%%DOCSDIR%%/README \ + %%PORTDOCS%%%%DOCSDIR%%/THANKS \ + %%PORTDOCS%%%%DOCSDIR%%/COPYING +PLIST_DIRS= %%PORTDOCS%%%%DOCSDIR%% FIXPREFIX= ftpd.8 ftpd.conf.5 ftpusers.5 @@ -41,7 +46,6 @@ pre-patch: s@^\.Sx /etc/@.Sx ${PREFIX}/etc/@g; \ s@^\.Bl -tag -width /etc/@.Bl -tag -width ${PREFIX}/etc/@g; \ s@${PREFIX}/etc/shells@/etc/shells@g; \ - s@${PREFIX}/etc/motd@/etc/motd@g; \ s@${PREFIX}/etc/nologin@/etc/nologin@g; \ s@${PREFIX}/etc/pwd.db@/etc/pwd.db@g" \ ${WRKSRC}/src/${f} @@ -59,9 +63,9 @@ do-install: ${INSTALL_MAN} ${WRKSRC}/src/ftpd.conf.5 ${PREFIX}/man/man5 ${INSTALL_MAN} ${WRKSRC}/src/ftpusers.5 ${PREFIX}/man/man5 .if !defined(NOPORTDOCS) - ${MKDIR} ${PREFIX}/share/doc/${PORTNAME} + ${MKDIR} ${DOCSDIR} .for f in ${DOCS} - ${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/share/doc/${PORTNAME}/ + ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR} .endfor .endif diff --git a/ftp/tnftpd/distinfo b/ftp/tnftpd/distinfo index 9360135cf5af..50496a51d4ad 100644 --- a/ftp/tnftpd/distinfo +++ b/ftp/tnftpd/distinfo @@ -1,3 +1,3 @@ -MD5 (tnftpd-20040810.tar.gz) = a51e89237973db43ae3fd0bb448e9ae4 -SHA256 (tnftpd-20040810.tar.gz) = 4e181d36638a69c58f0ab4a423a61e16cf2f18476cf314f3d0789f11737de5f1 -SIZE (tnftpd-20040810.tar.gz) = 178638 +MD5 (tnftpd-20061204.tar.gz) = dada97588519fea2535678b6652ecf64 +SHA256 (tnftpd-20061204.tar.gz) = 7cc0532a8d492ed79ced7c44c3351829021169cc1e75bff8fd1d1066f0c2a2cc +SIZE (tnftpd-20061204.tar.gz) = 187164 diff --git a/ftp/tnftpd/files/patch-configure b/ftp/tnftpd/files/patch-configure index ded8bee1eff8..c6ecb3856d84 100644 --- a/ftp/tnftpd/files/patch-configure +++ b/ftp/tnftpd/files/patch-configure @@ -1,8 +1,11 @@ ---- configure.orig Mon May 17 14:46:54 2004 -+++ configure Mon May 17 14:47:14 2004 -@@ -2434,6 +2434,7 @@ + +Fix off_t size detection, so that determined off_t size is 8 instead of 0. + +--- configure.orig Wed Dec 13 11:00:41 2006 ++++ configure Wed Dec 13 11:02:41 2006 +@@ -2455,6 +2455,7 @@ cat > conftest.$ac_ext <<EOF - #line 2425 "configure" + #line 2457 "configure" #include "confdefs.h" +#include <sys/types.h> #include <stdio.h> diff --git a/ftp/tnftpd/files/patch-libnetbsd-glob.c b/ftp/tnftpd/files/patch-libnetbsd-glob.c deleted file mode 100644 index d54a2e93d6fa..000000000000 --- a/ftp/tnftpd/files/patch-libnetbsd-glob.c +++ /dev/null @@ -1,12 +0,0 @@ ---- libnetbsd/glob.c.orig Mon Dec 15 13:18:43 2003 -+++ libnetbsd/glob.c Wed Dec 13 08:16:13 2006 -@@ -497,7 +497,8 @@ - * we save one character so that we can use ptr >= limit, - * in the general case when we are appending non nul chars only. - */ -- return(glob2(pathbuf, pathbuf, pathbuf + sizeof(pathbuf) - 1, pattern, -+ return(glob2(pathbuf, pathbuf, -+ pathbuf + (sizeof(pathbuf) / sizeof(*pathbuf)) - 1, pattern, - pglob, limit)); - } - diff --git a/ftp/tnftpd/files/patch-src-Makefile.in b/ftp/tnftpd/files/patch-src-Makefile.in index 674b0c8cc61f..a1e4f3cfefca 100644 --- a/ftp/tnftpd/files/patch-src-Makefile.in +++ b/ftp/tnftpd/files/patch-src-Makefile.in @@ -1,5 +1,9 @@ ---- src/Makefile.in-orig Mon Feb 17 22:57:18 2003 -+++ src/Makefile.in Mon Feb 17 22:57:48 2003 + +FreeBSD does have support for utmp/wtmp, so include relevant files into +a build. + +--- src/Makefile.in.orig Wed Dec 13 13:03:12 2006 ++++ src/Makefile.in Wed Dec 13 13:03:47 2006 @@ -23,8 +23,7 @@ INSTALL = @INSTALL@ diff --git a/ftp/tnftpd/files/patch-src-ftpd.c b/ftp/tnftpd/files/patch-src-ftpd.c index 3158bc53b8be..82b8f24b4c5d 100644 --- a/ftp/tnftpd/files/patch-src-ftpd.c +++ b/ftp/tnftpd/files/patch-src-ftpd.c @@ -1,6 +1,41 @@ ---- src/ftpd.c-orig Wed Aug 18 17:22:30 2004 -+++ src/ftpd.c Wed Aug 18 17:27:28 2004 -@@ -450,12 +450,12 @@ + +Add -C user@host support instead of just -C user and add support for +IPv6 in ftpusers. + +FreeBSD does not have _PASSWORD_CHGNOW defined, so use direct constant +instead. + +We are sure, that we have good LOGIN_NAME_MAX from tnftpd.h, so use it +instead of unnecessarily conservative _POSIX_LOGIN_NAME_MAX. + +--- src/ftpd.c.orig Wed Sep 27 07:22:18 2006 ++++ src/ftpd.c Thu Dec 14 00:19:55 2006 +@@ -371,6 +371,24 @@ + break; + + case 'C': ++ if ((p = strchr(optarg, '@')) != NULL) { ++ *p++ = '\0'; ++ strlcpy(remotehost, p, MAXHOSTNAMELEN + 1); ++ if (inet_pton(AF_INET, p, ++ &his_addr.su_addr) == 1) { ++ his_addr.su_family = AF_INET; ++ his_addr.su_len = ++ sizeof(his_addr.si_su.su_sin); ++#ifdef INET6 ++ } else if (inet_pton(AF_INET6, p, ++ &his_addr.su_6addr) == 1) { ++ his_addr.su_family = AF_INET6; ++ his_addr.su_len = ++ sizeof(his_addr.si_su.su_sin6); ++#endif ++ } else ++ his_addr.su_family = AF_UNSPEC; ++ } + pw = sgetpwnam(optarg); + exit(checkaccess(optarg) ? 0 : 1); + /* NOTREACHED */ +@@ -496,12 +514,12 @@ exit(1); } else if (l <= 0) { syslog(LOG_WARNING, "using conservative LOGIN_NAME_MAX value"); @@ -15,3 +50,60 @@ #endif curname = malloc(curname_len); if (curname == NULL) { +@@ -1166,18 +1184,38 @@ + + /* have a host specifier */ + if ((p = strchr(word, '@')) != NULL) { +- unsigned long net, mask, addr; +- int bits; ++ char net[16], mask[16], *addr; ++ int addrlen, bits, bytes, a; + + *p++ = '\0'; + /* check against network or CIDR */ +- if (isdigit((unsigned char)*p) && +- (bits = inet_net_pton(AF_INET, p, +- &net, sizeof(net))) != -1) { +- net = ntohl(net); +- mask = 0xffffffffU << (32 - bits); +- addr = ntohl(his_addr.su_addr.s_addr); +- if ((addr & mask) != net) ++ memset(net, 0x00, sizeof(net)); ++ if ((bits = inet_net_pton(his_addr.su_family, p, net, ++ sizeof(net))) != -1) { ++#ifdef INET6 ++ if (his_addr.su_family == AF_INET) { ++#endif ++ addrlen = 4; ++ addr = (char *)&his_addr.su_addr; ++#ifdef INET6 ++ } else { ++ addrlen = 16; ++ addr = (char *)&his_addr.su_6addr; ++ } ++#endif ++ bytes = bits / 8; ++ bits = bits % 8; ++ if (bytes > 0) ++ memset(mask, 0xFF, bytes); ++ if (bytes < addrlen) ++ mask[bytes] = 0xFF << (8 - bits); ++ if (bytes + 1 < addrlen) ++ memset(mask + bytes + 1, 0x00, ++ addrlen - bytes - 1); ++ for (a = 0; a < addrlen; a++) ++ if ((addr[a] & mask[a]) != net[a]) ++ break; ++ if (a < addrlen) + continue; + + /* check against hostname glob */ +@@ -3744,7 +3782,7 @@ + expire = pwent->pw_expire; + #endif + #if HAVE_PW_CHANGE +- change = (pwent->pw_change == _PASSWORD_CHGNOW)? now : pwent->pw_change; ++ change = (pwent->pw_change == -1)? now : pwent->pw_change; + #endif + #endif + diff --git a/ftp/tnftpd/files/patch-src-logutmp.c b/ftp/tnftpd/files/patch-src-logutmp.c index fc9dbcf87d57..81b94e37a3da 100644 --- a/ftp/tnftpd/files/patch-src-logutmp.c +++ b/ftp/tnftpd/files/patch-src-logutmp.c @@ -1,5 +1,9 @@ ---- src/logutmp.c-orig Thu Jan 29 15:43:57 2004 -+++ src/logutmp.c Thu Jan 29 15:44:33 2004 + +FreeBSD does not have header file util.h, fortunately it is not needed. +Add header file time.h for time(). + +--- src/logutmp.c.orig Wed Dec 13 13:16:58 2006 ++++ src/logutmp.c Wed Dec 13 13:17:18 2006 @@ -59,13 +59,13 @@ #include <stdio.h> #include <stdlib.h> diff --git a/ftp/tnftpd/files/patch-src-logwtmp.c b/ftp/tnftpd/files/patch-src-logwtmp.c index 611693a77393..1af239320351 100644 --- a/ftp/tnftpd/files/patch-src-logwtmp.c +++ b/ftp/tnftpd/files/patch-src-logwtmp.c @@ -1,5 +1,11 @@ ---- src/logwtmp.c-orig Thu Jan 29 15:45:32 2004 -+++ src/logwtmp.c Thu Jan 29 15:47:34 2004 + +FreeBSD does not have header file util.h, fortunately it is not needed. Add +header files sys/socket.h and netdb.h for getaddrinfo() and getnameinfo(). +If host name is longer than UT_HOSTSIZE (16 characters), log numeric +address to utmp. + +--- src/logwtmp.c.orig Wed Dec 13 13:26:40 2006 ++++ src/logwtmp.c Wed Dec 13 14:14:52 2006 @@ -42,11 +42,13 @@ #include <sys/types.h> @@ -14,7 +20,7 @@ #include <signal.h> #include <stdio.h> #include <string.h> -@@ -56,7 +58,6 @@ +@@ -59,7 +61,6 @@ #ifdef SUPPORT_UTMPX #include <utmpx.h> #endif @@ -22,7 +28,7 @@ #ifdef KERBEROS5 #include <krb5/krb5.h> -@@ -79,6 +80,26 @@ +@@ -88,6 +89,26 @@ { struct utmp ut; struct stat buf; @@ -47,5 +53,5 @@ + } + } - if (fd < 0 && (fd = open(_PATH_WTMP, O_WRONLY|O_APPEND, 0)) < 0) + if (fd < 0) return; diff --git a/ftp/tnftpd/files/patch-tnftpd.h b/ftp/tnftpd/files/patch-tnftpd.h index 0cf397e5c549..cd1070620e8a 100644 --- a/ftp/tnftpd/files/patch-tnftpd.h +++ b/ftp/tnftpd/files/patch-tnftpd.h @@ -1,6 +1,10 @@ ---- tnftpd.h-orig Wed Dec 17 02:43:41 2003 -+++ tnftpd.h Tue Feb 3 18:14:15 2004 -@@ -426,5 +426,9 @@ + +FreeBSD does not have LOGIN_NAME_MAX, but it has MAXLOGNAME instead, +so use it as much as possible. + +--- tnftpd.h.orig Wed Dec 13 14:38:43 2006 ++++ tnftpd.h Wed Dec 13 14:39:24 2006 +@@ -479,7 +479,11 @@ #define TM_YEAR_BASE 1900 #if ! defined(LOGIN_NAME_MAX) @@ -10,3 +14,5 @@ # define LOGIN_NAME_MAX (9) +#endif #endif + + #if ! defined(_POSIX_LOGIN_NAME_MAX) diff --git a/ftp/tnftpd/pkg-descr b/ftp/tnftpd/pkg-descr index 4533a0527f9f..612078f09165 100644 --- a/ftp/tnftpd/pkg-descr +++ b/ftp/tnftpd/pkg-descr @@ -1,2 +1,2 @@ -tnftpd is a port of the enhanced NetBSD ftp server to other systems. -(Note: lukemftpd was renamed to tnftpd) +tnftpd (formerly known as lukemftpd) is a port of the enhanced NetBSD ftp +server to other systems. diff --git a/ftp/tnftpd/pkg-plist b/ftp/tnftpd/pkg-plist deleted file mode 100644 index c9c43e9e5fbd..000000000000 --- a/ftp/tnftpd/pkg-plist +++ /dev/null @@ -1,6 +0,0 @@ -libexec/tnftpd -%%PORTDOCS%%%%DOCSDIR%%/ChangeLog -%%PORTDOCS%%%%DOCSDIR%%/README -%%PORTDOCS%%%%DOCSDIR%%/THANKS -%%PORTDOCS%%%%DOCSDIR%%/COPYING -%%PORTDOCS%%@dirrm %%DOCSDIR%% |