summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEray Aslan <eras@gentoo.org>2014-05-15 05:45:43 +0000
committerEray Aslan <eras@gentoo.org>2014-05-15 05:45:43 +0000
commit8a94824af1e43ec89c062ab916cf9bf8ea0e4161 (patch)
tree4632a4eda1fdcc697db4b44fe1d9b0cf8fabe358 /dev-libs/cyrus-sasl
parentVersion bump. (diff)
downloadhistorical-8a94824af1e43ec89c062ab916cf9bf8ea0e4161.tar.gz
historical-8a94824af1e43ec89c062ab916cf9bf8ea0e4161.tar.bz2
historical-8a94824af1e43ec89c062ab916cf9bf8ea0e4161.zip
Fix authentication loop - bug #510320
Package-Manager: portage-2.2.10/cvs/Linux x86_64 Manifest-Sign-Key: 0x77F1F175586A3B1F
Diffstat (limited to 'dev-libs/cyrus-sasl')
-rw-r--r--dev-libs/cyrus-sasl/ChangeLog8
-rw-r--r--dev-libs/cyrus-sasl/Manifest24
-rw-r--r--dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r5.ebuild227
-rw-r--r--dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-fix_dovecot_authentication.patch90
4 files changed, 347 insertions, 2 deletions
diff --git a/dev-libs/cyrus-sasl/ChangeLog b/dev-libs/cyrus-sasl/ChangeLog
index 91281a93490f..c9b24ec5bac9 100644
--- a/dev-libs/cyrus-sasl/ChangeLog
+++ b/dev-libs/cyrus-sasl/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-libs/cyrus-sasl
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/ChangeLog,v 1.297 2014/02/24 05:29:54 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/ChangeLog,v 1.298 2014/05/15 05:45:32 eras Exp $
+
+*cyrus-sasl-2.1.26-r5 (15 May 2014)
+
+ 15 May 2014; Eray Aslan <eras@gentoo.org> +cyrus-sasl-2.1.26-r5.ebuild,
+ +files/cyrus-sasl-2.1.26-fix_dovecot_authentication.patch:
+ Fix authentication loop - bug #510320
*cyrus-sasl-2.1.26-r4 (24 Feb 2014)
diff --git a/dev-libs/cyrus-sasl/Manifest b/dev-libs/cyrus-sasl/Manifest
index 69987d667d54..dcfce5c1bcee 100644
--- a/dev-libs/cyrus-sasl/Manifest
+++ b/dev-libs/cyrus-sasl/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
AUX cyrus-sasl-0001_versioned_symbols.patch 914 SHA256 d64669070f4d19d884eaeb7d2b3b66987a714c2dda462bbbc4bcf452b705c3e0 SHA512 83329417818f1a33fb013090024e15786dadfc0fc865e2c6f09addbf8ba51519f171f8d583cd558b2ec98c2ece112a5427f8a6b02b74246cc948fe196a38681c WHIRLPOOL acb76440be9cbbb671d686080ec9478c70773c7a84526f2f1ea8bf4b994b51bb8c32830ba12c4e8c8dcfc973e17a00b847e7f67c39f639c1b1ad825612c989bc
AUX cyrus-sasl-0002_testsuite.patch 1055 SHA256 d7fff57482c2a9b148296ec680327d0cbd5254ed0a0bc99f46e2dc73758a6abc SHA512 a7ea09cfb76b4c99ca8b1316c547e6168108e11495368453fbc4e4842306727c2e1aafe9d959d195d6eb5262b5e1f91668fc7ac1d24dc6b15149ae162288994e WHIRLPOOL 5b71f60005aeeea61ad403f8a7c8c8379348f22a16780a2ef35fb092ed265191638e859c9faf576e7e06dafe8357960db0b8ba8ff8d8a940731eb8de41f81a2e
AUX cyrus-sasl-0006_library_mutexes.patch 805 SHA256 c1b955a6e9873284d27a1df62cc8952d5dbca0ea729ba326aa6f8b4ed1a96c6e SHA512 cc1783f97c65a309a11ea91ddb6f4db06590af6a987acd333dbad2da880db36b8401213e8e2cbfdb48bec021ba204f63ac0ffbea7d4dd1fdfe65d1212a062963 WHIRLPOOL 3f9876cc765d5fbce3da495135bf745c6ef6f661088635d7f2f13e60e0f276d52d65bf9ca22cfb640b5bda5d7f93244c13556524056530007aa23e5f4f3a0706
@@ -35,6 +38,7 @@ AUX cyrus-sasl-2.1.25-sasldb_al.patch 555 SHA256 3885246eda016e7a6d273305b2a0117
AUX cyrus-sasl-2.1.25-service_keytabs.patch 932 SHA256 6b60574c65fffd802d19b409fe9a4b043614261e59051b7b9cf51380e08cd8f3 SHA512 bd5ceebfe1b8f72d275db487a6f11bbb8e6f20f3b44c05040fd9d0bb5c72e656f2c8f22924fecaa9c268e50d54d272f25f4a5a3b72ca49d1c23ef9f178d00733 WHIRLPOOL 7b3ab47b4af7425ed619c4c6336feb74d45ab9e52d102995d13c6b013cab4c1bf2804ace0b9714066eeec8b105d09e1c267405581ae10361afd7d8762f702a3f
AUX cyrus-sasl-2.1.26-CVE-2013-4122.patch 3838 SHA256 39c3c404d6fc0da79c51157c6a3c05aeb9117cf5df87615d6a8f8086056bf94e SHA512 3df09f16dc2f4efc601339743eb6e66087977fae4e174aa82c4abb7f85a77aa9eb98629837079236446ef3b494fb48931c9dc8850362a49615749e162b4699c8 WHIRLPOOL 68a61bd075006bdde0fc7982694f8a413c4f21522b6a3a38af345c0d94e96294eb31d2f8ce05eb30ca8d228327f69bfc55f91be43f9eb1484989de4ee7aedc53
AUX cyrus-sasl-2.1.26-canonuser-ldapdb-garbage-in-out-buffer.patch 284 SHA256 334c3a2c7f409707026136ef595845f61e971e369035c3b5e3bf284f1e7e6e1d SHA512 f3b789b7dea3f6a51fca6fd1877c81b5f5a3be342fa5c90ddae98a822e0c2a71e8fa582c6cb60c696363aa5cb99db8609cd6b3a91c5d402a0ad1e6124c726f5f WHIRLPOOL 70fb8cbddf81c3dc631c0b9df72d3255590d20ae5d7d1d0ed6ca70548aaef3c48444703821c2a5ccc3b7fec5592584bc843fe5284fa1b0ef40a3446727e0f6eb
+AUX cyrus-sasl-2.1.26-fix_dovecot_authentication.patch 2603 SHA256 3edf79a6b1a03c87bef8b41f858ffe32c778288cd22ffc05460c3b8ad2f6393c SHA512 4244015451dfd41443a0cf8b56ae19a1dfb550e374fcdc37dc091a54f73ab36818c25fe96f7837e3ddfe5c7952d309a5b51bedfe0b7c7f1dec8ecf15f067acda WHIRLPOOL da1a5afb7a17e0eb3e7ca7586769a766b994794d3c24a21a88c895b17b0685a06287186b3bba6cce2daf0216ee91c89f79770f205eaa6b7ba844ade263ea134b
AUX cyrus-sasl-2.1.26-missing-size_t.patch 348 SHA256 1821e0f511a3eab2cbefba36b6538a997afad2a4892d1fcbf22847d34e06711e SHA512 026183880caa504af9dda5fb93a6f47a159c7ab6af79463bc512709681dd260489411b8b8da78a9f8cd260b77ae5d1977854a39de80bc48f3a03e3ffa1b09fb2 WHIRLPOOL c71d5e4919577b6c23b1610c3fa695ad035befa9cc1de43867c9e9c17016f681854e734275241dab60271d3bc7198fd633b079ab6f53e6b8bc8ce4c513eff6bd
AUX cyrus-sasl-2.1.26-send-imap-logout.patch 1897 SHA256 3af4cd230e7a0374a2b581f42372d157ac2e69562e6d7f93be08d26fc6ec6d98 SHA512 076d86d4a3fe0fe94c0b6a112cfeb7e8a5f7cc5172830b4f88b2e5bbb1dbbee186933191736497b269b312a9770b6fa4ab831b3f41f447836d7637541dacc173 WHIRLPOOL 5f36da99554ef1d944a7d2e84f44f499f2fd7f169ae09a0418f5e39d59aae675c765a105d3e31293d345229756c6273242aefc4764d813edc1d884f9a1dfa4bf
AUX cyrus-sasl.conf 34 SHA256 1d246914153ca86390e7c39aaa9494ce1175d783d3292a8cc5a2d867b816fb7b SHA512 67b9bb97191d091ffc2b8f450ad88a558df304a29651a9a49407c50df0a316666a96e7d1a2ca3ac8ee5e60a58a5d5b618ce963661f4f45049dc6b3ef2cf8099e WHIRLPOOL 671625830fc9df9b44fff4d7fe16a7d7e76c42e8c1cf75cc7a725586aad3f80b98aa5a07ae5dea848833aed6aa02294c2a7b9969f1e708dd6854370a62c5cd23
@@ -53,5 +57,23 @@ DIST cyrus-sasl-2.1.26.tar.gz 5220231 SHA256 8fbc5136512b59bb793657f36fadda6359c
EBUILD cyrus-sasl-2.1.23-r7.ebuild 9000 SHA256 fdb90f669d149cb2c6bf89ed8a1c337039aeffbc7cec1f54fade36ff715a69d0 SHA512 f18cb8c1a5dbc01e4d6560f668eea85e267cd5f62effc41d26c1cb9fdfd94a4e854f5923a4b84c5c8954a0ba32fff09c5696b1b729233035d1c9ffd6e9996197 WHIRLPOOL 6b7e81302fdfcec78f7285b9ce67cb580aea7c300b1586b0986d22a23c9565509055f3104ebc49891e6ecca27a3232a9046ddad400fffe8e60ea0ffa57f8be0e
EBUILD cyrus-sasl-2.1.26-r3.ebuild 7244 SHA256 f4d4a688a48092cd723490c1064d6f45d47300b615ba18019552a198f05cbfd7 SHA512 e6b2149ac6f78886a9e6f97e9bd8d13b18d79ab7b07a2fa05933d9b6a172fe6ecaad5e3ba837f84e310a2ed45c52cf659f923184b400f4232480fec9c1e27dac WHIRLPOOL 60a34f2bc44da24cd136835eef4009328449074a2f7ec90ce2bcc54f49640fd31662b033d84ba4bb56c8a65105fab32b77c8f102f04fe7c6b2ca317e78419e90
EBUILD cyrus-sasl-2.1.26-r4.ebuild 7306 SHA256 7b620becb18c820c926ca413dc42fd787397e949cb6c56b9a5e102e0ef875a44 SHA512 56a2941b39d3c9df5e6bb464f71f6af543cab8721938876b20da68b5fbe69e7ce509a944b6072c9e705f9f4e9d305149799a7a02a5c6379deb773338ef983118 WHIRLPOOL 22c1e5af4abfd1bdb16f4a469f4f0a1797840195d677cc6edf5eb4337d1d86b02365dceb13b156ccf64d6673181e286e65435c8336965feba7e7a3ff362b4553
-MISC ChangeLog 48628 SHA256 cd724802516b03e0d3eb55b00b29499ae8bd7dbc2f89ce53b17fd81c18001e72 SHA512 b89c26055954ecbc11211fc20bbe667a55afd5b0ee4d6c7dfbf14ec445bacf17ad06049c3bd5a230d4e5a518b2ff8da47fa06263608688e81265f1b121595a32 WHIRLPOOL d5eb6cad6bda5fc5341fb0ba18de0ad34b1e80967de87d87e3c3bf7dfa987e53b57d94c78f70ae8d2708da7c05763d17be88a4ef5df4941104db90d053396400
+EBUILD cyrus-sasl-2.1.26-r5.ebuild 7242 SHA256 d117d25a761eae7d9ea567b0493245461be6ab58317ffc94c193ba4359ba689c SHA512 004aae190a75e049bc02660395bd94f793608d8d1d1eea41efc790796b86e0cb31c8f3608e731a9a4340b2f3aec69fe3c341b00d376a14c754df2935acca6a5a WHIRLPOOL 0f7b4acb1d123bbcf4d5847eea1e3d4e88be57940f6f88437ab15ff8ba3be563d2d7b319d15627fe2ef2beaa88d825249e2816445d308ef33d2d149af33666ad
+MISC ChangeLog 48838 SHA256 f84d17079b1f3d63939e4171151f9d41772136b8fe04bf1db9610cb661608bf6 SHA512 dda739b991c2ac32f7fbfeddc6320e71cc98aa7edac866458077c8f4fa89ad2e062de6e14ef37d563c3aacf5c5bd7eab4d0e7834a4ffee6e9c66da4df0e6ebe6 WHIRLPOOL 6f9ecd72a79de9c05586179e03464f68a42a912712294446d9273c7bdd4d0fd409b082b9034c4f0d0c8b2127153f1bf150ad6696f7255d8f06867805a2d306a9
MISC metadata.xml 727 SHA256 6b9f368b484972e833084dba4aedf70c09767b816b57cb43a7c0945b8b11b497 SHA512 8b6c6556dd9adff73a6f0bc40fd8064cae8ce8b45734ab0a30b7611be9f226144403fa0dbcf6d3965bd03e12b7c36848c91937bd8133a5581bd296d741a013c7 WHIRLPOOL 5e24419ac72d0ef8591de06c7ab4d95435234e8d894ee31b2015e6465d15a777919c714aae4e3293e194ccfcb505cf0d77f2565959d5e9ecf41c1cbb7b9ff1c5
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.22 (GNU/Linux)
+
+iQIcBAEBCAAGBQJTdFSGAAoJEHfx8XVYajsf3VwQAK/5s4ZDBP1WReEMi/daFwgp
+juLQyO8nSDvGgzEkGebSovxX/NVfO0hMSudwLc1J6PAnWFpPFFyt21YNhwzMjIJL
+3wHQ7p0IN0u2pbS0jRtMF8oDnpG70n2FSbBEZkZdjt/6k5Eo7bPH6upc8No/sCKQ
+UP9p5hFM6O3hxm+pX0gvXniH46WWu4dd50CCcsUlqK4JHE7Io37mg2a4KADD9e7Z
+b4SvSPCBK/hWNSd8NofukqvJYvcWLu6RnqUeexV99fld3XkPW8MWxuVcsvuPOyOY
+X8TKGI6KOgcMVTNOt7mW8+C/+ePGAiPUKf7OT1J4V/9ViLmE4ZFybSqSADBDu54i
+ixhMyD3Ab1K+2mwy/Yc5JzR0pOmVvq7WRcFhEUqh3BQEtqy7IKx5sHo8Xi9Ub70D
+LJZHrgpqjTdyCA9vz9V11S5tPbUTgLyDY8A2GVasuRiA9DCbBLeIWf7jKfQlElQ1
+daeko2QZK8TVTj98IiFmrtK4CHJEOyYKSfKPlAIuSB0wOjtVV/kF+3zVidXs4Ez8
+4h1gNR8hdjEHNeXDmPHvlpEGHixka1hGN/t/hXN0jrwogs5eIN5AKkdfgwrH3s43
+OlcVBLr3rlXU0Z8d3M//l5XxILtaCJBJPtgLFte9qVpGwM0fOer0H2knI1GrKDNb
+sDEFk1TD9jTOmqRnvCq4
+=IiYI
+-----END PGP SIGNATURE-----
diff --git a/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r5.ebuild b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r5.ebuild
new file mode 100644
index 000000000000..a0a5393a1b5d
--- /dev/null
+++ b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r5.ebuild
@@ -0,0 +1,227 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r5.ebuild,v 1.1 2014/05/15 05:45:32 eras Exp $
+
+EAPI=5
+
+inherit eutils flag-o-matic multilib autotools pam java-pkg-opt-2 db-use systemd
+
+SASLAUTHD_CONF_VER="2.1.26"
+
+DESCRIPTION="The Cyrus SASL (Simple Authentication and Security Layer)."
+HOMEPAGE="http://cyrusimap.web.cmu.edu/"
+SRC_URI="ftp://ftp.cyrusimap.org/cyrus-sasl/${P}.tar.gz"
+
+LICENSE="BSD-with-attribution"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="authdaemond berkdb gdbm kerberos ldapdb openldap mysql pam postgres sample sqlite
+srp ssl static-libs urandom"
+
+DEPEND="net-mail/mailbase
+ authdaemond? ( || ( net-mail/courier-imap mail-mta/courier ) )
+ berkdb? ( >=sys-libs/db-3.2 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ kerberos? ( virtual/krb5 )
+ openldap? ( net-nds/openldap )
+ mysql? ( virtual/mysql )
+ pam? ( virtual/pam )
+ postgres? ( dev-db/postgresql-base )
+ sqlite? ( dev-db/sqlite:3 )
+ ssl? ( dev-libs/openssl )
+ java? ( >=virtual/jdk-1.4 )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.1.25-sasldb_al.patch
+ epatch "${FILESDIR}"/${PN}-2.1.25-saslauthd_libtool.patch
+ epatch "${FILESDIR}"/${PN}-2.1.25-avoid_pic_overwrite.patch
+ epatch "${FILESDIR}"/${PN}-2.1.25-autotools_fixes.patch
+ epatch "${FILESDIR}"/${PN}-2.1.25-as_needed.patch
+ epatch "${FILESDIR}"/${PN}-2.1.25-missing_header.patch
+ epatch "${FILESDIR}"/${PN}-2.1.25-fix_heimdal.patch
+ epatch "${FILESDIR}"/${PN}-2.1.25-auxprop.patch
+ epatch "${FILESDIR}"/${PN}-2.1.23-gss_c_nt_hostbased_service.patch
+ epatch "${FILESDIR}"/${PN}-2.1.25-service_keytabs.patch
+ epatch "${FILESDIR}"/${PN}-2.1.26-missing-size_t.patch
+ epatch "${FILESDIR}"/${PN}-2.1.26-CVE-2013-4122.patch
+ epatch "${FILESDIR}"/${PN}-2.1.26-send-imap-logout.patch
+ epatch "${FILESDIR}"/${PN}-2.1.26-canonuser-ldapdb-garbage-in-out-buffer.patch
+ epatch "${FILESDIR}"/${PN}-2.1.26-fix_dovecot_authentication.patch
+
+ # Get rid of the -R switch (runpath_switch for Sun)
+ # >=gcc-4.6 errors out with unknown option
+ sed -i -e '/LIB_SQLITE.*-R/s/ -R[^"]*//' \
+ configure.in || die
+
+ # Use plugindir for sasldir
+ sed -i '/^sasldir =/s:=.*:= $(plugindir):' \
+ "${S}"/plugins/Makefile.{am,in} || die "sed failed"
+
+ # #486740 #468556
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' \
+ -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' \
+ configure.in || die
+ sed -i -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' \
+ saslauthd/configure.in || die
+
+ eautoreconf
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ append-cppflags -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -DLDAP_DEPRECATED
+
+ # Java support.
+ use java && export JAVAC="${JAVAC} ${JAVACFLAGS}"
+
+ local myconf
+
+ # Add authdaemond support (bug #56523).
+ if use authdaemond ; then
+ myconf="${myconf} --with-authdaemond=/var/lib/courier/authdaemon/socket"
+ fi
+
+ # Fix for bug #59634.
+ if ! use ssl ; then
+ myconf="${myconf} --without-des"
+ fi
+
+ if use mysql || use postgres || use sqlite ; then
+ myconf="${myconf} --enable-sql"
+ else
+ myconf="${myconf} --disable-sql"
+ fi
+
+ # Default to GDBM if both 'gdbm' and 'berkdb' are present.
+ if use gdbm ; then
+ einfo "Building with GNU DB as database backend for your SASLdb"
+ myconf="${myconf} --with-dblib=gdbm"
+ elif use berkdb ; then
+ einfo "Building with BerkeleyDB as database backend for your SASLdb"
+ myconf="${myconf} --with-dblib=berkeley --with-bdb-incdir=$(db_includedir)"
+ else
+ einfo "Building without SASLdb support"
+ myconf="${myconf} --with-dblib=none"
+ fi
+
+ # Use /dev/urandom instead of /dev/random (bug #46038).
+ if use urandom ; then
+ myconf="${myconf} --with-devrandom=/dev/urandom"
+ fi
+
+ econf \
+ --enable-login \
+ --enable-ntlm \
+ --enable-auth-sasldb \
+ --disable-cmulocal \
+ --disable-krb4 \
+ --enable-otp \
+ --without-sqlite \
+ --with-saslauthd=/run/saslauthd \
+ --with-pwcheck=/run/saslauthd \
+ --with-configdir=/etc/sasl2 \
+ --with-plugindir=/usr/$(get_libdir)/sasl2 \
+ --with-dbpath=/etc/sasl2/sasldb2 \
+ $(use_with ssl openssl) \
+ $(use_with pam) \
+ $(use_with openldap ldap) \
+ $(use_enable ldapdb) \
+ $(use_enable sample) \
+ $(use_enable kerberos gssapi) \
+ $(use_enable java) \
+ $(use_with java javahome ${JAVA_HOME}) \
+ $(use_with mysql) \
+ $(use_with postgres pgsql) \
+ $(use_with sqlite sqlite3 /usr/$(get_libdir)) \
+ $(use_enable srp) \
+ $(use_enable static-libs static) \
+ ${myconf}
+}
+
+src_compile() {
+ emake
+
+ # Default location for java classes breaks OpenOffice (bug #60769).
+ # Thanks to axxo@gentoo.org for the solution.
+ cd "${S}"
+ if use java ; then
+ jar -cvf ${PN}.jar -C java $(find java -name "*.class")
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ keepdir /etc/sasl2
+
+ if use sample ; then
+ docinto sample
+ dodoc sample/*.c
+ exeinto /usr/share/doc/${P}/sample
+ doexe sample/client sample/server
+ fi
+
+ # Default location for java classes breaks OpenOffice (bug #60769).
+ if use java ; then
+ java-pkg_dojar ${PN}.jar
+ java-pkg_regso "${D}/usr/$(get_libdir)/libjavasasl.so"
+ # hackish, don't wanna dig through makefile
+ rm -Rf "${D}/usr/$(get_libdir)/java"
+ docinto "java"
+ dodoc "${S}/java/README" "${FILESDIR}/java.README.gentoo" "${S}"/java/doc/*
+ dodir "/usr/share/doc/${PF}/java/Test"
+ insinto "/usr/share/doc/${PF}/java/Test"
+ doins "${S}"/java/Test/*.java
+ fi
+
+ docinto ""
+ dodoc AUTHORS ChangeLog NEWS README doc/TODO doc/*.txt
+ newdoc pwcheck/README README.pwcheck
+ dohtml doc/*.html
+
+ docinto "saslauthd"
+ dodoc saslauthd/{AUTHORS,ChangeLog,LDAP_SASLAUTHD,NEWS,README}
+
+ newpamd "${FILESDIR}/saslauthd.pam-include" saslauthd
+
+ newinitd "${FILESDIR}/pwcheck.rc6" pwcheck
+ systemd_dounit "${FILESDIR}/pwcheck.service"
+
+ newinitd "${FILESDIR}/saslauthd2.rc7" saslauthd
+ newconfd "${FILESDIR}/saslauthd-${SASLAUTHD_CONF_VER}.conf" saslauthd
+ systemd_dounit "${FILESDIR}/saslauthd.service"
+ systemd_dotmpfilesd "${FILESDIR}/${PN}.conf"
+
+ newsbin "${S}/saslauthd/testsaslauthd" testsaslauthd
+
+ use static-libs || find "${D}"/usr/lib*/sasl2 -name 'lib*.la' -delete
+}
+
+pkg_postinst () {
+ # Generate an empty sasldb2 with correct permissions.
+ if ( use berkdb || use gdbm ) && [[ ! -f "${ROOT}/etc/sasl2/sasldb2" ]] ; then
+ einfo "Generating an empty sasldb2 with correct permissions ..."
+ echo "p" | "${ROOT}/usr/sbin/saslpasswd2" -f "${ROOT}/etc/sasl2/sasldb2" -p login \
+ || die "Failed to generate sasldb2"
+ "${ROOT}/usr/sbin/saslpasswd2" -f "${ROOT}/etc/sasl2/sasldb2" -d login \
+ || die "Failed to delete temp user"
+ chown root:mail "${ROOT}/etc/sasl2/sasldb2" \
+ || die "Failed to chown ${ROOT}/etc/sasl2/sasldb2"
+ chmod 0640 "${ROOT}/etc/sasl2/sasldb2" \
+ || die "Failed to chmod ${ROOT}/etc/sasl2/sasldb2"
+ fi
+
+ if use authdaemond ; then
+ elog "You need to add a user running a service using Courier's"
+ elog "authdaemon to the 'mail' group. For example, do:"
+ elog " gpasswd -a postfix mail"
+ elog "to add the 'postfix' user to the 'mail' group."
+ fi
+
+ elog "pwcheck and saslauthd home directories have moved to:"
+ elog " /run/saslauthd, using tmpfiles.d"
+}
diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-fix_dovecot_authentication.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-fix_dovecot_authentication.patch
new file mode 100644
index 000000000000..46bbdd1ca1a0
--- /dev/null
+++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-fix_dovecot_authentication.patch
@@ -0,0 +1,90 @@
+Bug #510320
+--- saslauthd/auth_rimap.c 2012-10-12 14:05:48.000000000 +0000
++++ saslauthd/auth_rimap.c 2014-05-15 05:23:02.000000000 +0000
+@@ -371,7 +371,7 @@
+ if ( rc>0 ) {
+ /* check if there is more to read */
+ fd_set perm;
+- int fds, ret;
++ int fds, ret, loopc;
+ struct timeval timeout;
+
+ FD_ZERO(&perm);
+@@ -380,6 +380,7 @@
+
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
++ loopc = 0;
+ while( select (fds, &perm, NULL, NULL, &timeout ) >0 ) {
+ if ( FD_ISSET(s, &perm) ) {
+ ret = read(s, rbuf+rc, sizeof(rbuf)-rc);
+@@ -387,6 +388,14 @@
+ rc = ret;
+ break;
+ } else {
++ if (ret == 0) {
++ loopc += 1;
++ } else {
++ loopc = 0;
++ }
++ if (loopc > sizeof(rbuf)) { // arbitrary chosen value
++ break;
++ }
+ rc += ret;
+ }
+ }
+@@ -484,7 +493,7 @@
+ if ( rc>0 ) {
+ /* check if there is more to read */
+ fd_set perm;
+- int fds, ret;
++ int fds, ret, loopc;
+ struct timeval timeout;
+
+ FD_ZERO(&perm);
+@@ -493,6 +502,7 @@
+
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
++ loopc = 0;
+ while( select (fds, &perm, NULL, NULL, &timeout ) >0 ) {
+ if ( FD_ISSET(s, &perm) ) {
+ ret = read(s, rbuf+rc, sizeof(rbuf)-rc);
+@@ -500,6 +510,14 @@
+ rc = ret;
+ break;
+ } else {
++ if (ret == 0) {
++ loopc += 1;
++ } else {
++ loopc = 0;
++ }
++ if (loopc > sizeof(rbuf)) { // arbitrary chosen value
++ break;
++ }
+ rc += ret;
+ }
+ }
+--- lib/checkpw.c 2012-01-27 23:31:36.000000000 +0000
++++ lib/checkpw.c 2014-05-15 05:19:35.000000000 +0000
+@@ -587,16 +587,14 @@
+ /* Timeout. */
+ errno = ETIMEDOUT;
+ return -1;
+- case +1:
+- if (FD_ISSET(fd, &rfds)) {
+- /* Success, file descriptor is readable. */
+- return 0;
+- }
+- return -1;
+ case -1:
+ if (errno == EINTR || errno == EAGAIN)
+ continue;
+ default:
++ if (FD_ISSET(fd, &rfds)) {
++ /* Success, file descriptor is readable. */
++ return 0;
++ }
+ /* Error catch-all. */
+ return -1;
+ }