diff options
author | Ned Ludd <solar@gentoo.org> | 2004-06-22 20:50:07 +0000 |
---|---|---|
committer | Ned Ludd <solar@gentoo.org> | 2004-06-22 20:50:07 +0000 |
commit | 176b5d928744ea2463dd5a6644da59add3d9020b (patch) | |
tree | 15f46322462e29bb5c7a5bca27cf60f65ccf85a4 /net-ftp | |
parent | ~x86 keyword (Manifest recommit) (diff) | |
download | gentoo-2-176b5d928744ea2463dd5a6644da59add3d9020b.tar.gz gentoo-2-176b5d928744ea2463dd5a6644da59add3d9020b.tar.bz2 gentoo-2-176b5d928744ea2463dd5a6644da59add3d9020b.zip |
fix DoS when max connections is reached. secuirty bug #54590
Diffstat (limited to 'net-ftp')
-rw-r--r-- | net-ftp/pure-ftpd/ChangeLog | 8 | ||||
-rw-r--r-- | net-ftp/pure-ftpd/Manifest | 15 | ||||
-rw-r--r-- | net-ftp/pure-ftpd/files/digest-pure-ftpd-1.0.18-r1 | 1 | ||||
-rw-r--r-- | net-ftp/pure-ftpd/files/pure-ftpd-1.0.18-fcntl.patch | 27 | ||||
-rw-r--r-- | net-ftp/pure-ftpd/pure-ftpd-1.0.18-r1.ebuild | 87 |
5 files changed, 131 insertions, 7 deletions
diff --git a/net-ftp/pure-ftpd/ChangeLog b/net-ftp/pure-ftpd/ChangeLog index 3924a831db3d..88d8ae09588f 100644 --- a/net-ftp/pure-ftpd/ChangeLog +++ b/net-ftp/pure-ftpd/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-ftp/pure-ftpd # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-ftp/pure-ftpd/ChangeLog,v 1.27 2004/06/09 22:17:56 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-ftp/pure-ftpd/ChangeLog,v 1.28 2004/06/22 20:50:07 solar Exp $ + +*pure-ftpd-1.0.18-r1 (22 Jun 2004) + + 22 Jun 2004; <solar@gentoo.org> pure-ftpd-1.0.18-r1.ebuild, + files/pure-ftpd-1.0.18-fcntl.patch: + fix DoS when max connections is reached. secuirty bug #54590 09 Jun 2004; Aron Griffis <agriffis@gentoo.org> pure-ftpd-1.0.16b.ebuild, pure-ftpd-1.0.16c.ebuild, pure-ftpd-1.0.17a.ebuild, pure-ftpd-1.0.18.ebuild: diff --git a/net-ftp/pure-ftpd/Manifest b/net-ftp/pure-ftpd/Manifest index 4e39457dca73..f46193a44458 100644 --- a/net-ftp/pure-ftpd/Manifest +++ b/net-ftp/pure-ftpd/Manifest @@ -1,15 +1,18 @@ -MD5 8a4afc19c40a233b1514b8d523e28f4b ChangeLog 4322 -MD5 d0a49f142fe6aa23dfd5278488dba7c7 pure-ftpd-1.0.16c.ebuild 2254 -MD5 13ae66360a5628654de05491b35af724 pure-ftpd-1.0.16b.ebuild 2249 MD5 57798ef308e66b7b342d222bf31118d9 pure-ftpd-1.0.17a.ebuild 2261 +MD5 13ae66360a5628654de05491b35af724 pure-ftpd-1.0.16b.ebuild 2249 +MD5 e0b0b666bc9e11b50cb303644289945b pure-ftpd-1.0.18-r1.ebuild 2408 MD5 610b5681e4ac36d48bb8e41d6ac4c704 pure-ftpd-1.0.18.ebuild 2315 +MD5 d0a49f142fe6aa23dfd5278488dba7c7 pure-ftpd-1.0.16c.ebuild 2254 +MD5 8a4afc19c40a233b1514b8d523e28f4b ChangeLog 4322 MD5 12158b386c76f1fa317b9b474abfb30e metadata.xml 249 -MD5 f1a1d4817df4539dc199812979aac307 files/digest-pure-ftpd-1.0.16c 70 MD5 0e2de54a63d8f1c4a44d15f95e38b044 files/digest-pure-ftpd-1.0.16b 70 +MD5 f1a1d4817df4539dc199812979aac307 files/digest-pure-ftpd-1.0.16c 70 MD5 48f295e6b7a19f3b4da8388a21e2e435 files/digest-pure-ftpd-1.0.17a 70 +MD5 3337c87446dfd6df440449cacecfee17 files/pure-ftpd.rc6 700 MD5 458b5d7567f55f4257ea1a6bfe3ff150 files/ftpusers 177 +MD5 f2a93e08e2a874ad4776e24ab3e0d9a7 files/pure-ftpd-1.0.18-fcntl.patch 1220 MD5 6950e43cd48fea12490706463e0a6f9b files/pure-ftpd.conf_d 2287 -MD5 2ef46b78d137d97c7c2197a32a23047b files/pure-ftpd.rc6 701 +MD5 aae5d284df1fe729a6f3c7a57d9034e8 files/pure-ftpd.rc6-r1 747 MD5 86b7638f0ed01530fff30204ba6b5ce7 files/pure-ftpd.xinetd 238 +MD5 d774a3f199df590cbbaa83ac80dfa93b files/digest-pure-ftpd-1.0.18-r1 69 MD5 d774a3f199df590cbbaa83ac80dfa93b files/digest-pure-ftpd-1.0.18 69 -MD5 f5d5ce92869df4c8c0148634e87487a6 files/pure-ftpd.rc6-r1 748 diff --git a/net-ftp/pure-ftpd/files/digest-pure-ftpd-1.0.18-r1 b/net-ftp/pure-ftpd/files/digest-pure-ftpd-1.0.18-r1 new file mode 100644 index 000000000000..a976b922f91e --- /dev/null +++ b/net-ftp/pure-ftpd/files/digest-pure-ftpd-1.0.18-r1 @@ -0,0 +1 @@ +MD5 56925bb7a35b07ca70e5453af731acba pure-ftpd-1.0.18.tar.bz2 458995 diff --git a/net-ftp/pure-ftpd/files/pure-ftpd-1.0.18-fcntl.patch b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.18-fcntl.patch new file mode 100644 index 000000000000..2fe87d15803f --- /dev/null +++ b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.18-fcntl.patch @@ -0,0 +1,27 @@ +diff -urN pure-ftpd-1.0.18/src/ftpd.c pure-ftpd-1.0.19/src/ftpd.c +--- pure-ftpd-1.0.18/src/ftpd.c 2004-03-02 14:04:21.000000000 -0500 ++++ pure-ftpd-1.0.19/src/ftpd.c 2004-06-20 13:29:56.000000000 -0400 +@@ -4631,13 +4633,14 @@ + if (STORAGE_FAMILY(sa) != AF_INET && STORAGE_FAMILY(sa) != AF_INET6) { + (void) close(clientfd); + return; +- } ++ } + if (maxusers > 0U && nb_children >= maxusers) { + char line[1024]; + + snprintf(line, sizeof line, "421 " MSG_MAX_USERS "\r\n", + (unsigned long) maxusers); + /* No need to check a return value to say 'fuck' */ ++ (void) fcntl(clientfd, F_SETFL, fcntl(clientfd, F_GETFL) | O_NONBLOCK); + (void) write(clientfd, line, strlen(line)); + (void) close(clientfd); + return; +@@ -4649,6 +4652,7 @@ + char hbuf[NI_MAXHOST]; + static struct sockaddr_storage old_sa; + ++ (void) fcntl(clientfd, F_SETFL, fcntl(clientfd, F_GETFL) | O_NONBLOCK); + if (!SNCHECK(snprintf(line, sizeof line, + "421 " MSG_MAX_USERS_IP "\r\n", + (unsigned long) maxip), sizeof line)) { diff --git a/net-ftp/pure-ftpd/pure-ftpd-1.0.18-r1.ebuild b/net-ftp/pure-ftpd/pure-ftpd-1.0.18-r1.ebuild new file mode 100644 index 000000000000..b662084a2567 --- /dev/null +++ b/net-ftp/pure-ftpd/pure-ftpd-1.0.18-r1.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-ftp/pure-ftpd/pure-ftpd-1.0.18-r1.ebuild,v 1.1 2004/06/22 20:50:07 solar Exp $ + +inherit eutils + +IUSE="pam mysql postgres ldap ssl" + +DESCRIPTION="Pure-FTPd is a fast, production-quality, standard-conformant FTP server" +SRC_URI="ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/${P}.tar.bz2" +HOMEPAGE="http://www.pureftpd.org/" + +SLOT="0" +LICENSE="BSD" # Changed from GPL-2 to BSD 06/09/2003 +KEYWORDS="~x86 ~ppc ~sparc alpha ~hppa ~amd64 ia64" + +DEPEND="virtual/glibc + pam? ( >=sys-libs/pam-0.75 ) + mysql? ( >=dev-db/mysql-3* ) + postgres? ( >=dev-db/postgresql-7.2.2 ) + ldap? ( >=net-nds/openldap-2.0.25 ) + ssl? ( >=dev-libs/openssl-0.9.6g )" + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${P}-fcntl.patch +} + +src_compile() { + local myconf="" + + use pam && myconf="${myconf} --with-pam" + use ldap && myconf="${myconf} --with-ldap" + use mysql && myconf="${myconf} --with-mysql" + use postgres && myconf="${myconf} --with-pgsql" + use ssl && myconf="${myconf} --with-tls" + + econf \ + --with-altlog --with-extauth \ + --with-puredb --with-cookie \ + --with-throttling --with-ratios \ + --with-quotas --with-ftpwho \ + --with-uploadscript --with-virtualhosts \ + --with-virtualchroot --with-diraliases \ + --with-peruserlimits --with-largefile \ + ${myconf} || die "econf failed" + + emake || die "compile problem" +} + +src_install() { + einstall + + dodoc AUTHORS CONTACT COPYING ChangeLog FAQ HISTORY INSTALL README* NEWS + + use pam && cp ${FILESDIR}/ftpusers ${D}/etc/ftpusers + use pam && insinto /etc/pam.d && doins pam/pure-ftpd + + dodir /etc/{conf.d,init.d} + + cp ${FILESDIR}/pure-ftpd.conf_d ${D}/etc/conf.d/pure-ftpd + + exeopts -m 0744 + exeinto /etc/init.d + newexe ${FILESDIR}/pure-ftpd.rc6-r1 pure-ftpd + + insopts -m 0644 + insinto /etc/xinetd.d + newins ${FILESDIR}/pure-ftpd.xinetd pure-ftpd + + if use ldap; then + dodir /etc/openldap/schema + insinto /etc/openldap/schema + doins pureftpd.schema + insinto /etc/openldap + doins pureftpd-ldap.conf + fi +} + +pkg_postinst() { + einfo "Before starting Pure-FTPd, you have to edit the /etc/conf.d/pure-ftpd file." + echo + ewarn "It's *really* important to read the README provided with Pure-FTPd." + ewarn "Check out - http://www.pureftpd.org/README" + ewarn "And for SSL/TLS help - http://www.pureftpd.org/README.TLS" +} |