summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2013-09-12 19:55:18 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2013-09-12 19:55:18 +0000
commita4972ae85313c90b99fb3e2990a7fe109b614729 (patch)
treecb7e16f75fe93c407a4fe30a972932906ca1c99b /net-ftp/proftpd
parentCorrect LIBLZMA="-lzma" with LIBLZMA="-llzma" (and edit both configure and co... (diff)
downloadhistorical-a4972ae85313c90b99fb3e2990a7fe109b614729.tar.gz
historical-a4972ae85313c90b99fb3e2990a7fe109b614729.tar.bz2
historical-a4972ae85313c90b99fb3e2990a7fe109b614729.zip
Version bump. Added fix for sftp kbdint security issue. Bug #484614 by Agostino Sarubbo.
Package-Manager: portage-2.2.1_p20/cvs/Linux x86_64 Manifest-Sign-Key: 0x611FF3AA
Diffstat (limited to 'net-ftp/proftpd')
-rw-r--r--net-ftp/proftpd/ChangeLog10
-rw-r--r--net-ftp/proftpd/Manifest11
-rw-r--r--net-ftp/proftpd/files/proftpd-1.3.4d-sftp-kbdint-max-responses-bug3973.patch44
-rw-r--r--net-ftp/proftpd/proftpd-1.3.4d.ebuild239
4 files changed, 299 insertions, 5 deletions
diff --git a/net-ftp/proftpd/ChangeLog b/net-ftp/proftpd/ChangeLog
index 71431f6ea790..9a5e3ddbf673 100644
--- a/net-ftp/proftpd/ChangeLog
+++ b/net-ftp/proftpd/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-ftp/proftpd
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/ChangeLog,v 1.305 2013/07/16 08:12:52 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/ChangeLog,v 1.306 2013/09/12 19:55:09 slyfox Exp $
+
+*proftpd-1.3.4d (12 Sep 2013)
+
+ 12 Sep 2013; Sergei Trofimovich <slyfox@gentoo.org>
+ +files/proftpd-1.3.4d-sftp-kbdint-max-responses-bug3973.patch,
+ +proftpd-1.3.4d.ebuild:
+ Version bump. Added fix for sftp kbdint security issue. Bug #484614 by
+ Agostino Sarubbo.
*proftpd-1.3.4c-r2 (16 Jul 2013)
diff --git a/net-ftp/proftpd/Manifest b/net-ftp/proftpd/Manifest
index cf677685ff73..3750aca1dd52 100644
--- a/net-ftp/proftpd/Manifest
+++ b/net-ftp/proftpd/Manifest
@@ -5,6 +5,7 @@ AUX proftpd-1.3.4a-ubug-3682.patch 4244 SHA256 310c18a525b3224edba7f1cfd0364a038
AUX proftpd-1.3.4a-ubug-3728.patch 327 SHA256 f81256fe91be72ee8e96b18f356a55624cc080405f975760a2d17319828791cd SHA512 a3b173c398a3e3dac633488e005d7aab66373c9c0b1c32738a2cf6ef30a94024602bd96bd794036c86f214198a5d4f02f7f8097a13803bc2bc6320c53c14b023 WHIRLPOOL 8c283894f69d5bb24dfa790a232a234eb6dff9ca5e61de835129df83adf57b890e54e2a2c383904ed958656c65464c6f8e23cb3b75a5ab2c53314c116f33ed00
AUX proftpd-1.3.4b-ubug-3795.patch 2768 SHA256 cc5f5175298408fb12de7cf268d8e59a4fa3fe2bc3c798d0f60f8c204e9831d8 SHA512 ed6eb3ed8080275c6b59b8c42dab08d6fa2653b8fd1f336b571429248c1807e95f60fa6ad491c97a689fed26e2c595e00f3a99996b472bf3bd87840fe3936790 WHIRLPOOL 61d8d6ca1aa0496fa0568a89fe2ec8ed64f6221ff14abb969541a6bf2285b2ac79a67c9ce3bf98e167236f38442ed5b6b12b0810fce001b7ec1c050af2649319
AUX proftpd-1.3.4c-fix-build-noipv6.patch 582 SHA256 78aa3e205ca92fa2b97be2fb93d95980e1fec8b435ee858a8abb31435893909c SHA512 5ea38b94cb9f5d1a26f5bb0e3200aa72df7e5542f2041b3a33345918dc6c95859945ab8e80263d369f16f96862dc87b2511dea08080c76c14b68abe84a74bc04 WHIRLPOOL 4497bf1253be9be7663829fb1ab6ea96e45d67228219b7f099659c9f8654c9d37cdd3192d1eadc6f17430c120365375dee9fffbbc4ed6e1a3d8b0cc1e31900b7
+AUX proftpd-1.3.4d-sftp-kbdint-max-responses-bug3973.patch 1492 SHA256 00f90994dc0514d906de68d96cc798a8158ae50a50a4719a6b070de1ef669c42 SHA512 835976728f0a3d72766c8a2da192d009b30ec5f1d6dedb711e985409708275fe250f14cde168017e5c78ed339b028186e5eecf51a6b183dd0ea85294fa609bb3 WHIRLPOOL fae4ff0ec20dcc83c6be7e2eb73d44785ac95cf4bebbec5f91228864ebd744baaecb9c9ab185eab7ac5ecfdbec0f86c073a8e316e5196f0138dd550b4a4ca00a
AUX proftpd-tmpfiles.d.conf 34 SHA256 75288bb0c76392ae10e7ef3ff27e7b665742cdac8ce4c70dff9f29d645d0f0f3 SHA512 aa6ffbf15e4275941837306259fb426608e82e45a2da4b99c5d7778d11b8c9341e3a12ae9b751d0e173635239b6f1b20f0431be17296c005a83525a48327fa52 WHIRLPOOL d3ef47f4e2abc178c2d153599e7b13148345a470c76410b499e41912f9e90a48c1217e7fdee3d6777b1598dd09840f8bffbd208fa9addbeaaaf9c64058d8df93
AUX proftpd.conf.sample 1275 SHA256 a214b3937f319c70976d29cfcd47c2cd937d1d70b7274c2b241b1e97606e89c0 SHA512 1c26f3e98ed07d89192c640f7823af168c045abee6ab076791aee9d50be5446be870a189979df4b828e7ae907dd40a346f1b92998fa39195195bfada4061c5df WHIRLPOOL a9f71cf50926ccdf5fe1116250c29a4048e7eb7fc7eb73732023b7c6e78c56b02356c001c203d9dc8c46f817471116977f76e961a6b2a60c03ae1d4722d9e3e1
AUX proftpd.initd 1544 SHA256 aed3dd4cbbf1db8a1bd0cbadee66a808b430bbbcc436610407a9911df208f668 SHA512 f11ce49440341633ea4287e8887f8127d954207c5c25b0ae08b6ca1b8f42e90e693f657e45abc465c2c86c1b43a04776c9fb68b04c97a5a43fa17a05ff5ef5c6 WHIRLPOOL 0a8fe89a575491954fa177d6db85792eb5b6639abc9fd2c88358c0a7b64dc300602f5b75e4d90ba984e5d21831d2a5c2d39e98230f138cba463f3680eba49948
@@ -17,6 +18,7 @@ DIST proftpd-1.3.3g.tar.bz2 4204504 SHA256 b1104a91e5e4dfafb0aa876492c073cf24b7d
DIST proftpd-1.3.4a.tar.bz2 6805631 SHA256 ad92eec86deccc385ac144e3925f9b9cbe085e60f10b33d1de6da91d32f39f3e SHA512 62090d61b96dab33d44b364e6e4875f890ca0a3cedcbea642ff52c04abfffb35e272d805739191e05eec3c0e9a66f2eb4c92ad7fd5f3bc5509ff33895e368325 WHIRLPOOL f4315a3ae530d098f4115dd1fbe4803cbea3ddedf7e8e1847171dc0a7ca18ede6e303774aa17b347597ded33a742f282e16f3509d8696c69177d37439518b4c5
DIST proftpd-1.3.4b.tar.gz 7647825 SHA256 9f659585cea90fc6af34a0ffae4a90e4ed37abe92dbd9b6c311f95a436c961cb SHA512 12d955db031af66e75ba9685c244b34d2565d2f76ae89ca8e0e2f55feaeaaebee9b6cd59c0665991977f7ae7a383ff91d090c6d4584ae94f2575f919db848d2e WHIRLPOOL 56c834cc31ebce8706b9817f02ffecc174293103772cd947f534329d6ba81abb3184056708ae011361d8e12b52d7fea47d21230f94d0837ae12c977461f2f42d
DIST proftpd-1.3.4c.tar.gz 7689622 SHA256 fb80dd422969b8c900920a30a56f5e272862275d244d3857a980f5f2386ea912 SHA512 8482217075412cc5c578822124f866b0eec502172e49407d962198010a575d914664cb580bc7f2ffa7c4da0d60a4156959135f56f50013543bf00f6cf6fbb7b3 WHIRLPOOL 8f901ba3c01e7a153a5912da460eaa06210c872b8b94db65028995ce7645d68c11265434b78874164292400a5ad782fefd5367c99886a65360788bd218184dcd
+DIST proftpd-1.3.4d.tar.gz 7697046 SHA256 c198b53991ce641eae6b3237e856e59f0bfe8330794145b49cae33f85b6f5370 SHA512 29d6d231a1ac2889dd90f64ab27e1db3e7b28b111f3c935be4611689a3808df15e87092da49ef2adf581e0c8165c0cfd8eb58e88434319286ad91d861c5b0d4d WHIRLPOOL 52fad9428329c38800412a1e9852caa436405904346c5ef04b4078accb4f4f9358e152f1b4d8501f0f3111d2417df100df4c5e87b3113546050d2d6a66c12386
DIST proftpd-mod-case-0.4.tar.gz 4849 SHA256 5c724a2a57a00048529bfab6c5672e16c7c0ecb2eb4e2bedd05bb3a1a5bf97fa SHA512 49440a8015cb30c791245b4369d8f92f6d31c8a6953499c5ae221ffa51f6fa6874fc1c2c1424d223d9c1516a67da2d23e04fa1fb41dea24e91e56038da650a18 WHIRLPOOL 08873392b6f03c240196c9368cf97d2334596a8dbe4f55150532bb3782add0d81848a588e6448ae8346fac8a07b09f31284ebde218bb72e3184a1141fa086eaf
DIST proftpd-mod-case-0.7.tar.gz 13184 SHA256 c3f65588250fea7771439933fa754927794f664e99b8d20f99b1e400fea62111 SHA512 c08d13ef82fec36ae75aa3213dd02e0ce4045904849f422e152f039a9da66a45e4423751074b8bcf8ce347a40ce0e7bde798a85cbadc962fd872aeaa898261fc WHIRLPOOL 27f49e9f34099c081add803aa679fd9abe7afa652dffe5d8e42889fef49aeaefd499e1009fc564d6c8f882b3c6dc31d4c6dd08cc06a42b770e7ef76a2ebfcf8a
DIST proftpd-mod-deflate-0.5.4.tar.gz 55219678 SHA256 6ae753608ad126067bd48da8d4ea6ac3ef8eaf339ae924ffdbe30d1819a5e5db SHA512 54a12759d820fae68f4038c05b7eb8dc0a47bfdab7a6715b37bee8ab82b032b4b929cb604126cdb305f87fc93dbd06730652db5e18d66baaab4c7788181f6dcf WHIRLPOOL ade43782adc25843abfdf61b26008a0af7ffe6d40f1f5887ae5dd2875f2282c67ae11a527e07ed8e53a4b868c71c36de00336a8502cf4afae0c71c259a0c4b03
@@ -30,12 +32,13 @@ EBUILD proftpd-1.3.4b.ebuild 7216 SHA256 f0a8cbd628cec9af0ab06fe50bc568ade35b500
EBUILD proftpd-1.3.4c-r1.ebuild 7550 SHA256 9ee5bde4135f0c2d1de65e8425e7ebd0f127a26800f8876e0bac7b13ec9ab2e4 SHA512 9185b579528c8c0d9ea609ec574065398a9a0dddf4d85da8281da5afd94957fafe9dfc1d52cd7154f16b20990d1db473f7174abb093160056d016ee64e834ff2 WHIRLPOOL 9f8a5bd9a28bda42037d5bdfefc11dc73c33104fd54c83c98018705d473811f48e3b4d9a5fcdb5184387afafde23f76fd5d5f2b76c1c5bc98d7ee51a20e9c63a
EBUILD proftpd-1.3.4c-r2.ebuild 7703 SHA256 f5f2be53b90e50a4cd632e5e7c969b476af9bdae068854b473faf4503d3e178e SHA512 00362d97212c7628a69e05450bbab071da8545be5f6970a20eadb69135a9bd2cc8fc034010ddfd8b8f1bd1431553934d2d13a0a3d9ccb977789e0ba4b672b449 WHIRLPOOL 915d5700a13734d03bf19b7396ea3b61092a6500532515ebf4cd6b691613e7d40cfd3707d83fdc3600d62c39309869c05c07f6de7833d52d32fc2693ee4a83d7
EBUILD proftpd-1.3.4c.ebuild 7301 SHA256 a0480cfd66c9ecd5f6ee8a80ce09db5b67d1328d0d9397c330e76ec9cd3afd25 SHA512 5c69376a4c9f7735b046c3db7c7fa01cc17d8405dbe05fc5ebb709dc834226e69ab599de66ad943ceb6273e68201f69a2a63d99a4cef29c34b7e57f578442f76 WHIRLPOOL 0a1bc3358c59c7661463278d3eef5b6b82cc22ef11f7c603daa02567e65d309e22eaefc3ebdbc11329c7d38e2c9a71dc704f09e9d42c0bb18a21612f1280935e
-MISC ChangeLog 52786 SHA256 c247067989146d7a9c4a97f39bdea102c37a944991cc7063f1827290c1da17aa SHA512 1a244a3af75f37f9a10393a7ad2702dbd9d5d87b2ab73dbf8d4c731fdc7d2f308e42b7b35746aabf2e1b6be8561a22d798380abcc371a126575d8a0e2ee8672c WHIRLPOOL 8f4065263f23c27fea1dc4a5e3f47238d74051eed75a78e0740a52d161872f68c26b428d8f73ccef42aef489e56b1c45a0bf1ce7bac896c28fb76112eb96e1d7
+EBUILD proftpd-1.3.4d.ebuild 7709 SHA256 b30f97b8b756db415dc9c88d757a12fc1e511ca7e504bf99026fd6e103217166 SHA512 1c607eb33f0a10c2e728479fa58b97e5d4c572f6f38968734aba54b5ca42966e62d00d193cb679d9e41c67f104d6c1846e264935a6484dce1297b1e1efae298d WHIRLPOOL 03f8113321ce5d3f534233ccd4582082153f651c13c1bfae5b421eebee315185230c5f2770acb0b0012eea076acb7d9bcf99319c2ec6486ae5f3af22df87ab36
+MISC ChangeLog 53056 SHA256 4ad64e9b79bc80ebbf8c3bed2e9065bff72876a4dfa50faed24b978d210ce86b SHA512 fa9fce281b308f1a0e5de3b7fad1c9cb9bc66a67441e92c57a219ceb0f1a4a4057d2f8f7a7906cc2b47053ed9a4448708a56e13e401d6e78e15f910909a2dcf2 WHIRLPOOL c806b2f9bdc842acc37230d4e4fddf2e9d5b8bef23b6d3d39f7da968c27d6a3fb1190d30276f730197e8e051bf673fd3715ee9fe87a0ea193313db813dbcda0e
MISC metadata.xml 3191 SHA256 66e910e6dc0a9969d60941e120ae3adf75c41dca3548992a56572cd6071e2018 SHA512 efe5b66061928783ba85fd591cc78c32392f78a35cf3478c85e29e9f2851ae1dc13eaf122c9644595ecfb86329a8020867cb6cbee97bb1712f65b4c9c39679c1 WHIRLPOOL 5a8f94671535deb1f6a579af5870672b6f606980bccd1abc2538bd39098b48837252f1bb46176cbb14f3e935df5246a41e897fe8020c9808964e3f557594973c
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
-iEYEAREIAAYFAlHk//IACgkQcaHudmEf86pXJgCfaKcFkj0DpF8Tr1XmINxgOpZO
-kzsAn0YPXa9t0ZOPsyQCex9Ka+xx3M6w
-=Fhup
+iEYEAREIAAYFAlIyGz0ACgkQcaHudmEf86p5dgCfda7so9nmyiKwsj0Gg6YPtYpg
+VTAAoIaR+REy4scUG3VLyjea6Prz/oxL
+=EWwV
-----END PGP SIGNATURE-----
diff --git a/net-ftp/proftpd/files/proftpd-1.3.4d-sftp-kbdint-max-responses-bug3973.patch b/net-ftp/proftpd/files/proftpd-1.3.4d-sftp-kbdint-max-responses-bug3973.patch
new file mode 100644
index 000000000000..bc314b74e2cb
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.4d-sftp-kbdint-max-responses-bug3973.patch
@@ -0,0 +1,44 @@
+Patch picked from upstream bugzilla:
+
+Upstream-bug: http://bugs.proftpd.org/show_bug.cgi?id=3973
+Gentoo-bug: https://bugs.gentoo.org/484614
+Index: contrib/mod_sftp/kbdint.c
+===================================================================
+RCS file: /cvsroot/proftp/proftpd/contrib/mod_sftp/kbdint.c,v
+retrieving revision 1.5
+diff -u -r1.5 kbdint.c
+--- contrib/mod_sftp/kbdint.c 15 Feb 2012 23:50:51 -0000 1.5
++++ contrib/mod_sftp/kbdint.c 12 Sep 2013 16:35:34 -0000
+@@ -31,6 +31,11 @@
+ #include "utf8.h"
+ #include "kbdint.h"
+
++/* The maximum number of keyboard-interactive responses we will handle
++ * from the client.
++ */
++#define SSH2_AUTH_KBDINT_MAX_RESPONSES 500
++
+ struct kbdint_driver {
+ struct kbdint_driver *next, *prev;
+
+@@ -299,6 +304,20 @@
+
+ resp_count = sftp_msg_read_int(pkt->pool, &buf, &buflen);
+
++ /* Impose an upper limit on the number of responses sent by the client,
++ * lest a malicious client attempt to trick us into allocating too
++ * much memory (Bug#3973).
++ */
++ if (resp_count > SSH2_AUTH_KBDINT_MAX_RESPONSES) {
++ (void) pr_log_writefile(sftp_logfd, MOD_SFTP_VERSION,
++ "received response count (%lu) which exceeds max allowed response "
++ "count (%lu), rejecting", (unsigned long) resp_count,
++ (unsigned long) SSH2_AUTH_KBDINT_MAX_RESPONSES);
++ destroy_pool(pkt->pool);
++ errno = EPERM;
++ return -1;
++ }
++
+ list = make_array(p, resp_count, sizeof(char *));
+ for (i = 0; i < resp_count; i++) {
+ char *resp;
diff --git a/net-ftp/proftpd/proftpd-1.3.4d.ebuild b/net-ftp/proftpd/proftpd-1.3.4d.ebuild
new file mode 100644
index 000000000000..c1e0da386864
--- /dev/null
+++ b/net-ftp/proftpd/proftpd-1.3.4d.ebuild
@@ -0,0 +1,239 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/proftpd-1.3.4d.ebuild,v 1.1 2013/09/12 19:55:09 slyfox Exp $
+
+EAPI=5
+inherit eutils multilib systemd
+
+MOD_CASE="0.7"
+MOD_CLAMAV="0.11rc"
+MOD_DISKUSE="0.9"
+MOD_GSS="1.3.3"
+MOD_MSG="0.4.1"
+MOD_VROOT="0.9.3"
+
+DESCRIPTION="An advanced and very configurable FTP server."
+HOMEPAGE="http://www.proftpd.org/
+ http://www.castaglia.org/proftpd/
+ http://www.thrallingpenguin.com/resources/mod_clamav.htm
+ http://gssmod.sourceforge.net/"
+SRC_URI="ftp://ftp.proftpd.org/distrib/source/${P/_/}.tar.gz
+ case? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-case-${MOD_CASE}.tar.gz )
+ clamav? ( https://secure.thrallingpenguin.com/redmine/attachments/download/1/mod_clamav-${MOD_CLAMAV}.tar.gz )
+ diskuse? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-diskuse-${MOD_DISKUSE}.tar.gz )
+ kerberos? ( mirror://sourceforge/gssmod/mod_gss-${MOD_GSS}.tar.gz )
+ msg? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-msg-${MOD_MSG}.tar.gz )
+ vroot? ( https://github.com/Castaglia/${PN}-mod_vroot/archive/mod_vroot-${MOD_VROOT}.tar.gz )"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="acl authfile ban +caps case clamav copy ctrls deflate diskuse doc dso dynmasq exec ifsession ifversion ident ipv6
+ kerberos ldap linguas_bg_BG linguas_en_US linguas_fr_FR linguas_it_IT linguas_ja_JP linguas_ko_KR
+ linguas_ru_RU linguas_zh_CN linguas_zh_TW memcache msg mysql ncurses nls openssl pam +pcre postgres qos radius
+ ratio readme rewrite selinux sftp shaper sitemisc softquota sqlite ssl tcpd test trace vroot xinetd"
+REQUIRED_USE="ban? ( ctrls )
+ msg? ( ctrls )
+ sftp? ( openssl )
+ shaper? ( ctrls )
+ ssl? ( openssl )"
+
+CDEPEND="acl? ( virtual/acl )
+ caps? ( sys-libs/libcap )
+ clamav? ( app-antivirus/clamav )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ memcache? ( >=dev-libs/libmemcached-0.41 )
+ mysql? ( virtual/mysql )
+ nls? ( virtual/libiconv )
+ ncurses? ( sys-libs/ncurses )
+ openssl? ( dev-libs/openssl )
+ pam? ( virtual/pam )
+ pcre? ( dev-libs/libpcre )
+ postgres? ( dev-db/postgresql-base )
+ sqlite? ( dev-db/sqlite:3 )
+ xinetd? ( virtual/inetd )"
+DEPEND="${CDEPEND}
+ test? ( dev-libs/check )"
+RDEPEND="${CDEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )"
+
+S="${WORKDIR}/${P/_/}"
+
+__prepare_module() {
+ local mod_name=$1
+ local mod_topdir=${WORKDIR}/${2:-${mod_name}}
+
+ mv "${mod_topdir}/${mod_name}.c" contrib || die
+ mv "${mod_topdir}/${mod_name}.html" doc/contrib || die
+ rm -r "${mod_topdir}" || die
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-sftp-kbdint-max-responses-bug3973.patch
+
+ # Skip 'install-conf' / Support LINGUAS
+ sed -i -e "/install-all/s/ install-conf//" Makefile.in
+ sed -i -e "s/^LANGS=.*$/LANGS=${LINGUAS}/" locale/Makefile.in
+
+ # Prepare external modules
+ use case && __prepare_module mod_case
+ if use clamav ; then
+ mv "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/mod_clamav.{c,h} contrib
+ epatch "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/${PN}.patch
+ rm -r "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}
+ fi
+ use msg && __prepare_module mod_msg
+ use vroot && __prepare_module mod_vroot ${PN}-mod_vroot-mod_vroot-${MOD_VROOT}
+
+ # Prepare external kerberos module
+ if use kerberos ; then
+ cd "${WORKDIR}"/mod_gss-${MOD_GSS}
+
+ # Support app-crypt/heimdal / Gentoo Bug #284853
+ sed -i -e "s/krb5_principal2principalname/_\0/" mod_auth_gss.c.in
+
+ # Remove obsolete DES / Gentoo Bug #324903
+ # Replace 'rpm' lookups / Gentoo Bug #391021
+ sed -i -e "/ac_gss_libs/s/ -ldes425//" \
+ -e "s/ac_libdir=\`rpm -q -l.*$/ac_libdir=\/usr\/$(get_libdir)\//" \
+ -e "s/ac_includedir=\`rpm -q -l.*$/ac_includedir=\/usr\/include\//" configure{,.in}
+ fi
+}
+
+src_configure() {
+ local c m
+
+ use acl && m="${m}:mod_facl"
+ use ban && m="${m}:mod_ban"
+ use case && m="${m}:mod_case"
+ use clamav && m="${m}:mod_clamav"
+ use copy && m="${m}:mod_copy"
+ use ctrls && m="${m}:mod_ctrls_admin"
+ use deflate && m="${m}:mod_deflate"
+ if use diskuse ; then
+ cd "${WORKDIR}"/mod_diskuse
+ econf
+ mv mod_diskuse.{c,h} "${S}"/contrib
+ mv mod_diskuse.html "${S}"/doc/contrib
+ cd "${S}"
+ rm -r "${WORKDIR}"/mod_diskuse
+ m="${m}:mod_diskuse"
+ fi
+ use dynmasq && mym="${mym}:mod_dynmasq"
+ use exec && m="${m}:mod_exec"
+ use ifsession && m="${m}:mod_ifsession"
+ use ifversion && m="${m}:mod_ifversion"
+ if use kerberos ; then
+ cd "${WORKDIR}"/mod_gss-${MOD_GSS}
+ if has_version app-crypt/mit-krb5 ; then
+ econf --enable-mit
+ else
+ econf --enable-heimdal
+ fi
+ mv mod_{auth_gss,gss}.c "${S}"/contrib
+ mv mod_gss.h "${S}"/include
+ mv README.mod_{auth_gss,gss} "${S}"
+ mv mod_gss.html "${S}"/doc/contrib
+ mv rfc{1509,2228}.txt "${S}"/doc/rfc
+ cd "${S}"
+ rm -r "${WORKDIR}"/mod_gss-${MOD_GSS}
+ m="${m}:mod_gss:mod_auth_gss"
+ fi
+ use ldap && m="${m}:mod_ldap"
+ use msg && mym="${mym}:mod_msg"
+ if use mysql || use postgres || use sqlite ; then
+ m="${m}:mod_sql:mod_sql_passwd"
+ use mysql && m="${m}:mod_sql_mysql"
+ use postgres && m="${m}:mod_sql_postgres"
+ use sqlite && m="${m}:mod_sql_sqlite"
+ fi
+ use qos && m="${m}:mod_qos"
+ use radius && m="${m}:mod_radius"
+ use ratio && m="${m}:mod_ratio"
+ use readme && m="${m}:mod_readme"
+ use rewrite && m="${m}:mod_rewrite"
+ if use sftp ; then
+ m="${m}:mod_sftp"
+ use pam && m="${m}:mod_sftp_pam"
+ use mysql || use postgres || use sqlite && m="${m}:mod_sftp_sql"
+ fi
+ use shaper && m="${m}:mod_shaper"
+ use sitemisc && m="${m}:mod_site_misc"
+ if use softquota ; then
+ m="${m}:mod_quotatab:mod_quotatab_file"
+ use ldap && m="${m}:mod_quotatab_ldap"
+ use radius && m="${m}:mod_quotatab_radius"
+ use mysql || use postgres || use sqlite && m="${m}:mod_quotatab_sql"
+ fi
+ if use ssl ; then
+ m="${m}:mod_tls:mod_tls_shmcache"
+ use memcache && m="${m}:mod_tls_memcache"
+ fi
+ if use tcpd ; then
+ m="${m}:mod_wrap2:mod_wrap2_file"
+ use mysql || use postgres || use sqlite && m="${m}:mod_wrap2_sql"
+ fi
+ use vroot && m="${m}:mod_vroot"
+
+ [ -z ${m} ] || c="${c} --with-modules=${m:1}"
+ econf --localstatedir=/var/run/proftpd --sysconfdir=/etc/proftpd --disable-strip \
+ $(use_enable acl facl) \
+ $(use_enable authfile auth-file) \
+ $(use_enable caps cap) \
+ $(use_enable ctrls) \
+ $(use_enable dso) \
+ $(use_enable ident) \
+ $(use_enable ipv6) \
+ $(use_enable memcache) \
+ $(use_enable ncurses) \
+ $(use_enable nls) \
+ $(use_enable openssl) \
+ $(use_enable pam auth-pam) \
+ $(use_enable pcre) \
+ $(use_enable test tests) \
+ $(use_enable trace) \
+ $(use_enable userland_GNU shadow) \
+ $(use_enable userland_GNU autoshadow) \
+ ${c:1}
+}
+
+src_test() {
+ emake api-tests -C tests
+}
+
+src_install() {
+ default
+ [ -z ${LINGUAS} ] && rm -r "${ED}"/usr/share/locale
+ newinitd "${FILESDIR}"/proftpd.initd proftpd
+ insinto /etc/proftpd
+ doins "${FILESDIR}"/proftpd.conf.sample
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/proftpd.xinetd proftpd
+ fi
+
+ dodoc ChangeLog CREDITS INSTALL NEWS README* RELEASE_NOTES
+ if use doc ; then
+ dohtml doc/*.html doc/contrib/*.html doc/howto/*.html doc/modules/*.html
+ docinto rfc
+ dodoc doc/rfc/*.txt
+ fi
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}-tmpfiles.d.conf ${PN}.conf
+}
+
+pkg_postinst() {
+ if use tcpd ; then
+ ewarn
+ ewarn "Important: Since ProFTPD 1.3.4rc2 the module mod_wrap for TCP Wrapper"
+ ewarn "support has been replaced by mod_wrap2 which is more configurable and"
+ ewarn "portable. But you have to adjust your configuration before restaring"
+ ewarn "ProFTPD. On the following website you can find more information:"
+ ewarn " http://proftpd.org/docs/contrib/mod_wrap2.html"
+ ewarn
+ fi
+}