diff options
author | Mike Frysinger <vapier@gentoo.org> | 2014-04-07 12:32:25 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2014-04-07 12:32:25 +0000 |
commit | 906814316e7c7461277aa0e18979f0d1c2fb6142 (patch) | |
tree | c5dc847ed12c74ec2461a239295efc733a119f38 /net-ftp/oftpd | |
parent | old (diff) | |
download | gentoo-2-906814316e7c7461277aa0e18979f0d1c2fb6142.tar.gz gentoo-2-906814316e7c7461277aa0e18979f0d1c2fb6142.tar.bz2 gentoo-2-906814316e7c7461277aa0e18979f0d1c2fb6142.zip |
Fix timeout crashes and error message. Add a note about passive behavior and default network settings.
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Diffstat (limited to 'net-ftp/oftpd')
-rw-r--r-- | net-ftp/oftpd/ChangeLog | 11 | ||||
-rw-r--r-- | net-ftp/oftpd/files/conf.d.oftpd-r7 | 6 | ||||
-rw-r--r-- | net-ftp/oftpd/files/oftpd-0.3.7-error-output.patch | 20 | ||||
-rw-r--r-- | net-ftp/oftpd/files/oftpd-0.3.7-pthread-cancel.patch | 17 | ||||
-rw-r--r-- | net-ftp/oftpd/oftpd-0.3.7-r10.ebuild | 52 |
5 files changed, 105 insertions, 1 deletions
diff --git a/net-ftp/oftpd/ChangeLog b/net-ftp/oftpd/ChangeLog index e3ebe0385de2..ec8eefea2356 100644 --- a/net-ftp/oftpd/ChangeLog +++ b/net-ftp/oftpd/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-ftp/oftpd # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-ftp/oftpd/ChangeLog,v 1.40 2014/03/29 20:58:11 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-ftp/oftpd/ChangeLog,v 1.41 2014/04/07 12:32:25 vapier Exp $ + +*oftpd-0.3.7-r10 (07 Apr 2014) + + 07 Apr 2014; Mike Frysinger <vapier@gentoo.org> + +files/oftpd-0.3.7-error-output.patch, + +files/oftpd-0.3.7-pthread-cancel.patch, +oftpd-0.3.7-r10.ebuild, + files/conf.d.oftpd-r7: + Fix timeout crashes and error message. Add a note about passive behavior and + default network settings. *oftpd-0.3.7-r9 (29 Mar 2014) diff --git a/net-ftp/oftpd/files/conf.d.oftpd-r7 b/net-ftp/oftpd/files/conf.d.oftpd-r7 index bc9208386ccc..a8daed0f4f53 100644 --- a/net-ftp/oftpd/files/conf.d.oftpd-r7 +++ b/net-ftp/oftpd/files/conf.d.oftpd-r7 @@ -17,4 +17,10 @@ FTPROOT=/home/ftp FTPPORT=21 ## Uncoment this line to activate oftpd service +# Note: in order for passive connections to work, you must specify an IP address +# here with the -i flag. You can make it listen to all IPv4 addresses: +# -i 0.0.0.0 +# or make it listen to all IPv6 addresses: +# -i ::1 +# By default, oftpd listens to all IPv4/IPv6 addresses, but passive mode fails. #OFTPD_OPTS="-p ${FTPPORT} ${FTPUSER} ${FTPROOT}" diff --git a/net-ftp/oftpd/files/oftpd-0.3.7-error-output.patch b/net-ftp/oftpd/files/oftpd-0.3.7-error-output.patch new file mode 100644 index 000000000000..ab62220b553e --- /dev/null +++ b/net-ftp/oftpd/files/oftpd-0.3.7-error-output.patch @@ -0,0 +1,20 @@ +fix writing of the error message to stderr by processing the varargs + +--- a/src/error.c ++++ b/src/error.c +@@ -23,7 +23,6 @@ void error_init(error_t *err, int error_code, const char *desc_fmt, ...) + { + va_list args; + +- fprintf(stderr, "error_init: %d %s", error_code, desc_fmt); + daemon_assert(err != NULL); + daemon_assert(error_code >= 0); + daemon_assert(desc_fmt != NULL); +@@ -32,6 +31,7 @@ void error_init(error_t *err, int error_code, const char *desc_fmt, ...) + va_start(args, desc_fmt); + vsnprintf(err->desc, sizeof(err->desc), desc_fmt, args); + va_end(args); ++ fprintf(stderr, "error_init: %d %s\n", error_code, err->desc); + + daemon_assert(invariant(err)); + } diff --git a/net-ftp/oftpd/files/oftpd-0.3.7-pthread-cancel.patch b/net-ftp/oftpd/files/oftpd-0.3.7-pthread-cancel.patch new file mode 100644 index 000000000000..586885c3c08c --- /dev/null +++ b/net-ftp/oftpd/files/oftpd-0.3.7-pthread-cancel.patch @@ -0,0 +1,17 @@ +in order for pthread_cancel to work (which oftpd uses to close inactive +connections), most ports need to load libgcc_s.so.1. but when oftpd uses +a chroot, that file is no longer available (in fact, it'll try to load it +from the chroot itself which is kind of a security issue). so have the +code proactively link against libgcc_s when it is found so that the lib +is already loaded when we cancel. + +--- a/configure.in ++++ b/configure.in +@@ -39,6 +39,7 @@ AC_FUNC_STRFTIME + AC_CHECK_FUNCS(getcwd gettimeofday select socket strerror localtime_r gmtime_r) + dnl AC_CHECK_LIB(pthread, pthread_create) + dnl AC_SEARCH_LIBS(pthread_create, [ pthread pthreads thread threads ]) ++AC_CHECK_LIB(gcc_s, _Unwind_Resume) + AC_SEARCH_LIBS(socket, socket) + AC_SEARCH_LIBS(inet_ntoa, nsl) + AC_CHECK_FUNCS(inet_aton) diff --git a/net-ftp/oftpd/oftpd-0.3.7-r10.ebuild b/net-ftp/oftpd/oftpd-0.3.7-r10.ebuild new file mode 100644 index 000000000000..2182c93a6f9a --- /dev/null +++ b/net-ftp/oftpd/oftpd-0.3.7-r10.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-ftp/oftpd/oftpd-0.3.7-r10.ebuild,v 1.1 2014/04/07 12:32:25 vapier Exp $ + +EAPI=4 + +inherit autotools eutils + +DESCRIPTION="Secure, small, anonymous only ftpd" +HOMEPAGE="http://www.time-travellers.org/oftpd" +SRC_URI="http://www.time-travellers.org/oftpd/${P}.tar.gz + ftp://ftp.deepspace6.net/pub/ds6/sources/${PN}/${PN}-0.3.6-ipv6rel2.patch.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sh ~sparc ~x86" +IUSE="ipv6" + +DEPEND="net-ftp/ftpbase" +RDEPEND="${DEPEND}" + +src_prepare() { + cd "${WORKDIR}" || die + epatch "${FILESDIR}"/oftpd-0.3.7-ipv6rel2-0.3.6-to-0.3.7.patch + + cd "${S}" || die + epatch "${WORKDIR}"/${PN}-0.3.6-ipv6rel2.patch + epatch "${FILESDIR}"/${PN}-0.3.7-delay-root-check.patch + epatch "${FILESDIR}"/${PN}-0.3.7-error-output.patch + epatch "${FILESDIR}"/${PN}-0.3.7-pthread-cancel.patch + + # Don't crash when using an unsupported address family, #159178. + # updated in bug #157005 + epatch "${FILESDIR}"/${P}-family-1.patch + + # htons patch #371963 + epatch "${FILESDIR}"/${P}-htons.patch + + epatch "${FILESDIR}"/${P}-unistd.patch + eautoreconf +} + +src_configure() { + econf --bindir=/usr/sbin $(use_enable ipv6) +} + +src_install() { + default + keepdir /home/ftp + newinitd "${FILESDIR}"/init.d.oftpd-r7 oftpd + newconfd "${FILESDIR}"/conf.d.oftpd-r7 oftpd +} |