public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-ftp/atftp/, net-ftp/atftp/files/
@ 2019-04-23  8:09 Tobias Klausmann
  0 siblings, 0 replies; 4+ messages in thread
From: Tobias Klausmann @ 2019-04-23  8:09 UTC (permalink / raw
  To: gentoo-commits

commit:     a381735043aa3af0fb344388d12148b857d57847
Author:     Martin Dummer <martin.dummer <AT> gmx <DOT> net>
AuthorDate: Mon Apr 22 10:11:17 2019 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Tue Apr 23 08:09:09 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3817350

net-ftp/atftp: version bump to 0.7.2

new version 0.7.2, includes all patches from debian & gentoo
add proxy-maintainer

Signed-off-by: Martin Dummer <martin.dummer <AT> gmx.net>
Closes: https://bugs.gentoo.org/513486
Closes: https://bugs.gentoo.org/636150
Package-Manager: Portage-2.3.63, Repoman-2.3.12
Signed-off-by: Tobias Klausmann <klausman <AT> gentoo.org>

 net-ftp/atftp/Manifest                       |  1 +
 net-ftp/atftp/atftp-0.7.2.ebuild             | 68 ++++++++++++++++++++++++++++
 net-ftp/atftp/files/atftp-0.7.2-CFLAGS.patch | 32 +++++++++++++
 net-ftp/atftp/files/atftp.init               |  0
 net-ftp/atftp/metadata.xml                   | 13 ++++--
 5 files changed, 111 insertions(+), 3 deletions(-)

diff --git a/net-ftp/atftp/Manifest b/net-ftp/atftp/Manifest
index 08fdd38b0b5..0b5c7deb106 100644
--- a/net-ftp/atftp/Manifest
+++ b/net-ftp/atftp/Manifest
@@ -1,3 +1,4 @@
+DIST atftp-0.7.2.tar.gz 248038 BLAKE2B 3ca44624bf989009c2ebd0ae97927b0784e3c617a79a1bd00212a72a185302cf84f51c8bcda2012981d67cfed4d241b70f8719e78155207608f07a2227e6c437 SHA512 d602bb69451175a36e619abcff412ab1f6d0e7baf8c3f9a2b32081530fbc5816157404b80d42a8b6caa89cc83675b5cbeefcd57a5d98b8f5b43c6254b20ef28b
 DIST atftp-0.7.dfsg.tar.gz 187992 BLAKE2B 8196c333ea8042879196ca9f9c656b4d60a332ed1d64a5738870e1d4fd5f108716da6769bf52759626ad3efce11946b5d6285ac9fbe46cb63e6e2d051fc7aeb3 SHA512 40d231c0bc0478fedb3eff9b4c540c62dd9bd6c40d9738e2db1813797a5d48e201720d43a48970ce250f1bb5b15460bb9b3d631c06f96c1a74775ecfb6d13f82
 DIST atftp-0.7.tar.gz 202234 BLAKE2B 65ff486b6ef2b42b2a4737f121c2c36e8ff73838f3c10592c11020acdf2afdf0883fda8b39613e1cc35b47141fd29543a7ef2c3e2ead857033ad4f7181c91d04 SHA512 81c51b613a640f7db4d26da0fb891bda345d11d3f39e0af37f393d2abf619094c1de83f92f04ac75367f546cc70e37d7d47c1535c241c941036fd4df7863a440
 DIST atftp_0.7-11.diff.gz 26055 BLAKE2B c9be58836b5a7e3943dd28dd4661abab5e86b1941c9a2b58786eebe702ab515cf1bc08bf44c8ab4157584a437e861e24eb0c833c1fa1bc774f7f8a2134b6cd27 SHA512 28747f8f3ef2fc3b122361f682fe26ba93acf09b190f61efb3cfcbb6bdeef78cfe1348aeaf1699003a7e02586579be670d85b65baad1b1165a4bec9a9279adb5

diff --git a/net-ftp/atftp/atftp-0.7.2.ebuild b/net-ftp/atftp/atftp-0.7.2.ebuild
new file mode 100644
index 00000000000..7f0d4df1b2b
--- /dev/null
+++ b/net-ftp/atftp/atftp-0.7.2.ebuild
@@ -0,0 +1,68 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools flag-o-matic systemd
+
+DESCRIPTION="Advanced TFTP implementation client/server"
+HOMEPAGE="https://sourceforge.net/projects/atftp/"
+SRC_URI="mirror://sourceforge/atftp/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="selinux tcpd readline pcre"
+
+DEPEND="tcpd? ( sys-apps/tcp-wrappers )
+	readline? ( sys-libs/readline:0= )
+	pcre? ( dev-libs/libpcre )"
+RDEPEND="${DEPEND}
+	!net-ftp/netkit-tftp
+	!net-ftp/tftp-hpa
+	!net-ftp/uftpd
+	selinux? ( sec-policy/selinux-tftp )"
+BDEPEND=""
+
+PATCHES=(
+	"${FILESDIR}/${P}-CFLAGS.patch"
+)
+
+src_prepare() {
+	append-cppflags -D_REENTRANT -DRATE_CONTROL
+	# fix #561720 by restoring pre-GCC5 inline semantics
+	append-cflags -std=gnu89
+
+	default
+	eautoreconf
+}
+
+src_configure() {
+	econf \
+		$(use_enable tcpd libwrap) \
+		$(use_enable readline libreadline) \
+		$(use_enable pcre libpcre) \
+		--enable-mtftp
+}
+
+src_test() {
+	cd "${S}"/test || die
+	# Try to run the tests
+	./test.sh || die
+}
+
+src_install() {
+	default
+
+	newinitd "${FILESDIR}"/atftp.init atftp
+	newconfd "${FILESDIR}"/atftp.confd atftp
+
+	systemd_dounit "${FILESDIR}"/atftp.service
+	systemd_install_serviced "${FILESDIR}"/atftp.service.conf
+
+	dodoc README* BUGS FAQ Changelog INSTALL TODO
+	dodoc "${S}"/docs/*
+
+	docinto test
+	cd "${S}"/test || die
+	dodoc load.sh mtftp.conf pcre_pattern.txt test.sh test_suite.txt
+}

diff --git a/net-ftp/atftp/files/atftp-0.7.2-CFLAGS.patch b/net-ftp/atftp/files/atftp-0.7.2-CFLAGS.patch
new file mode 100644
index 00000000000..749f8e8e6d3
--- /dev/null
+++ b/net-ftp/atftp/files/atftp-0.7.2-CFLAGS.patch
@@ -0,0 +1,32 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -69,29 +69,6 @@
+ dnl Check for AIX
+ AC_AIX
+ 
+-CFLAGS="$CFLAGS -g -Wall -D_REENTRANT"
+-
+-if test x$debug = xtrue; then
+-   CFLAGS="$CFLAGS -O0 -DDEBUG"
+-else
+-  if test -n "$auto_cflags"; then
+-    if test -n "$GCC"; then
+-      CFLAGS="$CFLAGS -g -O2 -Wall -Wno-implicit"
+-    else
+-      case "$host_os" in
+-        *hpux*)  CFLAGS="$CFLAGS +O3"
+-	  ;;
+-        *ultrix* | *osf*) CFLAGS="$CFLAGS -O -Olimit 2000"
+-	  ;;
+-        *)       CFLAGS="$CFLAGS -O2"
+-	  ;;
+-      esac
+-    fi
+-  else
+-    CFLAGS="$CFLAGS -O2"
+-  fi
+-fi
+-
+ AC_PROG_MAKE_SET
+ AC_PROG_INSTALL
+ 

diff --git a/net-ftp/atftp/files/atftp.init b/net-ftp/atftp/files/atftp.init
old mode 100644
new mode 100755

diff --git a/net-ftp/atftp/metadata.xml b/net-ftp/atftp/metadata.xml
index cf1190698b2..13613cc65e2 100644
--- a/net-ftp/atftp/metadata.xml
+++ b/net-ftp/atftp/metadata.xml
@@ -1,7 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-<maintainer type="person">
-<email>klausman@gentoo.org</email>
-</maintainer>
+	<maintainer type="person">
+		<email>klausman@gentoo.org</email>
+	</maintainer>
+	<maintainer type="person">
+		<email>martin.dummer@gmx.net</email>
+	</maintainer>
+	<maintainer type="project">
+		<email>proxy-maint@gentoo.org</email>
+		<name>Proxy Maintainers</name>
+	</maintainer>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-ftp/atftp/, net-ftp/atftp/files/
@ 2020-02-16 12:46 Tobias Klausmann
  0 siblings, 0 replies; 4+ messages in thread
From: Tobias Klausmann @ 2020-02-16 12:46 UTC (permalink / raw
  To: gentoo-commits

commit:     b31081eeb6c2b2ea7d22f79ff10710dab6400a0c
Author:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 16 12:46:28 2020 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Sun Feb 16 12:46:28 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b31081ee

net-ftp/atftp: Clean up deps and remove old

This drops the superfluous netkit-tftp blocker, removes unnecessary +x
bit on the init script and removes the old version 0.7-r6.

Package-Manager: Portage-2.3.87, Repoman-2.3.20
Signed-off-by: Tobias Klausmann <klausman <AT> gentoo.org>

 net-ftp/atftp/Manifest                             |  1 -
 net-ftp/atftp/atftp-0.7-r5.ebuild                  | 73 ----------------------
 .../{atftp-0.7.2.ebuild => atftp-0.7.2-r1.ebuild}  |  3 +-
 net-ftp/atftp/files/atftp.init                     |  0
 4 files changed, 1 insertion(+), 76 deletions(-)

diff --git a/net-ftp/atftp/Manifest b/net-ftp/atftp/Manifest
index 0b5c7deb106..37c22b68977 100644
--- a/net-ftp/atftp/Manifest
+++ b/net-ftp/atftp/Manifest
@@ -1,4 +1,3 @@
 DIST atftp-0.7.2.tar.gz 248038 BLAKE2B 3ca44624bf989009c2ebd0ae97927b0784e3c617a79a1bd00212a72a185302cf84f51c8bcda2012981d67cfed4d241b70f8719e78155207608f07a2227e6c437 SHA512 d602bb69451175a36e619abcff412ab1f6d0e7baf8c3f9a2b32081530fbc5816157404b80d42a8b6caa89cc83675b5cbeefcd57a5d98b8f5b43c6254b20ef28b
 DIST atftp-0.7.dfsg.tar.gz 187992 BLAKE2B 8196c333ea8042879196ca9f9c656b4d60a332ed1d64a5738870e1d4fd5f108716da6769bf52759626ad3efce11946b5d6285ac9fbe46cb63e6e2d051fc7aeb3 SHA512 40d231c0bc0478fedb3eff9b4c540c62dd9bd6c40d9738e2db1813797a5d48e201720d43a48970ce250f1bb5b15460bb9b3d631c06f96c1a74775ecfb6d13f82
-DIST atftp-0.7.tar.gz 202234 BLAKE2B 65ff486b6ef2b42b2a4737f121c2c36e8ff73838f3c10592c11020acdf2afdf0883fda8b39613e1cc35b47141fd29543a7ef2c3e2ead857033ad4f7181c91d04 SHA512 81c51b613a640f7db4d26da0fb891bda345d11d3f39e0af37f393d2abf619094c1de83f92f04ac75367f546cc70e37d7d47c1535c241c941036fd4df7863a440
 DIST atftp_0.7-11.diff.gz 26055 BLAKE2B c9be58836b5a7e3943dd28dd4661abab5e86b1941c9a2b58786eebe702ab515cf1bc08bf44c8ab4157584a437e861e24eb0c833c1fa1bc774f7f8a2134b6cd27 SHA512 28747f8f3ef2fc3b122361f682fe26ba93acf09b190f61efb3cfcbb6bdeef78cfe1348aeaf1699003a7e02586579be670d85b65baad1b1165a4bec9a9279adb5

diff --git a/net-ftp/atftp/atftp-0.7-r5.ebuild b/net-ftp/atftp/atftp-0.7-r5.ebuild
deleted file mode 100644
index c72eba363ad..00000000000
--- a/net-ftp/atftp/atftp-0.7-r5.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit autotools flag-o-matic systemd
-
-DEBIAN_PV="11"
-DEBIAN_A="${PN}_${PV}-${DEBIAN_PV}.diff"
-
-DESCRIPTION="Advanced TFTP implementation client/server"
-HOMEPAGE="ftp://ftp.mamalinux.com/pub/atftp/"
-SRC_URI="ftp://ftp.mamalinux.com/pub/atftp/${P}.tar.gz
-	mirror://debian/pool/main/a/${PN}/${DEBIAN_A}.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 arm ppc ppc64 ~s390 sparc x86"
-IUSE="selinux tcpd readline pcre"
-
-DEPEND="tcpd? ( sys-apps/tcp-wrappers )
-	readline? ( sys-libs/readline:0= )
-	pcre? ( dev-libs/libpcre )"
-RDEPEND="${DEPEND}
-	!net-ftp/netkit-tftp
-	!net-ftp/tftp-hpa
-	!net-ftp/uftpd
-	selinux? ( sec-policy/selinux-tftp )"
-
-PATCHES=(
-	"${WORKDIR}/${DEBIAN_A}"
-	"${FILESDIR}/${P}-pcre.patch"
-	"${FILESDIR}/${P}-password.patch"
-	"${FILESDIR}/${P}-tests.patch"
-	"${FILESDIR}/${P}-glibc24.patch"
-	"${FILESDIR}/${P}-blockno.patch"
-	"${FILESDIR}/${P}-spaced_filename.patch"
-	"${FILESDIR}/${P}-illreply.patch"
-	"${FILESDIR}/${P}-CFLAGS.patch"
-)
-
-src_prepare() {
-	append-cppflags -D_REENTRANT -DRATE_CONTROL
-	# fix #561720 by restoring pre-GCC5 inline semantics
-	append-cflags -std=gnu89
-
-	default
-	eautoreconf
-}
-
-src_configure() {
-	econf \
-		$(use_enable tcpd libwrap) \
-		$(use_enable readline libreadline) \
-		$(use_enable pcre libpcre) \
-		--enable-mtftp
-}
-
-src_install() {
-	default
-
-	newinitd "${FILESDIR}"/atftp.init atftp
-	newconfd "${FILESDIR}"/atftp.confd atftp
-
-	systemd_dounit "${FILESDIR}"/atftp.service
-	systemd_install_serviced "${FILESDIR}"/atftp.service.conf
-
-	dodoc README* BUGS FAQ Changelog INSTALL TODO
-	dodoc "${S}"/docs/*
-
-	docinto test
-	cd "${S}"/test || die
-	dodoc load.sh mtftp.conf pcre_pattern.txt test.sh test_suite.txt
-}

diff --git a/net-ftp/atftp/atftp-0.7.2.ebuild b/net-ftp/atftp/atftp-0.7.2-r1.ebuild
similarity index 96%
rename from net-ftp/atftp/atftp-0.7.2.ebuild
rename to net-ftp/atftp/atftp-0.7.2-r1.ebuild
index 7f0d4df1b2b..5a2c3723d44 100644
--- a/net-ftp/atftp/atftp-0.7.2.ebuild
+++ b/net-ftp/atftp/atftp-0.7.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2019 Gentoo Authors
+# Copyright 2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -17,7 +17,6 @@ DEPEND="tcpd? ( sys-apps/tcp-wrappers )
 	readline? ( sys-libs/readline:0= )
 	pcre? ( dev-libs/libpcre )"
 RDEPEND="${DEPEND}
-	!net-ftp/netkit-tftp
 	!net-ftp/tftp-hpa
 	!net-ftp/uftpd
 	selinux? ( sec-policy/selinux-tftp )"

diff --git a/net-ftp/atftp/files/atftp.init b/net-ftp/atftp/files/atftp.init
old mode 100755
new mode 100644


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-ftp/atftp/, net-ftp/atftp/files/
@ 2021-01-12 11:56 Tobias Klausmann
  0 siblings, 0 replies; 4+ messages in thread
From: Tobias Klausmann @ 2021-01-12 11:56 UTC (permalink / raw
  To: gentoo-commits

commit:     fb0a9a8269b01b991bb14c1382058d84de966ea2
Author:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 12 11:54:22 2021 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Tue Jan 12 11:55:58 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb0a9a82

net-ftp/atftp: Add -r addressing CVE 2020-6097

Patch sourced from:
https://sourceforge.net/u/peterkaestle/atftp/ci/96409ef3b9ca061f9527cfaafa778105cf15d994/

Bug: https://bugs.gentoo.org/741566
Signed-off-by: Tobias Klausmann <klausman <AT> gentoo.org>

 net-ftp/atftp/atftp-0.7.2-r2.ebuild                | 68 ++++++++++++++++
 .../atftp/files/atftp-0.7.2-cve-2020-6097.patch    | 92 ++++++++++++++++++++++
 2 files changed, 160 insertions(+)

diff --git a/net-ftp/atftp/atftp-0.7.2-r2.ebuild b/net-ftp/atftp/atftp-0.7.2-r2.ebuild
new file mode 100644
index 00000000000..28a0da5d668
--- /dev/null
+++ b/net-ftp/atftp/atftp-0.7.2-r2.ebuild
@@ -0,0 +1,68 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools flag-o-matic systemd
+
+DESCRIPTION="Advanced TFTP implementation client/server"
+HOMEPAGE="https://sourceforge.net/projects/atftp/"
+SRC_URI="mirror://sourceforge/atftp/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="selinux tcpd readline pcre"
+
+DEPEND="tcpd? ( sys-apps/tcp-wrappers )
+	readline? ( sys-libs/readline:0= )
+	pcre? ( dev-libs/libpcre )"
+RDEPEND="${DEPEND}
+	!net-ftp/tftp-hpa
+	!net-ftp/uftpd
+	selinux? ( sec-policy/selinux-tftp )"
+BDEPEND=""
+
+PATCHES=(
+	"${FILESDIR}/${P}-CFLAGS.patch"
+	"${FILESDIR}/${P}-cve-2020-6097.patch"
+)
+
+src_prepare() {
+	append-cppflags -D_REENTRANT -DRATE_CONTROL
+	# fix #561720 by restoring pre-GCC5 inline semantics
+	append-cflags -std=gnu89
+
+	default
+	eautoreconf
+}
+
+src_configure() {
+	econf \
+		$(use_enable tcpd libwrap) \
+		$(use_enable readline libreadline) \
+		$(use_enable pcre libpcre) \
+		--enable-mtftp
+}
+
+src_test() {
+	cd "${S}"/test || die
+	# Try to run the tests
+	./test.sh || die
+}
+
+src_install() {
+	default
+
+	newinitd "${FILESDIR}"/atftp.init atftp
+	newconfd "${FILESDIR}"/atftp.confd atftp
+
+	systemd_dounit "${FILESDIR}"/atftp.service
+	systemd_install_serviced "${FILESDIR}"/atftp.service.conf
+
+	dodoc README* BUGS FAQ Changelog INSTALL TODO
+	dodoc "${S}"/docs/*
+
+	docinto test
+	cd "${S}"/test || die
+	dodoc load.sh mtftp.conf pcre_pattern.txt test.sh test_suite.txt
+}

diff --git a/net-ftp/atftp/files/atftp-0.7.2-cve-2020-6097.patch b/net-ftp/atftp/files/atftp-0.7.2-cve-2020-6097.patch
new file mode 100644
index 00000000000..5130d008643
--- /dev/null
+++ b/net-ftp/atftp/files/atftp-0.7.2-cve-2020-6097.patch
@@ -0,0 +1,92 @@
+commit 96409ef3b9ca061f9527cfaafa778105cf15d994
+Author: Peter Kaestle <peter.kaestle@nokia.com>
+Date:   Wed Oct 14 14:02:41 2020 +0200
+
+    Fix for DoS issue CVE-2020-6097
+    
+    "sockaddr_print_addr" of tftpd can be triggered remotely to call
+    assert(), which will crash the tftpd daemon.  See:
+    https://talosintelligence.com/vulnerability_reports/TALOS-2020-1029
+    
+    "sockaddr_print_addr" originaly had two features:
+    1) returning pointer to string of the incoming ip address
+    2) checking whether ss_family of the connection is supported
+    
+    To fix the issue, a separate function "sockaddr_family_supported" is
+    used to take care of 2) and "sockaddr_print_addr" returns an error
+    message string for unsupported cases when using 1) insert of calling
+    assert().
+
+diff --git a/tftp_def.c b/tftp_def.c
+index d457c2a..428a930 100644
+--- a/tftp_def.c
++++ b/tftp_def.c
+@@ -180,6 +180,15 @@ int Gethostbyname(char *addr, struct hostent *host)
+      return OK;
+ }
+ 
++int
++sockaddr_family_supported(const struct sockaddr_storage *ss)
++{
++     if (ss->ss_family == AF_INET || ss->ss_family == AF_INET6)
++          return 1;
++     else
++          return 0;
++}
++
+ char *
+ sockaddr_print_addr(const struct sockaddr_storage *ss, char *buf, size_t len)
+ {
+@@ -189,7 +198,7 @@ sockaddr_print_addr(const struct sockaddr_storage *ss, char *buf, size_t len)
+      else if (ss->ss_family == AF_INET6)
+           addr = &((const struct sockaddr_in6 *)ss)->sin6_addr;
+      else
+-          assert(!"sockaddr_print: unsupported address family");
++          return "sockaddr_print: unsupported address family";
+      return (char *)inet_ntop(ss->ss_family, addr, buf, len);
+ }
+ 
+diff --git a/tftp_def.h b/tftp_def.h
+index 0841746..458e310 100644
+--- a/tftp_def.h
++++ b/tftp_def.h
+@@ -54,6 +54,7 @@ int print_eng(double value, char *string, int size, char *format);
+ inline char *Strncpy(char *to, const char *from, size_t size);
+ int Gethostbyname(char *addr, struct hostent *host);
+ 
++int sockaddr_family_supported(const struct sockaddr_storage *ss);
+ char *sockaddr_print_addr(const struct sockaddr_storage *, char *, size_t);
+ #define SOCKADDR_PRINT_ADDR_LEN INET6_ADDRSTRLEN
+ uint16_t sockaddr_get_port(const struct sockaddr_storage *);
+diff --git a/tftpd.c b/tftpd.c
+index 0b6f6a5..a7561a5 100644
+--- a/tftpd.c
++++ b/tftpd.c
+@@ -644,6 +644,11 @@ void *tftpd_receive_request(void *arg)
+      }
+ 
+ #ifdef HAVE_WRAP
++     if (!abort && !sockaddr_family_supported(&data->client_info->client))
++     {
++          logger(LOG_ERR, "Connection from unsupported network address family refused");
++          abort = 1;
++     }
+      if (!abort)
+      {
+           /* Verify the client has access. We don't look for the name but
+diff --git a/tftpd_mtftp.c b/tftpd_mtftp.c
+index d420d10..0032905 100644
+--- a/tftpd_mtftp.c
++++ b/tftpd_mtftp.c
+@@ -393,6 +393,11 @@ void *tftpd_mtftp_server(void *arg)
+                                         &data_size, data->data_buffer);
+ 
+ #ifdef HAVE_WRAP
++               if (!sockaddr_family_supported(&sa))
++               {
++                    logger(LOG_ERR, "mtftp: Connection from unsupported network address family refused");
++                    continue;
++               }
+                /* Verify the client has access. We don't look for the name but
+                   rely only on the IP address for that. */
+                sockaddr_print_addr(&sa, addr_str, sizeof(addr_str));


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-ftp/atftp/, net-ftp/atftp/files/
@ 2022-10-02 18:13 Florian Schmaus
  0 siblings, 0 replies; 4+ messages in thread
From: Florian Schmaus @ 2022-10-02 18:13 UTC (permalink / raw
  To: gentoo-commits

commit:     13c3bbe3792578491392bc1d00e3e5eec582bf1f
Author:     Martin Dummer <martin.dummer <AT> gmx <DOT> net>
AuthorDate: Wed Sep  7 09:09:03 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun Oct  2 18:10:51 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13c3bbe3

net-ftp/atftp: add 0.8.0

Signed-off-by: Martin Dummer <martin.dummer <AT> gmx.net>
Closes: https://github.com/gentoo/gentoo/pull/27177
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 net-ftp/atftp/Manifest                   |  1 +
 net-ftp/atftp/atftp-0.8.0.ebuild         | 62 ++++++++++++++++++++++++++++++++
 net-ftp/atftp/files/atftp-fix-test.patch | 11 ++++++
 3 files changed, 74 insertions(+)

diff --git a/net-ftp/atftp/Manifest b/net-ftp/atftp/Manifest
index 45877ec53841..050b3b5349f9 100644
--- a/net-ftp/atftp/Manifest
+++ b/net-ftp/atftp/Manifest
@@ -1 +1,2 @@
 DIST atftp-0.7.5.tar.gz 253626 BLAKE2B aa0a0311d29fd52b77f8ae021407221f815a39fe85cabac36ee18dce8918a5b0accda455e2df5fecf34f09e93e583bfbc86162b60a7237bd6d34b0c658ec2970 SHA512 457101136e59f7a1657ce591e9ea678ab9091a59219d41b6c522fad4a3555c5cbcb8c9e0c3267fd871940d99b5f8673ab4ce5ec9737dee52f017e5c80a4e59d7
+DIST atftp-0.8.0.tar.gz 133417 BLAKE2B 6c0ec29c78f345f24adb65fd162e4572bd5b91e067c8db1ff6600ed2ea9a8461693bb6635c2edf09c77693dc6227689406a97b1d6e86a742ffbe3849ab9d3ee3 SHA512 b700b3e4182970fb494ffabd49e39d3622b1aff5f69882549eff0b52a01c8c47babe51b451c4829f9b833ea2ea7c590a2f3819f8e3508176fa7d1b5c0e152b68

diff --git a/net-ftp/atftp/atftp-0.8.0.ebuild b/net-ftp/atftp/atftp-0.8.0.ebuild
new file mode 100644
index 000000000000..7f0f4082403c
--- /dev/null
+++ b/net-ftp/atftp/atftp-0.8.0.ebuild
@@ -0,0 +1,62 @@
+# Copyright 2021-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools flag-o-matic systemd
+
+DESCRIPTION="Advanced TFTP implementation client/server"
+HOMEPAGE="https://sourceforge.net/projects/atftp/"
+SRC_URI="mirror://sourceforge/atftp/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="selinux tcpd readline pcre"
+
+DEPEND="tcpd? ( sys-apps/tcp-wrappers )
+	readline? ( sys-libs/readline:0= )
+	pcre? ( dev-libs/libpcre2:= )"
+RDEPEND="${DEPEND}
+	!net-ftp/tftp-hpa
+	!net-ftp/uftpd
+	selinux? ( sec-policy/selinux-tftp )"
+BDEPEND="${DEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-0.7.5-CFLAGS.patch"
+	"${FILESDIR}/atftp-fix-test.patch"
+)
+
+src_prepare() {
+	append-cppflags -D_REENTRANT -DRATE_CONTROL
+	# fix #561720 by restoring pre-GCC5 inline semantics
+	append-cflags -std=gnu89
+
+	default
+	eautoreconf
+}
+
+src_configure() {
+	econf \
+		$(use_enable tcpd libwrap) \
+		$(use_enable readline libreadline) \
+		$(use_enable pcre libpcre) \
+		--enable-mtftp
+}
+
+src_install() {
+	default
+
+	newinitd "${FILESDIR}"/atftp.init atftp
+	newconfd "${FILESDIR}"/atftp.confd atftp
+
+	systemd_dounit "${FILESDIR}"/atftp.service
+	systemd_install_serviced "${FILESDIR}"/atftp.service.conf
+
+	dodoc README* BUGS FAQ Changelog INSTALL TODO
+	dodoc "${S}"/docs/*
+
+	docinto test
+	cd "${S}"/test || die
+	dodoc load.sh mtftp.conf pcre_pattern.txt test.sh test_suite.txt
+}

diff --git a/net-ftp/atftp/files/atftp-fix-test.patch b/net-ftp/atftp/files/atftp-fix-test.patch
new file mode 100644
index 000000000000..67845c244a2e
--- /dev/null
+++ b/net-ftp/atftp/files/atftp-fix-test.patch
@@ -0,0 +1,11 @@
+--- a/test/test.sh
++++ b/test/test.sh
+@@ -575,7 +575,7 @@
+     echo
+     ## +3 is for "Test tsize option ..." and "Test PCRE mapped download ... "
+     ## +2 for diskspace tests:
+-    local M=$(grep "/tmp/" "$TDIR"/multicast*.log | wc -l)
++    local M=$(grep "/tmp/" "$TDIR"/multicast*.log 2>/dev/null | wc -l)
+     $INTERACTIVE && D=2
+     cat <<EOF
+ Expected:


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-02 18:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-02 18:13 [gentoo-commits] repo/gentoo:master commit in: net-ftp/atftp/, net-ftp/atftp/files/ Florian Schmaus
  -- strict thread matches above, loose matches on Subject: below --
2021-01-12 11:56 Tobias Klausmann
2020-02-16 12:46 Tobias Klausmann
2019-04-23  8:09 Tobias Klausmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox