diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-libs/cyrus-sasl | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-libs/cyrus-sasl')
28 files changed, 1492 insertions, 0 deletions
diff --git a/dev-libs/cyrus-sasl/Manifest b/dev-libs/cyrus-sasl/Manifest new file mode 100644 index 000000000000..8ce2286db69e --- /dev/null +++ b/dev-libs/cyrus-sasl/Manifest @@ -0,0 +1,28 @@ +AUX cyrus-sasl-2.1.23-gss_c_nt_hostbased_service.patch 782 BLAKE2B 2573c8784bf0abbb86b873a333a244330d2a7ba22767792b38261ba122081f82dbfd8f1c5c3503d9e7cfb82349ead903ce7893f45d75194b73b001d3902b9f80 SHA512 524b199559b5f8f363f12bd1dd677f3354eacb68e88fa43ab8dd227465121c00841ce48ce01ba7e9e64629d5871418ed424d0c9bdda6895914c07ae7f1035595 +AUX cyrus-sasl-2.1.25-as_needed.patch 1083 BLAKE2B d6a2c9e2bf6d41ea4a30f2043b6cbaff5a26acf6f8da8f681afcb9c9b4dbab2b52dbd6a37c219b337acf35ea2c67a0afe6ebdcbdc3d8f9ad489c4317656cd4a7 SHA512 8fdc7039fda79e95ec310cd63d72871d7b5b35b5a1b6cf30b9693f6a02e265d924e375ddc65158f38de129b5da058ecd26038f988153ff0aacf2665d66f40abb +AUX cyrus-sasl-2.1.25-autotools_fixes.patch 3926 BLAKE2B 33817cdaeb79b03ecd6f75eb98b4946f4c7ca9a7f0ccc194200409d045d158642fecfc7dded004b25735d85e8fd55b378625ffc2bd97f045490414b9eb6b55fc SHA512 d1e39d856addf6b53a278669df6e87f0fddd9a1ceadc0fadf2bdac239fcec8540c797118be642a58e65e2ec667d3c2a4b604f68f659433e64dbcd5bfe35b9a82 +AUX cyrus-sasl-2.1.25-auxprop.patch 552 BLAKE2B 2d932e05863da6b108eec405e792003d6d8df4bde07bd044537729232a9b23e7261cbb33b82df7c5685ee96aae3e0aed62317f89e970fbedffea65bf9d89ccdc SHA512 73ae914e684ae698eb56a1579ba9a477a946625a3b079e2b400d88583074f1701d8a6926ed17dea36b923050f21c04fbf746d54284568bd21c14be3d10283b6f +AUX cyrus-sasl-2.1.25-avoid_pic_overwrite.patch 1076 BLAKE2B ed64d970d3321d4f4e8dcfc0ea28638cbfbbe9dc29f585462c81cde945759d3ef9dde275b1472377176973fa8ba15d0beddfa4c32f30762e5e71b618e2a7bbe6 SHA512 033e3634116e1d3b316052dbe0b671cca0fcfb6063fca1a97d990c422c2ce05109a1e424e84ed9928dc0312a325a7248f2d2e3f9547f84453b36331c01f63be5 +AUX cyrus-sasl-2.1.25-fix_heimdal.patch 601 BLAKE2B 373fd892c8b641d51ac5e3a905707cc781662e637525d8a911e6f059dae2f768aaf3b2264c6c5c34f1d68f679cda22ea82786761e42212ae6fe49b522c815bc3 SHA512 80a5181a3c324551ae64ead2d6199691ac9994653e4b86de21852d2caf201b5fccde6464af4189351edcad4b87dc60cab5f1c03148db77f90c6c52a16465045a +AUX cyrus-sasl-2.1.25-missing_header.patch 292 BLAKE2B 9a2d5ae510b08daf9e0b90d1b68ebe7de2e41d4e3573a82f2763dc82148fbe2fb634d5161ad728ddf99740d2160246d22324c2f7b3ce43fb6f7f216d6b21de5a SHA512 b1dc1fa2663c5bd9b051353e6c18ece48460c2de4aff3b6f13672e0aa08e651462af4dae38a2821367728e503ade577218d2645f8c0a96c85e77226ee77ac1a6 +AUX cyrus-sasl-2.1.25-saslauthd_libtool.patch 280 BLAKE2B d65e15151232a0c8812b4ba48d796c1948965525f092dff1c0f70bc19bbfe2318355a54d8e1ae6d6ebd955adccd19f5487e4f0c4c519be7cf7f047d230740f1f SHA512 1e79230a3891f1492c7d6f5969f6a4890aaae2f488e9f3942cafeda574bf8810c4fb3e004836f769244db02bae663fa3ac1eeca19658e6fd3c94f2a891ed2653 +AUX cyrus-sasl-2.1.25-sasldb_al.patch 555 BLAKE2B 27a9ca344098a361bdf2aa5089c87e48d8e7717f7c97b965d8e8eda8b00629fbce9d9aebabb4c02f59ffdf50bcdb667dc3fb7bbadd140eac8e3363321a033fb6 SHA512 2da553298b482ca3115294de7264428925911f8d1b6a15ae1af38ee7e0a3191a0f4ad90bcbaeef599c994842a86eea5157b663cb6944f035d9a377dba91dbbf0 +AUX cyrus-sasl-2.1.25-service_keytabs.patch 932 BLAKE2B bef7c27d8bcb67e966ed770a43fb29b97e24f31809dc29ea12971466cb6f21111d0d80f70cb46c0f98a6d45772fdaddf35be4f25cb484748007ac001fbbc2974 SHA512 bd5ceebfe1b8f72d275db487a6f11bbb8e6f20f3b44c05040fd9d0bb5c72e656f2c8f22924fecaa9c268e50d54d272f25f4a5a3b72ca49d1c23ef9f178d00733 +AUX cyrus-sasl-2.1.26-CVE-2013-4122.patch 3838 BLAKE2B 5a124ef7e4af8749881339a30e66286b83462e10113b51168fd3d67ca77dac34506293fd949688731ea51e8b857157cef6ef071a6828aabf2d16a82f7c0d725e SHA512 3df09f16dc2f4efc601339743eb6e66087977fae4e174aa82c4abb7f85a77aa9eb98629837079236446ef3b494fb48931c9dc8850362a49615749e162b4699c8 +AUX cyrus-sasl-2.1.26-canonuser-ldapdb-garbage-in-out-buffer.patch 284 BLAKE2B 77ce4733f92515a98a8f74c68c7e7479d9f0f84302d91d9c3b0e92230f644d59a74588113447320c389c7e48768415f26dbb62fa1a48f3b283b739657f141350 SHA512 f3b789b7dea3f6a51fca6fd1877c81b5f5a3be342fa5c90ddae98a822e0c2a71e8fa582c6cb60c696363aa5cb99db8609cd6b3a91c5d402a0ad1e6124c726f5f +AUX cyrus-sasl-2.1.26-fix_dovecot_authentication.patch 2603 BLAKE2B 1c37d595841da820ee244f6649d4fc9d3e7f68a7024efe3273eb5e53c9f0066f51d531d9b74bc2c080227c115ddb2f107a01455af3c88a25e9053ddee0d399e2 SHA512 4244015451dfd41443a0cf8b56ae19a1dfb550e374fcdc37dc091a54f73ab36818c25fe96f7837e3ddfe5c7952d309a5b51bedfe0b7c7f1dec8ecf15f067acda +AUX cyrus-sasl-2.1.26-missing-size_t.patch 348 BLAKE2B 7d98d1e13cd9abc766c94ec1cbc3c7d58df1f900395a5e5e28f18c2a056e06f89e7c7209115d5d3efdcd7b3f9b698c7a9c51f25d2cf136e975f2ef2d162c4f1d SHA512 026183880caa504af9dda5fb93a6f47a159c7ab6af79463bc512709681dd260489411b8b8da78a9f8cd260b77ae5d1977854a39de80bc48f3a03e3ffa1b09fb2 +AUX cyrus-sasl-2.1.26-send-imap-logout.patch 1897 BLAKE2B 4b817b78cfb81181bc2c57402e2e621ccf1cea346c1460d46e76a605cdbd426aefc0fcae5c18c193dcde1562e8fe16a177ead00b3bc3084c03dd0e2466866ac3 SHA512 b30a4faea9fb66d8fab95a27b8ec87371d3650c5d2d4475449b8cebb223631d1afe9cdebd8c9b076e77bc3d2e2f5c32b24fe9292db26523212a72754cbff9995 +AUX cyrus-sasl.conf 34 BLAKE2B f41e1d0d58f484958648cc6f6e2903cf7555f825a1f073b247b4080f575f8508b9a73c9d02c155178d2031019a48ff6300adf60bbb0286a6f7dc710c72f433c3 SHA512 67b9bb97191d091ffc2b8f450ad88a558df304a29651a9a49407c50df0a316666a96e7d1a2ca3ac8ee5e60a58a5d5b618ce963661f4f45049dc6b3ef2cf8099e +AUX java.README.gentoo 934 BLAKE2B f3447c8422f07cfc17b5e240d5c2fe894f94118132360dda4a5eb04fa51acab10b13d01fcb68beaf6308926256e7c95c457a43f3f697e0c755c7c08143e6c3f6 SHA512 afcecb94e8e8c427b9491fc21312f4bed2a7d4ecedbbec8fec895cf8ca1e747073979f4415e12d8499eadbc29e8d74c6029f7cdfd7a2cb732454faaa19d52dd4 +AUX pwcheck.rc6 409 BLAKE2B c3e27eeeca23d60aad6078d0e66887b40742a516caf585bfe21619275bae59bd2a9da0c31299c03f1c1aff2e340b93b434816e16d196554d59e78b7fdba5f78d SHA512 797317f0361d6d849ca35c5189ba0cb562e58d62022ce7c29229aab71e8ce4c1e3e6409cd3b092b666724a00b0b3b6071e527cc49050fc34590ef3b1a7648f8a +AUX pwcheck.service 129 BLAKE2B 90f07567b52ce60f00a890299e4c4b97e0bee1d92938bc15cf20bca954d627168ed73f9dadced94f2b56961538bbc0b4e18ebd52a88a99e4689d13d254c20bea SHA512 73e01063bf308cbdc45400d4d0b61f81eade8453acec71b2ac0c0acf1ee458881aab2876cbd47208f87c6a9f298846eb509e14eb01b985c4f9e0ad4db1d8b751 +AUX saslauthd-2.1.26.conf 687 BLAKE2B da252bac77b65ba2ac680e51573ac4f9f82221af6830c5c7cc206fe8e54535ebed347999998c9a18671f0840298e2c6202af7e5364331c14cfc4fb59cc212a1b SHA512 4859a9659f580c93bfd47cdbd997ec3c75fa829721532061bee0f1736be897b9e59478ab33e216a588d072b866e4b61f7893a16b36ceadf016bda083eee26e0f +AUX saslauthd.pam-include 160 BLAKE2B a715cd6e780fd6db773920231f6010c35f8998d563a7e5e504987a6e3089070cf01dd5af73a05c1b43b8b7787f55972a13c4afb05997e6fa3783dccf00696e91 SHA512 14fcfc0f69dacd25ac9b298cf44b0b44146d418424ef16e66edf8893353e418ef53beebb7199bd516b828c40954e4875ab5659f50a09af12ef2a371b944b45b1 +AUX saslauthd.service 277 BLAKE2B cf80eaa1e3f7ef854978a458e4b026f3f47891620ac63e7fd1b76d7ba6c9d2eeb3690542c416f1c316f4342f0c7316cce8992f46b32bc984ea2baaa43301185d SHA512 fa318aefec6f802badd72a4baf33875bc0021fc4889578877880971470d84bf645ad3c34dd10c582d8cc06ea512e3d56984902efaf09e2806a27feade5fc971c +AUX saslauthd2.rc7 411 BLAKE2B 7cda36ea03aeea5f8e32c2fd0319a483dae78080fa213fb423bd1545e9d29193ebe077ebe5d15ab5940b2d805cb46a25ad2629757f55d2c40c4acc3f0adfa355 SHA512 1d5942a94ffbc15774443d60a88d4c89c7c3c6ea68b041d304f0110f6ec3aa2a812f59021cddc78de6f51a25bb00955e4e56d769e766a9d856f13774dd37ce83 +DIST cyrus-sasl-2.1.26.tar.gz 5220231 BLAKE2B 08fe5c1624e7cccb4b5e562f6987fddd047e1221b671cedbbb684d5a2f39e09a438ad14ffcedb5f398c203ca0b6e23574106c87f43a632028d50a69619c54970 SHA512 78819cb9bb38bea4537d6770d309deeeef09ff44a67526177609d3e1257ff4334d2b5e5131d5a1e4dea7430d8db1918ea9d171f0dee38b5e8337f4b72ed068f0 +EBUILD cyrus-sasl-2.1.26-r10.ebuild 7751 BLAKE2B 8af27fd54e6b9a3418cd4929f5993cfa6e79e6c08c743161ab23e2859d950dad6b25877d91041f8ef4612fd7aaba48e12ed5bd84f7b96b77dbc79603a4cee26b SHA512 e98e9ba6c55c0767b3d95fc34cf5d7193f3b7a82ec1d256aa26392a0036c532128a99e114b88d15af87b56c88cc8831be6540fa39d8f7f78a7f32e4495d5f201 +EBUILD cyrus-sasl-2.1.26-r11.ebuild 8401 BLAKE2B 23750f3f5b6cf63dd1c6e80dc8591ea175c76d4abdf121fcdafab30cae631ae72e10cffb2769b2a8d7df8669d398061abd7a26c0b3d492cf9822b848ece30429 SHA512 ba488a57851285de62c53bb74bc61231660d924783cb354ffbddfa62657f6f8d3b3a3a4d357bd46ed694c1fc006ad9b189bb9456d75cfd2427f640811e6f1c0d +EBUILD cyrus-sasl-2.1.26-r9.ebuild 7660 BLAKE2B 3a1594ef7878d89065aaabefc5928a9ad4489ccb2812de4adc9fe1979d6861238e26a32d523c6bc63c32a1b83627797416df74d857156425ac8d8aa544dcf1c4 SHA512 c1db771512006137faa09716fd67ac04bf984870a0aca83e393b577d6a6c4b4530796b53c8d5bc91a0bd6963226953f2d2e80dfb4039016d60554e904d57c15e +MISC metadata.xml 706 BLAKE2B a5682e5daac9c1a7a3a021989ae9ca856bb08c9eb0ba3a71070b7150cccc7ddfcd1d3d0fe1df33e688d0223ab7fb760ae028e4753523b28a4cedcb625c899d73 SHA512 1e7495deff4727296d29b25b7af535c0b36054b9172763ca8634b40f324dbc33697424a7e5565791c3131def3708c9ffb7e3e2362cbd8b334d650921fc2291ce diff --git a/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r10.ebuild b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r10.ebuild new file mode 100644 index 000000000000..d37c40eafd29 --- /dev/null +++ b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r10.ebuild @@ -0,0 +1,245 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils flag-o-matic multilib multilib-minimal 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 ~arm64 ~hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="authdaemond berkdb gdbm kerberos ldapdb libressl openldap mysql pam postgres sample selinux sqlite +srp ssl static-libs urandom" + +DEPEND="net-mail/mailbase + authdaemond? ( || ( net-mail/courier-imap mail-mta/courier ) ) + berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] ) + gdbm? ( >=sys-libs/gdbm-1.10-r1:=[${MULTILIB_USEDEP}] ) + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) + openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] ) + mysql? ( virtual/mysql ) + pam? ( >=virtual/pam-0-r1[${MULTILIB_USEDEP}] ) + postgres? ( dev-db/postgresql:= ) + sqlite? ( >=dev-db/sqlite-3.8.2:3[${MULTILIB_USEDEP}] ) + ssl? ( + !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) + libressl? ( dev-libs/libressl:=[${MULTILIB_USEDEP}] ) + ) + java? ( >=virtual/jdk-1.4:= )" +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-sasl )" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/sasl/md5global.h +) + +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 + + multilib-minimal_src_configure +} + +multilib_src_configure() { + # Java support. + multilib_is_native_abi && use java && export JAVAC="${JAVAC} ${JAVACFLAGS}" + + local myconf=() + + # Add authdaemond support (bug #56523). + if use authdaemond ; then + myconf+=( --with-authdaemond=/var/lib/courier/authdaemon/socket ) + fi + + # Fix for bug #59634. + if ! use ssl ; then + myconf+=( --without-des ) + fi + + if use sqlite || { multilib_is_native_abi && { use mysql || use postgres; }; } ; then + myconf+=( --enable-sql ) + else + 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+=( --with-dblib=gdbm ) + elif use berkdb ; then + einfo "Building with BerkeleyDB as database backend for your SASLdb" + myconf+=( + --with-dblib=berkeley + --with-bdb-incdir="$(db_includedir)" + ) + else + einfo "Building without SASLdb support" + myconf+=( --with-dblib=none ) + fi + + # Use /dev/urandom instead of /dev/random (bug #46038). + if use urandom ; then + myconf+=( --with-devrandom=/dev/urandom ) + fi + + ECONF_SOURCE=${S} \ + 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) \ + $(multilib_native_use_enable sample) \ + $(use_enable kerberos gssapi) \ + $(multilib_native_use_enable java) \ + $(multilib_native_use_with java javahome ${JAVA_HOME}) \ + $(multilib_native_use_with mysql mysql /usr) \ + $(multilib_native_use_with postgres pgsql) \ + $(use_with sqlite sqlite3 /usr/$(get_libdir)) \ + $(use_enable srp) \ + $(use_enable static-libs static) \ + "${myconf[@]}" +} + +multilib_src_compile() { + emake + + # Default location for java classes breaks OpenOffice (bug #60769). + # Thanks to axxo@gentoo.org for the solution. + if multilib_is_native_abi && use java ; then + jar -cvf ${PN}.jar -C java $(find java -name "*.class") + fi +} + +multilib_src_install() { + default + + if multilib_is_native_abi; then + if use sample ; then + docinto sample + dodoc "${S}"/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 + + dosbin saslauthd/testsaslauthd + fi +} + +multilib_src_install_all() { + keepdir /etc/sasl2 + + 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" + + prune_libtool_files --modules +} + +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/cyrus-sasl-2.1.26-r11.ebuild b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r11.ebuild new file mode 100644 index 000000000000..40f3d8655566 --- /dev/null +++ b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r11.ebuild @@ -0,0 +1,263 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils flag-o-matic multilib multilib-minimal 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 ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="authdaemond berkdb gdbm kerberos ldapdb libressl openldap mysql pam postgres sample selinux sqlite +srp ssl static-libs urandom" + +DEPEND=" + net-mail/mailbase + authdaemond? ( || ( net-mail/courier-imap mail-mta/courier ) ) + berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] ) + gdbm? ( >=sys-libs/gdbm-1.10-r1:=[${MULTILIB_USEDEP}] ) + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) + openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] ) + mysql? ( virtual/mysql ) + pam? ( >=virtual/pam-0-r1[${MULTILIB_USEDEP}] ) + postgres? ( dev-db/postgresql:= ) + sqlite? ( >=dev-db/sqlite-3.8.2:3[${MULTILIB_USEDEP}] ) + ssl? ( + !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) + libressl? ( dev-libs/libressl:=[${MULTILIB_USEDEP}] ) + ) + java? ( >=virtual/jdk-1.6:= )" + +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-sasl )" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/sasl/md5global.h +) + +PATCHES=( + "${FILESDIR}/${PN}-2.1.25-sasldb_al.patch" + "${FILESDIR}/${PN}-2.1.25-saslauthd_libtool.patch" + "${FILESDIR}/${PN}-2.1.25-avoid_pic_overwrite.patch" + "${FILESDIR}/${PN}-2.1.25-autotools_fixes.patch" + "${FILESDIR}/${PN}-2.1.25-as_needed.patch" + "${FILESDIR}/${PN}-2.1.25-missing_header.patch" + "${FILESDIR}/${PN}-2.1.25-fix_heimdal.patch" + "${FILESDIR}/${PN}-2.1.25-auxprop.patch" + "${FILESDIR}/${PN}-2.1.23-gss_c_nt_hostbased_service.patch" + "${FILESDIR}/${PN}-2.1.25-service_keytabs.patch" + "${FILESDIR}/${PN}-2.1.26-missing-size_t.patch" + "${FILESDIR}/${PN}-2.1.26-CVE-2013-4122.patch" + "${FILESDIR}/${PN}-2.1.26-send-imap-logout.patch" + "${FILESDIR}/${PN}-2.1.26-canonuser-ldapdb-garbage-in-out-buffer.patch" + "${FILESDIR}/${PN}-2.1.26-fix_dovecot_authentication.patch" +) + +pkg_setup() { + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + epatch "${PATCHES[@]}" + + # 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 + if [[ ${CHOST} == *-solaris* ]] ; then + # getpassphrase is defined in /usr/include/stdlib.h + append-cppflags -DHAVE_GETPASSPHRASE + else + # this horrendously breaks things on Solaris + append-cppflags -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -DLDAP_DEPRECATED + fi + + multilib-minimal_src_configure +} + +multilib_src_configure() { + # Java support. + multilib_is_native_abi && use java && export JAVAC="${JAVAC} ${JAVACFLAGS}" + + local myconf=() + + # Add authdaemond support (bug #56523). + if use authdaemond ; then + myconf+=( --with-authdaemond="${EPREFIX}"/var/lib/courier/authdaemon/socket ) + fi + + # Fix for bug #59634. + if ! use ssl ; then + myconf+=( --without-des ) + fi + + if use sqlite || { multilib_is_native_abi && { use mysql || use postgres; }; } ; then + myconf+=( --enable-sql ) + else + 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+=( --with-dblib=gdbm ) + elif use berkdb ; then + einfo "Building with BerkeleyDB as database backend for your SASLdb" + myconf+=( + --with-dblib=berkeley + --with-bdb-incdir="$(db_includedir)" + ) + else + einfo "Building without SASLdb support" + myconf+=( --with-dblib=none ) + fi + + # Use /dev/urandom instead of /dev/random (bug #46038). + if use urandom ; then + myconf+=( --with-devrandom=/dev/urandom ) + fi + + ECONF_SOURCE=${S} \ + econf \ + --enable-login \ + --enable-ntlm \ + --enable-auth-sasldb \ + --disable-cmulocal \ + --disable-krb4 \ + --disable-macos-framework \ + --enable-otp \ + --without-sqlite \ + --with-saslauthd="${EPREFIX}"/run/saslauthd \ + --with-pwcheck="${EPREFIX}"/run/saslauthd \ + --with-configdir="${EPREFIX}"/etc/sasl2 \ + --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sasl2 \ + --with-dbpath="${EPREFIX}"/etc/sasl2/sasldb2 \ + $(use_with ssl openssl) \ + $(use_with pam) \ + $(use_with openldap ldap) \ + $(use_enable ldapdb) \ + $(multilib_native_use_enable sample) \ + $(use_enable kerberos gssapi) \ + $(multilib_native_use_enable java) \ + $(multilib_native_use_with java javahome ${JAVA_HOME}) \ + $(multilib_native_use_with mysql mysql "${EPREFIX}"/usr) \ + $(multilib_native_use_with postgres pgsql) \ + $(use_with sqlite sqlite3 "${EPREFIX}"/usr/$(get_libdir)) \ + $(use_enable srp) \ + $(use_enable static-libs static) \ + "${myconf[@]}" +} + +multilib_src_compile() { + emake + + # Default location for java classes breaks OpenOffice (bug #60769). + # Thanks to axxo@gentoo.org for the solution. + if multilib_is_native_abi && use java ; then + jar -cvf ${PN}.jar -C java $(find java -name "*.class") + fi +} + +multilib_src_install() { + default + + if multilib_is_native_abi; then + if use sample ; then + docinto sample + dodoc "${S}"/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 "${ED}/usr/$(get_libdir)/libjavasasl$(get_libname)" + # hackish, don't wanna dig through makefile + rm -rf "${ED}/usr/$(get_libdir)/java" || die + 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 + + dosbin saslauthd/testsaslauthd + fi +} + +multilib_src_install_all() { + keepdir /etc/sasl2 + + 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" + + # The get_modname bit is important: do not remove the .la files on + # platforms where the lib isn't called .so for cyrus searches the .la to + # figure out what the name is supposed to be instead + use static-libs || [[ $(get_modname) != .so ]] || \ + prune_libtool_files --modules +} + +pkg_postinst () { + # Generate an empty sasldb2 with correct permissions. + if ( use berkdb || use gdbm ) && [[ ! -f "${EROOT}/etc/sasl2/sasldb2" ]] ; then + einfo "Generating an empty sasldb2 with correct permissions ..." + echo "p" | "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -p login \ + || die "Failed to generate sasldb2" + "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -d login \ + || die "Failed to delete temp user" + chown root:mail "${EROOT}/etc/sasl2/sasldb2" \ + || die "Failed to chown ${EROOT}/etc/sasl2/sasldb2" + chmod 0640 "${EROOT}/etc/sasl2/sasldb2" \ + || die "Failed to chmod ${EROOT}/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/cyrus-sasl-2.1.26-r9.ebuild b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r9.ebuild new file mode 100644 index 000000000000..1179bd79125b --- /dev/null +++ b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r9.ebuild @@ -0,0 +1,242 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils flag-o-matic multilib multilib-minimal 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 ~arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd" +IUSE="authdaemond berkdb gdbm kerberos ldapdb openldap mysql pam postgres sample selinux sqlite +srp ssl static-libs urandom" + +DEPEND="net-mail/mailbase + authdaemond? ( || ( net-mail/courier-imap mail-mta/courier ) ) + berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] ) + gdbm? ( >=sys-libs/gdbm-1.10-r1:=[${MULTILIB_USEDEP}] ) + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) + openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] ) + mysql? ( virtual/mysql ) + pam? ( >=virtual/pam-0-r1[${MULTILIB_USEDEP}] ) + postgres? ( dev-db/postgresql:= ) + sqlite? ( >=dev-db/sqlite-3.8.2:3[${MULTILIB_USEDEP}] ) + ssl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) + java? ( >=virtual/jdk-1.4:= )" +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-sasl )" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/sasl/md5global.h +) + +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 + + multilib-minimal_src_configure +} + +multilib_src_configure() { + # Java support. + multilib_is_native_abi && use java && export JAVAC="${JAVAC} ${JAVACFLAGS}" + + local myconf=() + + # Add authdaemond support (bug #56523). + if use authdaemond ; then + myconf+=( --with-authdaemond=/var/lib/courier/authdaemon/socket ) + fi + + # Fix for bug #59634. + if ! use ssl ; then + myconf+=( --without-des ) + fi + + if use sqlite || { multilib_is_native_abi && { use mysql || use postgres; }; } ; then + myconf+=( --enable-sql ) + else + 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+=( --with-dblib=gdbm ) + elif use berkdb ; then + einfo "Building with BerkeleyDB as database backend for your SASLdb" + myconf+=( + --with-dblib=berkeley + --with-bdb-incdir="$(db_includedir)" + ) + else + einfo "Building without SASLdb support" + myconf+=( --with-dblib=none ) + fi + + # Use /dev/urandom instead of /dev/random (bug #46038). + if use urandom ; then + myconf+=( --with-devrandom=/dev/urandom ) + fi + + ECONF_SOURCE=${S} \ + 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) \ + $(multilib_native_use_enable sample) \ + $(use_enable kerberos gssapi) \ + $(multilib_native_use_enable java) \ + $(multilib_native_use_with java javahome ${JAVA_HOME}) \ + $(multilib_native_use_with mysql mysql /usr) \ + $(multilib_native_use_with postgres pgsql) \ + $(use_with sqlite sqlite3 /usr/$(get_libdir)) \ + $(use_enable srp) \ + $(use_enable static-libs static) \ + "${myconf[@]}" +} + +multilib_src_compile() { + emake + + # Default location for java classes breaks OpenOffice (bug #60769). + # Thanks to axxo@gentoo.org for the solution. + if multilib_is_native_abi && use java ; then + jar -cvf ${PN}.jar -C java $(find java -name "*.class") + fi +} + +multilib_src_install() { + default + + if multilib_is_native_abi; then + if use sample ; then + docinto sample + dodoc "${S}"/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 + + dosbin saslauthd/testsaslauthd + fi +} + +multilib_src_install_all() { + keepdir /etc/sasl2 + + 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" + + prune_libtool_files --modules +} + +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.23-gss_c_nt_hostbased_service.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.23-gss_c_nt_hostbased_service.patch new file mode 100644 index 000000000000..9eeab1b42ff9 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.23-gss_c_nt_hostbased_service.patch @@ -0,0 +1,16 @@ +Gentoo bug #389349 +--- cmulocal/sasl2.m4 2009-04-28 17:09:13.000000000 +0200 ++++ cmulocal/sasl2.m4 2011-11-02 17:55:24.000000000 +0100 +@@ -217,7 +217,11 @@ + [AC_WARN([Cybersafe define not found])]) + + elif test "$ac_cv_header_gssapi_h" = "yes"; then +- AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi.h, ++ AC_EGREP_CPP(hostbased_service_gss_nt_yes, gssapi.h, ++ [#include <gssapi.h> ++ #ifdef GSS_C_NT_HOSTBASED_SERVICE ++ hostbased_service_gss_nt_yes ++ #endif], + [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,, + [Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE])]) + elif test "$ac_cv_header_gssapi_gssapi_h"; then diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-as_needed.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-as_needed.patch new file mode 100644 index 000000000000..67b48b4a4993 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-as_needed.patch @@ -0,0 +1,27 @@ +Author: Matthias Klose <doko@ubuntu.com> +Desription: Fix FTBFS, add $(SASL_DB_LIB) as dependency to libsasldb, and use +it. +--- a/saslauthd/Makefile.am ++++ b/saslauthd/Makefile.am +@@ -16,7 +16,7 @@ EXTRA_saslauthd_sources = getaddrinfo.c + saslauthd_DEPENDENCIES = saslauthd-main.o @LTLIBOBJS@ + saslauthd_LDADD = @SASL_KRB_LIB@ \ + @GSSAPIBASE_LIBS@ @GSSAPI_LIBS@ @LIB_CRYPT@ @LIB_SIA@ \ +- @LIB_SOCKET@ @SASL_DB_LIB@ @LIB_PAM@ @LDAP_LIBS@ @LTLIBOBJS@ ++ @LIB_SOCKET@ ../sasldb/libsasldb.la @LIB_PAM@ @LDAP_LIBS@ @LTLIBOBJS@ + + testsaslauthd_SOURCES = testsaslauthd.c utils.c + testsaslauthd_LDADD = @LIB_SOCKET@ +--- a/sasldb/Makefile.am ++++ b/sasldb/Makefile.am +@@ -55,8 +55,8 @@ noinst_LIBRARIES = libsasldb.a + + libsasldb_la_SOURCES = allockey.c sasldb.h + EXTRA_libsasldb_la_SOURCES = $(extra_common_sources) +-libsasldb_la_DEPENDENCIES = $(SASL_DB_BACKEND) +-libsasldb_la_LIBADD = $(SASL_DB_BACKEND) ++libsasldb_la_DEPENDENCIES = $(SASL_DB_BACKEND) $(SASL_DB_LIB) ++libsasldb_la_LIBADD = $(SASL_DB_BACKEND) $(SASL_DB_LIB) + + # Prevent make dist stupidity + libsasldb_a_SOURCES = diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-autotools_fixes.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-autotools_fixes.patch new file mode 100644 index 000000000000..5837921d4f7f --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-autotools_fixes.patch @@ -0,0 +1,114 @@ +--- a/configure.in ++++ b/configure.in +@@ -44,6 +44,8 @@ dnl + AC_INIT(lib/saslint.h) + AC_PREREQ([2.54]) + ++AC_CONFIG_MACRO_DIR([cmulocal] [config]) ++ + dnl use ./config.cache as the default cache file. + dnl we require a cache file to successfully configure our build. + if test $cache_file = "/dev/null"; then +--- a/Makefile.am ++++ b/Makefile.am +@@ -43,6 +43,8 @@ AUTOMAKE_OPTIONS = 1.7 + # + ################################################################ + ++ACLOCAL_AMFLAGS = -I cmulocal -I config ++ + if SASLAUTHD + SAD = saslauthd + else +--- a/saslauthd/configure.in ++++ b/saslauthd/configure.in +@@ -1,7 +1,8 @@ + AC_INIT(mechanisms.h) + AC_PREREQ([2.54]) + +-AC_CONFIG_AUX_DIR(config) ++AC_CONFIG_MACRO_DIR([../cmulocal] [../config]) ++AC_CONFIG_AUX_DIR([config]) + AC_CANONICAL_HOST + + dnl Should we enable SASLAUTHd at all? +@@ -164,30 +165,30 @@ AC_SUBST(LTLIBOBJS) + + dnl Checks for which function macros exist + AC_MSG_CHECKING(whether $CC implements __func__) +-AC_CACHE_VAL(have_func, ++AC_CACHE_VAL(_cv_have_func, + [AC_TRY_LINK([#include <stdio.h>],[printf("%s", __func__);], +-have_func=yes, +-have_func=no)]) +-AC_MSG_RESULT($have_func) +-if test "$have_func" = yes; then ++_cv_have_func=yes, ++_cv_have_func=no)]) ++AC_MSG_RESULT($_cv_have_func) ++if test "$_cv_have_func" = yes; then + AC_DEFINE(HAVE_FUNC,[],[Does the compiler understand __func__]) + else + AC_MSG_CHECKING(whether $CC implements __PRETTY_FUNCTION__) +- AC_CACHE_VAL(have_pretty_function, ++ AC_CACHE_VAL(_cv_have_pretty_function, + [AC_TRY_LINK([#include <stdio.h>],[printf("%s", __PRETTY_FUNCTION__);], +- have_pretty_function=yes, +- have_pretty_function=no)]) +- AC_MSG_RESULT($have_pretty_function) +- if test "$have_pretty_function" = yes; then ++ _cv_have_pretty_function=yes, ++ _cv_have_pretty_function=no)]) ++ AC_MSG_RESULT($_cv_have_pretty_function) ++ if test "$_cv_have_pretty_function" = yes; then + AC_DEFINE(HAVE_PRETTY_FUNCTION,[],[Does compiler understand __PRETTY_FUNCTION__]) + else + AC_MSG_CHECKING(whether $CC implements __FUNCTION__) +- AC_CACHE_VAL(have_function, ++ AC_CACHE_VAL(_cv_have_function, + [AC_TRY_LINK([#include <stdio.h>],[printf("%s", __FUNCTION__);], +- have_function=yes, +- have_function=no)]) +- AC_MSG_RESULT($have_function) +- if test "$have_function" = yes; then ++ _cv_have_function=yes, ++ _cv_have_function=no)]) ++ AC_MSG_RESULT($_cv_have_function) ++ if test "$_cv_have_function" = yes; then + AC_DEFINE(HAVE_FUNCTION,[],[Does compiler understand __FUNCTION__]) + fi + fi +--- a/saslauthd/Makefile.am ++++ b/saslauthd/Makefile.am +@@ -1,4 +1,6 @@ + AUTOMAKE_OPTIONS = 1.7 ++ACLOCAL_AMFLAGS = -I ../cmulocal -I ../config ++ + sbin_PROGRAMS = saslauthd testsaslauthd + EXTRA_PROGRAMS = saslcache + +--- a/config/kerberos_v4.m4 ++++ b/config/kerberos_v4.m4 +@@ -89,18 +89,18 @@ AC_DEFUN([SASL_KERBEROS_V4_CHK], [ + dnl if we were ambitious, we would look more aggressively for the + dnl krb4 install + if test -d ${krb4}; then +- AC_CACHE_CHECK(for Kerberos includes, cyrus_krbinclude, [ ++ AC_CACHE_CHECK(for Kerberos includes, cyrus_cv_krbinclude, [ + for krbhloc in include/kerberosIV include/kerberos include + do + if test -f ${krb4}/${krbhloc}/krb.h ; then +- cyrus_krbinclude=${krb4}/${krbhloc} ++ cyrus_cv_krbinclude=${krb4}/${krbhloc} + break + fi + done + ]) + +- if test -n "${cyrus_krbinclude}"; then +- CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}" ++ if test -n "${cyrus_cv_krbinclude}"; then ++ CPPFLAGS="$CPPFLAGS -I${cyrus_cv_krbinclude}" + fi + LDFLAGS="$LDFLAGS -L$krb4/lib" + fi diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-auxprop.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-auxprop.patch new file mode 100644 index 000000000000..a9dd1476d2e6 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-auxprop.patch @@ -0,0 +1,16 @@ +https://bugzilla.cyrusimap.org/show_bug.cgi?id=3590 +https://bugs.gentoo.org/show_bug.cgi?id=392761 + +--- cyrus-sasl-2.1.25/lib/auxprop.c~ 2011-10-20 17:33:46.423015318 +0200 ++++ cyrus-sasl-2.1.25/lib/auxprop.c 2011-10-20 17:48:49.336348654 +0200 +@@ -971,6 +971,10 @@ + } + + if(!found) { ++ /* compatibility with <= 2.1.23, ignore the lack of auxrop plugin */ ++ if (!plist) ++ result = SASL_OK; ++ else + _sasl_log(sparams->utils->conn, SASL_LOG_DEBUG, + "could not find auxprop plugin, was searching for '%s'", + plist ? plist : "[all]"); diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-avoid_pic_overwrite.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-avoid_pic_overwrite.patch new file mode 100644 index 000000000000..2e5b1750d00d --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-avoid_pic_overwrite.patch @@ -0,0 +1,27 @@ +Author: Fabian Fagerholm <fabbe@debian.org> +Description: This patch makes sure the non-PIC version of libsasldb.a, which +is created out of non-PIC objects, is not going to overwrite the PIC version, +which is created out of PIC objects. The PIC version is placed in .libs, and +the non-PIC version in the current directory. This ensures that both non-PIC +and PIC versions are available in the correct locations. +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -78,7 +78,7 @@ endif + + libsasl2.a: libsasl2.la $(SASL_STATIC_OBJS) + @echo adding static plugins and dependencies +- $(AR) cru .libs/$@ $(SASL_STATIC_OBJS) ++ $(AR) cru $@ $(SASL_STATIC_OBJS) + @for i in ./libsasl2.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \ + if test ! -f $$i; then continue; fi; . $$i; \ + for j in $$dependency_libs foo; do \ +--- a/sasldb/Makefile.am ++++ b/sasldb/Makefile.am +@@ -63,6 +63,6 @@ libsasldb_a_SOURCES = + EXTRA_libsasldb_a_SOURCES = + + libsasldb.a: libsasldb.la $(SASL_DB_BACKEND_STATIC) +- $(AR) cru .libs/$@ $(SASL_DB_BACKEND_STATIC) ++ $(AR) cru $@ $(SASL_DB_BACKEND_STATIC) + + diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-fix_heimdal.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-fix_heimdal.patch new file mode 100644 index 000000000000..abf0df2568c6 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-fix_heimdal.patch @@ -0,0 +1,27 @@ +Fix compiling against heimdal + +--- sample/server.c 2010-12-01 14:52:55.000000000 +0000 ++++ sample/server.c 2011-11-30 14:54:42.000000000 +0000 +@@ -85,8 +85,10 @@ + + #ifdef HAVE_GSS_GET_NAME_ATTRIBUTE + #include <gssapi/gssapi.h> ++#ifndef KRB5_HEIMDAL + #include <gssapi/gssapi_ext.h> + #endif ++#endif + + #include "common.h" + +--- plugins/gssapi.c 2011-05-11 19:25:55.000000000 +0000 ++++ plugins/gssapi.c 2011-11-30 14:54:33.000000000 +0000 +@@ -50,6 +50,9 @@ + #else + #include <gssapi/gssapi.h> + #endif ++#ifdef KRB5_HEIMDAL ++#include <gssapi/gssapi_krb5.h> ++#endif + + #ifdef WIN32 + # include <winsock2.h> diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-missing_header.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-missing_header.patch new file mode 100644 index 000000000000..597d45a76795 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-missing_header.patch @@ -0,0 +1,10 @@ +--- pwcheck/pwcheck_getspnam.c 1999-08-26 19:22:44.000000000 +0300 ++++ pwcheck/pwcheck_getspnam.c 2011-11-30 13:22:24.601023316 +0200 +@@ -24,6 +24,7 @@ + ******************************************************************/ + + #include <shadow.h> ++#include <string.h> + + extern char *crypt(); + diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-saslauthd_libtool.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-saslauthd_libtool.patch new file mode 100644 index 000000000000..da1a49f1dd66 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-saslauthd_libtool.patch @@ -0,0 +1,12 @@ +Author: Fabian Fagerholm <fabbe@debian.org> +Description: Enable libtool use. +--- a/saslauthd/configure.in ++++ b/saslauthd/configure.in +@@ -25,6 +25,7 @@ AC_PROG_AWK + AC_PROG_MAKE_SET + AC_PROG_LN_S + AC_PROG_INSTALL ++AC_PROG_LIBTOOL + + dnl Checks for build foo + CMU_C___ATTRIBUTE__ diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-sasldb_al.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-sasldb_al.patch new file mode 100644 index 000000000000..8eff5a8bdd12 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-sasldb_al.patch @@ -0,0 +1,14 @@ +Author: Fabian Fagerholm <fabbe@debian.org> +Description: Fix linking with libsasldb.a when saslauthd is built with sasldb +support. +--- a/saslauthd/configure.in ++++ b/saslauthd/configure.in +@@ -77,7 +77,7 @@ if test "$authsasldb" != no; then + AC_DEFINE(AUTH_SASLDB,[],[Include SASLdb Support]) + SASL_DB_PATH_CHECK() + SASL_DB_CHECK() +- SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al" ++ SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.a" + fi + + AC_ARG_ENABLE(httpform, [ --enable-httpform enable HTTP form authentication [[no]] ], diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-service_keytabs.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-service_keytabs.patch new file mode 100644 index 000000000000..117e8eb88802 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-service_keytabs.patch @@ -0,0 +1,27 @@ +Bug #445932 +--- cmulocal/sasl2.m4 2011-09-02 12:58:00.000000000 +0000 ++++ cmulocal/sasl2.m4 2012-12-05 08:37:16.425811319 +0000 +@@ -268,7 +268,11 @@ + + cmu_save_LIBS="$LIBS" + LIBS="$LIBS $GSSAPIBASE_LIBS" +- AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity) ++ AC_CHECK_FUNCS([gsskrb5_register_acceptor_identity], [], ++ [AC_CHECK_FUNCS([krb5_gss_register_acceptor_identity], ++ [AC_CHECK_HEADERS([gssapi/gssapi_krb5.h], ++ [AC_DEFINE([HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY], [1])] ++ )])]) + AC_CHECK_FUNCS(gss_decapsulate_token) + AC_CHECK_FUNCS(gss_encapsulate_token) + AC_CHECK_FUNCS(gss_oid_equal) +--- plugins/gssapi.c 2012-12-05 09:03:31.000220161 +0000 ++++ plugins/gssapi.c 2012-12-05 09:01:55.043380204 +0000 +@@ -50,7 +50,7 @@ + #else + #include <gssapi/gssapi.h> + #endif +-#ifdef KRB5_HEIMDAL ++#if defined (KRB5_HEIMDAL) || defined (HAVE_GSSAPI_GSSAPI_KRB5_H) + #include <gssapi/gssapi_krb5.h> + #endif + diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-CVE-2013-4122.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-CVE-2013-4122.patch new file mode 100644 index 000000000000..09c9ce86c9ac --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-CVE-2013-4122.patch @@ -0,0 +1,116 @@ +From dedad73e5e7a75d01a5f3d5a6702ab8ccd2ff40d Mon Sep 17 00:00:00 2001 +From: mancha <mancha1@hush.com> +Date: Thu, 11 Jul 2013 09:08:07 +0000 +Subject: Handle NULL returns from glibc 2.17+ crypt() + +Starting with glibc 2.17 (eglibc 2.17), crypt() fails with EINVAL +(w/ NULL return) if the salt violates specifications. Additionally, +on FIPS-140 enabled Linux systems, DES/MD5-encrypted passwords +passed to crypt() fail with EPERM (w/ NULL return). + +When using glibc's crypt(), check return value to avoid a possible +NULL pointer dereference. + +Patch by mancha1@hush.com. +--- +diff --git a/pwcheck/pwcheck_getpwnam.c b/pwcheck/pwcheck_getpwnam.c +index 4b34222..400289c 100644 +--- a/pwcheck/pwcheck_getpwnam.c ++++ b/pwcheck/pwcheck_getpwnam.c +@@ -32,6 +32,7 @@ char *userid; + char *password; + { + char* r; ++ char* crpt_passwd; + struct passwd *pwd; + + pwd = getpwnam(userid); +@@ -41,7 +42,7 @@ char *password; + else if (pwd->pw_passwd[0] == '*') { + r = "Account disabled"; + } +- else if (strcmp(pwd->pw_passwd, crypt(password, pwd->pw_passwd)) != 0) { ++ else if (!(crpt_passwd = crypt(password, pwd->pw_passwd)) || strcmp(pwd->pw_passwd, (const char *)crpt_passwd) != 0) { + r = "Incorrect password"; + } + else { +diff --git a/pwcheck/pwcheck_getspnam.c b/pwcheck/pwcheck_getspnam.c +index 2b11286..6d607bb 100644 +--- a/pwcheck/pwcheck_getspnam.c ++++ b/pwcheck/pwcheck_getspnam.c +@@ -32,13 +32,15 @@ char *userid; + char *password; + { + struct spwd *pwd; ++ char *crpt_passwd; + + pwd = getspnam(userid); + if (!pwd) { + return "Userid not found"; + } + +- if (strcmp(pwd->sp_pwdp, crypt(password, pwd->sp_pwdp)) != 0) { ++ crpt_passwd = crypt(password, pwd->sp_pwdp); ++ if (!crpt_passwd || strcmp(pwd->sp_pwdp, (const char *)crpt_passwd) != 0) { + return "Incorrect password"; + } + else { +diff --git a/saslauthd/auth_getpwent.c b/saslauthd/auth_getpwent.c +index fc8029d..d4ebe54 100644 +--- a/saslauthd/auth_getpwent.c ++++ b/saslauthd/auth_getpwent.c +@@ -77,6 +77,7 @@ auth_getpwent ( + { + /* VARIABLES */ + struct passwd *pw; /* pointer to passwd file entry */ ++ char *crpt_passwd; /* encrypted password */ + int errnum; + /* END VARIABLES */ + +@@ -105,7 +106,8 @@ auth_getpwent ( + } + } + +- if (strcmp(pw->pw_passwd, (const char *)crypt(password, pw->pw_passwd))) { ++ crpt_passwd = crypt(password, pw->pw_passwd); ++ if (!crpt_passwd || strcmp(pw->pw_passwd, (const char *)crpt_passwd)) { + if (flags & VERBOSE) { + syslog(LOG_DEBUG, "DEBUG: auth_getpwent: %s: invalid password", login); + } +diff --git a/saslauthd/auth_shadow.c b/saslauthd/auth_shadow.c +index 677131b..1988afd 100644 +--- a/saslauthd/auth_shadow.c ++++ b/saslauthd/auth_shadow.c +@@ -210,8 +210,8 @@ auth_shadow ( + RETURN("NO Insufficient permission to access NIS authentication database (saslauthd)"); + } + +- cpw = strdup((const char *)crypt(password, sp->sp_pwdp)); +- if (strcmp(sp->sp_pwdp, cpw)) { ++ cpw = crypt(password, sp->sp_pwdp); ++ if (!cpw || strcmp(sp->sp_pwdp, (const char *)cpw)) { + if (flags & VERBOSE) { + /* + * This _should_ reveal the SHADOW_PW_LOCKED prefix to an +@@ -221,10 +221,8 @@ auth_shadow ( + syslog(LOG_DEBUG, "DEBUG: auth_shadow: pw mismatch: '%s' != '%s'", + sp->sp_pwdp, cpw); + } +- free(cpw); + RETURN("NO Incorrect password"); + } +- free(cpw); + + /* + * The following fields will be set to -1 if: +@@ -286,7 +284,7 @@ auth_shadow ( + RETURN("NO Invalid username"); + } + +- if (strcmp(upw->upw_passwd, crypt(password, upw->upw_passwd)) != 0) { ++ if (!(cpw = crypt(password, upw->upw_passwd)) || (strcmp(upw->upw_passwd, (const char *)cpw) != 0)) { + if (flags & VERBOSE) { + syslog(LOG_DEBUG, "auth_shadow: pw mismatch: %s != %s", + password, upw->upw_passwd); +-- +cgit v0.9.0.2 diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-canonuser-ldapdb-garbage-in-out-buffer.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-canonuser-ldapdb-garbage-in-out-buffer.patch new file mode 100644 index 000000000000..af382181e046 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-canonuser-ldapdb-garbage-in-out-buffer.patch @@ -0,0 +1,10 @@ +--- cyrus-sasl2.orig/plugins/ldapdb.c ++++ cyrus-sasl2/plugins/ldapdb.c +@@ -406,6 +406,7 @@ ldapdb_canon_server(void *glob_context, + if ( len > out_max ) + len = out_max; + memcpy(out, bvals[0]->bv_val, len); ++ out[len] = '\0'; + *out_ulen = len; + ber_bvecfree(bvals); + } 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; + } diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-missing-size_t.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-missing-size_t.patch new file mode 100644 index 000000000000..42f20fb8096b --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-missing-size_t.patch @@ -0,0 +1,13 @@ +Gentoo bug #458790 +--- include/sasl.h 2012-10-12 17:05:48.000000000 +0300 ++++ include/sasl.h 2013-02-23 16:56:44.648786268 +0200 +@@ -121,6 +121,9 @@ + #ifndef SASL_H + #define SASL_H 1 + ++/* stddef.h to get size_t defined */ ++#include <stddef.h> ++ + /* Keep in sync with win32/common.mak */ + #define SASL_VERSION_MAJOR 2 + #define SASL_VERSION_MINOR 1 diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-send-imap-logout.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-send-imap-logout.patch new file mode 100644 index 000000000000..d8b4b6efc3f8 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-send-imap-logout.patch @@ -0,0 +1,48 @@ +--- cyrus-sasl2.orig/saslauthd/auth_rimap.c ++++ cyrus-sasl2/saslauthd/auth_rimap.c +@@ -90,6 +90,7 @@ static struct addrinfo *ai = NULL; /* re + service we connect to. */ + #define TAG "saslauthd" /* IMAP command tag */ + #define LOGIN_CMD (TAG " LOGIN ") /* IMAP login command (with tag) */ ++#define LOGOUT_CMD (TAG " LOGOUT ") /* IMAP logout command (with tag)*/ + #define NETWORK_IO_TIMEOUT 30 /* network I/O timeout (seconds) */ + #define RESP_LEN 1000 /* size of read response buffer */ + +@@ -307,10 +308,12 @@ auth_rimap ( + int s=-1; /* socket to remote auth host */ + struct addrinfo *r; /* remote socket address info */ + struct iovec iov[5]; /* for sending LOGIN command */ ++ struct iovec iov2[2]; /* for sending LOGOUT command */ + char *qlogin; /* pointer to "quoted" login */ + char *qpass; /* pointer to "quoted" password */ + char *c; /* scratch pointer */ + int rc; /* return code scratch area */ ++ int rcl; /* return code scratch area */ + char rbuf[RESP_LEN]; /* response read buffer */ + char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV]; + int saved_errno; +@@ -505,6 +508,24 @@ auth_rimap ( + } + } + } ++ ++ /* close remote imap */ ++ iov2[0].iov_base = LOGOUT_CMD; ++ iov2[0].iov_len = sizeof(LOGOUT_CMD) - 1; ++ iov2[1].iov_base = "\r\n"; ++ iov2[1].iov_len = sizeof("\r\n") - 1; ++ ++ if (flags & VERBOSE) { ++ syslog(LOG_DEBUG, "auth_rimap: sending %s%s %s", ++ LOGOUT_CMD, qlogin, qpass); ++ } ++ alarm(NETWORK_IO_TIMEOUT); ++ rcl = retry_writev(s, iov2, 2); ++ alarm(0); ++ if (rcl == -1) { ++ syslog(LOG_WARNING, "auth_rimap: writev logout: %m"); ++ } ++ + (void) close(s); /* we're done with the remote */ + if (rc == -1) { + syslog(LOG_WARNING, "auth_rimap: read (response): %m"); diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl.conf b/dev-libs/cyrus-sasl/files/cyrus-sasl.conf new file mode 100644 index 000000000000..d4809f73c8e9 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl.conf @@ -0,0 +1 @@ +d /run/saslauthd 0755 root root - diff --git a/dev-libs/cyrus-sasl/files/java.README.gentoo b/dev-libs/cyrus-sasl/files/java.README.gentoo new file mode 100644 index 000000000000..fb73204ecab1 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/java.README.gentoo @@ -0,0 +1,39 @@ +4-Nov-2000 + +Note: this file has been modified to adapt to Gentoo specific. + +class files are installed in + +`java-config -p cyrus-sasl-2` + +to compile programs using it, do: + +javac -classpath $JAVA_HOME/lib/tools.jar:`java-config -p cyrus-sasl-2` <file>.java + +(make sure to substitute your JDK for $JAVA_HOME/lib/tools.jar) + +to run, do + +java -classpath <same path as above> <YourProgram> + +---------------------------- +This is a java version of the SASL libraries. It supports all the +mechanisms in the C version and conforms to the internet draft in the +doc/ directory. JNI is used. + +Sample applications exist in the Test/ directory. + +They generally can be run with something like: + +java -debug -classpath +../:$JAVA_HOME/lib/tools.jar:`java-config -p cyrus-sasl-2`:. jimtest -p 2143 -m +KERBEROS_V4 cyrus-dev + +and + +java -debug -classpath +../:$JAVA_HOME/lib/tools.jar:`java-config -p cyrus-sasl-2`:. testserver + + +Any feedback is welcome. + diff --git a/dev-libs/cyrus-sasl/files/pwcheck.rc6 b/dev-libs/cyrus-sasl/files/pwcheck.rc6 new file mode 100644 index 000000000000..7b43c4ea154b --- /dev/null +++ b/dev-libs/cyrus-sasl/files/pwcheck.rc6 @@ -0,0 +1,20 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need localmount + use logger +} + +start() { + ebegin "Starting sasl pwcheck daemon" + start-stop-daemon --start --quiet --exec /usr/sbin/pwcheck + eend $? +} + +stop() { + ebegin "Stopping sasl pwcheck daemon" + start-stop-daemon --stop --quiet --exec /usr/sbin/pwcheck + eend $? +} diff --git a/dev-libs/cyrus-sasl/files/pwcheck.service b/dev-libs/cyrus-sasl/files/pwcheck.service new file mode 100644 index 000000000000..74ff4859abf7 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/pwcheck.service @@ -0,0 +1,9 @@ +[Unit] +Description=SASL pwcheck daemon + +[Service] +Type=forking +ExecStart=/usr/sbin/pwcheck + +[Install] +WantedBy=multi-user.target diff --git a/dev-libs/cyrus-sasl/files/saslauthd-2.1.26.conf b/dev-libs/cyrus-sasl/files/saslauthd-2.1.26.conf new file mode 100644 index 000000000000..dd487b0edaf1 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/saslauthd-2.1.26.conf @@ -0,0 +1,19 @@ +# Config file for /etc/init.d/saslauthd and systemd unit + +# PLEASE READ THIS IF YOU ARE USING SYSTEMD +# Please note that systemd does not expand shell variables +# thus, something like FOO="${FOO} bar" won't work. + +# Specify the authentications mechanism. +# **NOTE** For a list see: saslauthd -v +# Since 2.1.19, add "-r" to options for old behavior, +# ie. reassemble user and realm to user@realm form. +# +# Specify the hostname for remote IMAP server using: +# "-O localhost". +# Specify the number of worker processes to create using: +# "-n <N>". +# Enable credential cache, set cache size and timeout using: +# "-c -s <cache size, like 128> -t <timeout seconds>". +# +SASLAUTHD_OPTS="-a pam" diff --git a/dev-libs/cyrus-sasl/files/saslauthd.pam-include b/dev-libs/cyrus-sasl/files/saslauthd.pam-include new file mode 100644 index 000000000000..d50a84946a78 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/saslauthd.pam-include @@ -0,0 +1,8 @@ +#%PAM-1.0 + +auth required pam_nologin.so +auth include system-auth + +account include system-auth + +session include system-auth diff --git a/dev-libs/cyrus-sasl/files/saslauthd.service b/dev-libs/cyrus-sasl/files/saslauthd.service new file mode 100644 index 000000000000..1609a651e4e0 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/saslauthd.service @@ -0,0 +1,13 @@ +[Unit] +Description=SASL Authentication Daemon + +[Service] +Type=forking +PIDFile=/run/saslauthd/saslauthd.pid +EnvironmentFile=/etc/conf.d/saslauthd +ExecStart=/usr/sbin/saslauthd $SASLAUTHD_OPTS +ExecStop=/bin/kill -15 $MAINPID +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/dev-libs/cyrus-sasl/files/saslauthd2.rc7 b/dev-libs/cyrus-sasl/files/saslauthd2.rc7 new file mode 100644 index 000000000000..0abeaf6f5702 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/saslauthd2.rc7 @@ -0,0 +1,20 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +start() { + ebegin "Starting saslauthd" + start-stop-daemon --start --quiet --exec /usr/sbin/saslauthd \ + -- ${SASLAUTHD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping saslauthd" + start-stop-daemon --stop --quiet --pidfile /run/saslauthd/saslauthd.pid + eend $? +} diff --git a/dev-libs/cyrus-sasl/metadata.xml b/dev-libs/cyrus-sasl/metadata.xml new file mode 100644 index 000000000000..d50ec8da4624 --- /dev/null +++ b/dev-libs/cyrus-sasl/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>net-mail@gentoo.org</email> + <name>Net-Mail</name> +</maintainer> +<use> + <flag name="authdaemond">Add Courier-IMAP authdaemond unix socket + support (<pkg>net-mail/courier-imap</pkg>, <pkg>mail-mta/courier</pkg>) + </flag> + <flag name="openldap">Add ldap support for saslauthd</flag> + <flag name="ldapdb">Enable ldapdb plugin</flag> + <flag name="sample">Enable sample client and server</flag> + <flag name="srp">Enable SRP authentication</flag> + <flag name="urandom">Use /dev/urandom instead of /dev/random</flag> +</use> +</pkgmetadata> |