From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Aug 22 23:00:11 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECD081065691 for ; Fri, 22 Aug 2008 23:00:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id CC0CA8FC08 for ; Fri, 22 Aug 2008 23:00:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7MN0Bow098239 for ; Fri, 22 Aug 2008 23:00:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7MN0BM1098238; Fri, 22 Aug 2008 23:00:11 GMT (envelope-from gnats) Resent-Date: Fri, 22 Aug 2008 23:00:11 GMT Resent-Message-Id: <200808222300.m7MN0BM1098238@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yarema Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B114106564A for ; Fri, 22 Aug 2008 22:52:35 +0000 (UTC) (envelope-from yds@dppl.com) Received: from orion.dppl.com (orion.dppl.biz [216.182.10.231]) by mx1.freebsd.org (Postfix) with ESMTP id 0054B8FC0A for ; Fri, 22 Aug 2008 22:52:34 +0000 (UTC) (envelope-from yds@dppl.com) Received: by orion.dppl.com (Postfix, from userid 1001) id 909506432CC1; Fri, 22 Aug 2008 18:52:33 -0400 (EDT) Message-Id: <20080822225233.909506432CC1@orion.dppl.com> Date: Fri, 22 Aug 2008 18:52:33 -0400 (EDT) From: Yarema To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: cejkar@fit.vutbr.cz Subject: ports/126749: [PATCH] ftp/tnftpd new version 20080609 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Yarema List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2008 23:00:12 -0000 >Number: 126749 >Category: ports >Synopsis: [PATCH] ftp/tnftpd new version 20080609 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Fri Aug 22 23:00:10 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Yarema >Release: FreeBSD 6.3-STABLE amd64 >Organization: NYCBUG.org >Environment: FreeBSD 6.3-STABLE amd64 FreeBSD 7.0-STABLE amd64 >Description: Update NetBSD's tnftpd server to the latest and clean up the Makefile. pkg-message moved to files/pkg-message.in and all the relevant code replaced with: SUB_FILES= pkg-message files/patch-configure no longer needed. All the other patches refreshed to apply cleanly to the new sources. >How-To-Repeat: >Fix: diff -u -r -N tnftpd-20061204/Makefile tnftpd/Makefile --- tnftpd-20061204/Makefile 2007-02-04 10:19:49.000000000 -0500 +++ tnftpd/Makefile 2008-08-22 18:22:48.683980220 -0400 @@ -6,8 +6,7 @@ # PORTNAME= tnftpd -PORTVERSION= 20061204 -PORTREVISION= 1 +PORTVERSION= 20080609 CATEGORIES= ftp ipv6 MASTER_SITES= ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/ @@ -15,7 +14,6 @@ COMMENT= Enhanced ftp server from NetBSD GNU_CONFIGURE= yes -PKGMESSAGE= ${WRKDIR}/pkg-message CFLAGS+= -DSUPPORT_UTMP @@ -24,13 +22,12 @@ CONFIGURE_ARGS+= --with-socks5 .endif -DOCS= ChangeLog README THANKS COPYING - MAN5= ftpd.conf.5 ftpusers.5 MAN8= tnftpd.8 PLIST_FILES= libexec/tnftpd -PORTDOCS= ChangeLog README THANKS COPYING +PORTDOCS= ChangeLog NEWS README THANKS COPYING +SUB_FILES= pkg-message FIXPREFIX= ftpd.8 ftpd.conf.5 ftpusers.5 pre-patch: @@ -51,9 +48,6 @@ "s@^#define _DEFAULT_CONFDIR \"/etc\"@#define _DEFAULT_CONFDIR \"${PREFIX}/etc\"@" \ ${WRKSRC}/src/pathnames.h -post-build: - @${CAT} pkg-message | ${SED} -e 's|%%PREFIX%%|${PREFIX}|' > ${PKGMESSAGE} - do-install: ${INSTALL_PROGRAM} ${WRKSRC}/src/tnftpd ${PREFIX}/libexec ${INSTALL_MAN} ${WRKSRC}/src/ftpd.8 ${PREFIX}/man/man8/tnftpd.8 @@ -61,7 +55,7 @@ ${INSTALL_MAN} ${WRKSRC}/src/ftpusers.5 ${PREFIX}/man/man5 .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} -.for f in ${DOCS} +.for f in ${PORTDOCS} ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR} .endfor .endif diff -u -r -N tnftpd-20061204/distinfo tnftpd/distinfo --- tnftpd-20061204/distinfo 2006-12-15 03:44:21.000000000 -0500 +++ tnftpd/distinfo 2008-08-22 13:37:24.543280524 -0400 @@ -1,3 +1,3 @@ -MD5 (tnftpd-20061204.tar.gz) = dada97588519fea2535678b6652ecf64 -SHA256 (tnftpd-20061204.tar.gz) = 7cc0532a8d492ed79ced7c44c3351829021169cc1e75bff8fd1d1066f0c2a2cc -SIZE (tnftpd-20061204.tar.gz) = 187164 +MD5 (tnftpd-20080609.tar.gz) = 9753e194b81357262581de12f07a76b5 +SHA256 (tnftpd-20080609.tar.gz) = 82f594afd58f70e4439c52262edefee7edbd8802d7feb86710e34cab2facdd7c +SIZE (tnftpd-20080609.tar.gz) = 244732 diff -u -r -N tnftpd-20061204/files/patch-configure tnftpd/files/patch-configure --- tnftpd-20061204/files/patch-configure 2006-12-15 03:44:21.000000000 -0500 +++ tnftpd/files/patch-configure 1969-12-31 19:00:00.000000000 -0500 @@ -1,13 +0,0 @@ - -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 < - #include - main() - { diff -u -r -N tnftpd-20061204/files/patch-src-Makefile.in tnftpd/files/patch-src-Makefile.in --- tnftpd-20061204/files/patch-src-Makefile.in 2006-12-15 03:44:21.000000000 -0500 +++ tnftpd/files/patch-src-Makefile.in 2008-03-09 16:51:35.000000000 -0400 @@ -2,15 +2,15 @@ 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@ +--- src/Makefile.in.orig 2008-03-09 16:51:35.000000000 -0400 ++++ src/Makefile.in 2008-03-09 16:51:35.000000000 -0400 +@@ -2,8 +2,7 @@ + # - PROG = tnftpd --OBJS = cmds.o conf.o ftpd.o ftpcmd.o popen.o @LSOBJS@ + PROG = tnftpd@EXEEXT@ +-SRCS = cmds.c conf.c ftpd.c ftpcmd.c popen.c @LSOBJS@ -# removed: logutmp.o logwtmp.o -+OBJS = cmds.o conf.o ftpd.o ftpcmd.o popen.o logutmp.o logwtmp.o @LSOBJS@ - - all: ${PROG} ++SRCS = cmds.c conf.c ftpd.c ftpcmd.c popen.c logutmp.c logwtmp.c @LSOBJS@ + srcdir = @srcdir@ + VPATH = @srcdir@ diff -u -r -N tnftpd-20061204/files/patch-src-ftpd.c tnftpd/files/patch-src-ftpd.c --- tnftpd-20061204/files/patch-src-ftpd.c 2006-12-15 03:44:21.000000000 -0500 +++ tnftpd/files/patch-src-ftpd.c 2008-06-08 20:52:33.000000000 -0400 @@ -8,9 +8,9 @@ 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 @@ +--- src/ftpd.c.orig 2008-06-08 20:52:33.000000000 -0400 ++++ src/ftpd.c 2008-06-08 20:52:33.000000000 -0400 +@@ -368,6 +368,24 @@ break; case 'C': @@ -35,7 +35,7 @@ pw = sgetpwnam(optarg); exit(checkaccess(optarg) ? 0 : 1); /* NOTREACHED */ -@@ -496,12 +514,12 @@ +@@ -497,12 +515,12 @@ exit(1); } else if (l <= 0) { syslog(LOG_WARNING, "using conservative LOGIN_NAME_MAX value"); @@ -50,7 +50,7 @@ #endif curname = malloc(curname_len); if (curname == NULL) { -@@ -1166,18 +1184,38 @@ +@@ -1179,18 +1197,38 @@ /* have a host specifier */ if ((p = strchr(word, '@')) != NULL) { @@ -98,10 +98,10 @@ continue; /* check against hostname glob */ -@@ -3744,7 +3782,7 @@ +@@ -3776,7 +3814,7 @@ expire = pwent->pw_expire; #endif - #if HAVE_PW_CHANGE + #if defined(HAVE_STRUCT_PASSWD_PW_CHANGE) - change = (pwent->pw_change == _PASSWORD_CHGNOW)? now : pwent->pw_change; + change = (pwent->pw_change == -1)? now : pwent->pw_change; #endif diff -u -r -N tnftpd-20061204/files/patch-src-logutmp.c tnftpd/files/patch-src-logutmp.c --- tnftpd-20061204/files/patch-src-logutmp.c 2006-12-15 03:44:21.000000000 -0500 +++ tnftpd/files/patch-src-logutmp.c 2006-12-04 16:13:22.000000000 -0500 @@ -2,8 +2,8 @@ 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 +--- src/logutmp.c.orig 2006-12-04 16:13:22.000000000 -0500 ++++ src/logutmp.c 2006-12-04 16:13:22.000000000 -0500 @@ -59,13 +59,13 @@ #include #include diff -u -r -N tnftpd-20061204/files/patch-src-logwtmp.c tnftpd/files/patch-src-logwtmp.c --- tnftpd-20061204/files/patch-src-logwtmp.c 2006-12-15 03:44:21.000000000 -0500 +++ tnftpd/files/patch-src-logwtmp.c 2008-05-31 23:26:12.000000000 -0400 @@ -4,9 +4,9 @@ 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 @@ +--- src/logwtmp.c.orig 2008-05-31 23:26:12.000000000 -0400 ++++ src/logwtmp.c 2008-05-31 23:26:12.000000000 -0400 +@@ -43,11 +43,13 @@ #include #include @@ -20,7 +20,7 @@ #include #include #include -@@ -59,7 +61,6 @@ +@@ -60,7 +62,6 @@ #ifdef SUPPORT_UTMPX #include #endif @@ -28,11 +28,10 @@ #ifdef KERBEROS5 #include -@@ -88,6 +89,26 @@ - { +@@ -90,6 +91,26 @@ struct utmp ut; struct stat buf; -+ + + if (strlen(host) > UT_HOSTSIZE) { + struct addrinfo hints, *res; + int error; @@ -52,6 +51,7 @@ + hostbuf[UT_HOSTSIZE] = '\0'; + } + } - ++ if (fd < 0) return; + if (fstat(fd, &buf) == 0) { diff -u -r -N tnftpd-20061204/files/patch-tnftpd.h tnftpd/files/patch-tnftpd.h --- tnftpd-20061204/files/patch-tnftpd.h 2006-12-15 03:44:21.000000000 -0500 +++ tnftpd/files/patch-tnftpd.h 2008-06-08 21:24:51.000000000 -0400 @@ -2,17 +2,18 @@ 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 @@ +--- tnftpd.h.orig 2008-06-08 21:24:51.000000000 -0400 ++++ tnftpd.h 2008-06-08 21:24:51.000000000 -0400 +@@ -548,8 +548,12 @@ #define TM_YEAR_BASE 1900 - #if ! defined(LOGIN_NAME_MAX) + #if !defined(LOGIN_NAME_MAX) +#if defined(MAXLOGNAME) +# define LOGIN_NAME_MAX MAXLOGNAME +#else # define LOGIN_NAME_MAX (9) -+#endif #endif ++#endif - #if ! defined(_POSIX_LOGIN_NAME_MAX) + #if !defined(_POSIX_LOGIN_NAME_MAX) + # define _POSIX_LOGIN_NAME_MAX LOGIN_NAME_MAX diff -u -r -N tnftpd-20061204/files/pkg-message.in tnftpd/files/pkg-message.in --- tnftpd-20061204/files/pkg-message.in 1969-12-31 19:00:00.000000000 -0500 +++ tnftpd/files/pkg-message.in 2004-01-23 17:56:46.000000000 -0500 @@ -0,0 +1,9 @@ +================================================================================ +This port relies on a number of configuration files in %%PREFIX%%/etc. +At the very least, create a ftpusers file with the usernams of users you don't +want to connect (root, toor, etc.). This will allow non-listed users to log in. +Copying /etc/ftpusers to %%PREFIX%%/etc/ftpusers should be sufficient. + +See the man files for more information. The man- and configuration files for +FreeBSD's built-in ftpd can also be of use as examples/additional info. +================================================================================ diff -u -r -N tnftpd-20061204/pkg-message tnftpd/pkg-message --- tnftpd-20061204/pkg-message 2004-01-23 17:56:46.000000000 -0500 +++ tnftpd/pkg-message 1969-12-31 19:00:00.000000000 -0500 @@ -1,9 +0,0 @@ -================================================================================ -This port relies on a number of configuration files in %%PREFIX%%/etc. -At the very least, create a ftpusers file with the usernams of users you don't -want to connect (root, toor, etc.). This will allow non-listed users to log in. -Copying /etc/ftpusers to %%PREFIX%%/etc/ftpusers should be sufficient. - -See the man files for more information. The man- and configuration files for -FreeBSD's built-in ftpd can also be of use as examples/additional info. -================================================================================ >Release-Note: >Audit-Trail: >Unformatted: