1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

ftp/tnftpd: Update to 20231001

While I'm here:

- Switch to DISTVERSION as suggested by Porters Handbook
- Make use of NetBSD's CDN and add a few additional mirrors
- Add WWW url
- Add license:

  [1]
  tnftpd contains a mix of BSD2CLAUSE (mostly the NetBSD
  derived code) and BSD3CLAUSE (inherited from the orignal UCB BSD code).

  tnftpd was previously BSD4CLAUSE but that was fixed in the upstream code
  a while ago so I changed the COPYING to reflect that. It's no more
  restrictive than BSD3CLAUSE now.

ChangeLog:

* Release as "tnftpd 20231001".

* Always use $YACC even without --enable-maintainer-mode.

* Update to NetBSD-ftpd 20230930:
	* Fix uninitialized memory usage in count_users().
	* Fix pam_set_item() call with proper struct passed as
	PAM_SOCKADDR.

* Build fixes:
	* Check for inet_net_pton() in -lresolv (for glibc).
	* Improve configure's display of make variables.
	* Remove deprecated autoconf macros.

* Security fixes:
	* CVE-2020-7468: Improve error handling when switching UID/GID.
	* Prevent MLSD and MLST before authentication succeeds.

* Update to NetBSD-ftpd 20230922:
	* Treat failed chdir/chroot for guest and chroot accounts as
	fatal. Also treat failed set{e,}(u,g}id calls as fatal.
	Addresses CVE-2020-7468, via FreeBSD.
	* Improve seteuid error handling, per suggestion by Simon
	Josefsson.
	* Add missing check_login checks for MLST and MLSD.

* Sync libnetbsd replacements with NetBSD upstream:
	* Replace fgetln() with tools/compat implementation that
	handles embedded NULs.
	* Fix inet_net_pton() to avoid integer overflow in bits.
	* Fix inet_ntop() to set errno when returning NULL.
	* Fix inet_pton() to improve hex formatting.
	* Fix sl_add() to not update size unless realloc() succeeds.

* Improve portability on NetBSD by providing own setprogname()
and getprogname(), instead of defining global __progname.

* Update example ftpusers to use example DNS and IP addresses.

* Build fixes:
	* Improve configure's display of detected features.
	* Enable more POSIX extensions.
	* Only replace glob() if required GLOB_ flags aren't available.
	* Only replace fts_open() if required FTS_ flags aren't
	available.

Suggested by:	[1] Luke Mewburn <lukem@NetBSD.org>
PR:		274209
MFH:		2023Q4
This commit is contained in:
Rudolf Čejka 2023-11-27 11:18:20 +00:00 committed by Nuno Teixeira
parent c36bd0394b
commit 6845ef2aab
3 changed files with 48 additions and 5 deletions

View File

@ -1,10 +1,18 @@
PORTNAME= tnftpd
PORTVERSION= 20200704
DISTVERSION= 20231001
CATEGORIES= ftp
MASTER_SITES= ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/
MASTER_SITES= https://cdn.netbsd.org/pub/NetBSD/misc/tnftp/ \
https://ftp.uni-erlangen.de/netbsd/misc/tnftp/ \
https://ftp.jaist.ac.jp/pub/NetBSD/misc/tnftp/ \
https://ftp.netbsd.org/pub/NetBSD/misc/tnftp/
MAINTAINER= cejkar@fit.vutbr.cz
COMMENT= Enhanced FTP server from NetBSD
WWW= https://ftp.netbsd.org/pub/NetBSD/misc/tnftp/
LICENSE= BSD2CLAUSE BSD3CLAUSE
LICENSE_COMB= multi
LICENSE_FILE= ${WRKSRC}/COPYING
USES= autoreconf libtool
GNU_CONFIGURE= yes

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1597924555
SHA256 (tnftpd-20200704.tar.gz) = 92de915e1b4b7e4bd403daac5d89ce67fa73e49e8dda18e230fa86ee98e26ab7
SIZE (tnftpd-20200704.tar.gz) = 529105
TIMESTAMP = 1700838023
SHA256 (tnftpd-20231001.tar.gz) = 24a51bd2e5818ddb8c2479df9c8175a78dd8a5ef49ee3ab09f5f39c35069826e
SIZE (tnftpd-20231001.tar.gz) = 536802

View File

@ -0,0 +1,35 @@
Looking at FreeBSD's manual page, it appears that FreeBSD 5.2 changed
the signature of the comparison function:
FTS * fts_open(char * const *path_argv, int options,
int (*compar)(const FTSENT * const *, const FTSENT * const *));
--- ls/ls.c.orig 2009-03-01 22:58:20 UTC
+++ ls/ls.c
@@ -73,7 +73,14 @@ static void display(FTSENT *, FTSENT *);
#include "extern.h"
static void display(FTSENT *, FTSENT *);
+
+/* workaround FreeBSD <fts.h> changing fts_open()'s compar signature */
+#if defined(__FreeBSD__) && defined(USE_FTS_H)
+static int mastercmp(const FTSENT * const *, const FTSENT * const *);
+#else
static int mastercmp(const FTSENT **, const FTSENT **);
+#endif
+
static void traverse(int, char **, int);
static void (*printfcn)(DISPLAY *);
@@ -595,7 +602,11 @@ static int
* All other levels use the sort function. Error entries remain unsorted.
*/
static int
+#if defined(__FreeBSD__) && defined(USE_FTS_H)
+mastercmp(const FTSENT * const *a, const FTSENT * const *b)
+#else
mastercmp(const FTSENT **a, const FTSENT **b)
+#endif
{
int a_info, b_info;