From d37b97a25b8b10f748eead6574b01f893f140b01 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 6 Dec 2017 18:23:20 +0000 Subject: gentoo resync : 06.12.2017 --- app-crypt/mit-krb5/Manifest | 2 + .../files/mit-krb5-1.15.2-fix-pkinit.patch | 98 ++++++++++++++ app-crypt/mit-krb5/mit-krb5-1.15.2-r1.ebuild | 149 +++++++++++++++++++++ 3 files changed, 249 insertions(+) create mode 100644 app-crypt/mit-krb5/files/mit-krb5-1.15.2-fix-pkinit.patch create mode 100644 app-crypt/mit-krb5/mit-krb5-1.15.2-r1.ebuild (limited to 'app-crypt/mit-krb5') diff --git a/app-crypt/mit-krb5/Manifest b/app-crypt/mit-krb5/Manifest index 9c9e7306aee1..a6153e61fcf5 100644 --- a/app-crypt/mit-krb5/Manifest +++ b/app-crypt/mit-krb5/Manifest @@ -2,6 +2,7 @@ AUX kpropd.xinetd 194 BLAKE2B cfc40af2e75b0ce5a71e0dfdcfe076d13d996b25d2cb50d428 AUX mit-krb5-1.12_warn_cflags.patch 448 BLAKE2B cd9793866173b394bab3497d19653ca3296924cc49aaf540499b149254265af1d995b4d7493b76185ce35d123e70827cb5fcb221efc6499b86a346cfad7478ab SHA512 42364d9cd8c0a6fd28ae661eeac4d0dd3f2001fe290bf9731ee99c2c786a6488805fc93057d59e201e2cef1e5280af4c170187aa5603f4cf542906abc0fccc2b AUX mit-krb5-1.14.2-redeclared-ttyname.patch 660 BLAKE2B 8fb59ad5ed7b0896272f4bf10e8e15a1c848047dbe6a7735930657422888530691f681949d72b4b0924a8983ec392282736eae57dd72c8548ee960fc85909c53 SHA512 90a2adedcdca4e2079daaa613e2d4f08e948ccfaf56aba19a08b4cbe2257a6a60dcfd5bbc4b19ca64f584759b1a374d1894729a423e636bfec1969a675a1628e AUX mit-krb5-1.14.4-disable-nls.patch 1247 BLAKE2B a24c425a21bed40c7b563658207f324d1dccade9b8aec4d4124e2a2d0007d81e314765d23fe3e4be2bf857fa67bf3da06aead99ffb21afe635bbb1d7bb2c89cf SHA512 5fecc719c5c8a1f5c971443d42561615b8fb8c6b99b735a633c7479f109cfb6852eee5179e267a1e2576e52faf2311395ddabdb47f749b573ead3ddd86714e2e +AUX mit-krb5-1.15.2-fix-pkinit.patch 3196 BLAKE2B 6fdf17bb1ad096bc2745c3c908fbc913de3d4d7176c060cb51d911b256e82f67a73d9204044f5227c7d3d1cb1f76dbc31b2845738c4f97dd0a199990a9e09f0f SHA512 d7b3f33f25e610b24f2854892d75016dfa5b5e34fac24600df80b91194f5fe2e6dbc35ea3a9a772e0dcdf7659263a56230e767fe393d32796c61b3bd5bb2de69 AUX mit-krb5-config_LDFLAGS.patch 466 BLAKE2B 2dd4f1cfc20bea229d08201d66e3de71472dccfa45dee9b260c51578187e706b864c0b4ff81c0c5a09fd29401c2abdbe334441ca075208299b02d5e1d49aff94 SHA512 9a1ca9b33e7708346eda78d199fdc51f0d7bd08d3d65ea15a19955a6155ab71b8ee0c8989859d6dff293a141f197ea19394a91b3b641181140a289b743e0f0e7 AUX mit-krb5kadmind.confd 76 BLAKE2B ca69357a77ddaf67e2f9c104b17d49af5da9891b13bd855f8b04d54bfb6ccf07ae8c5cb694f65a47646675c844c8f8c7224e8487081df678c73c554498259516 SHA512 dbf968800959f0463899031e823f003e9ece90132f452ebf03df08caf0e6a6e6ca2cfdee91491d269cfa24bef19e72dd33c7d818a4bb13ef85edfb6f0e8299f3 AUX mit-krb5kadmind.initd-r2 612 BLAKE2B ba2a70a7c123d63b9c58f4ec31c3c2366949e6971ff4f203cb38e1efb5a69991533291e118066e680d880c5221168c8eb5b047ec70dac857888330978d1e5a9b SHA512 3791af603380277a9d2632a01a86f96f68c9eb38a2c9574cca462fe9a01bef60f24785051d0215a8d71dd5022f1404e281929278e2bfd31603a0415dd9df6a98 @@ -10,5 +11,6 @@ AUX mit-krb5kdc.initd-r2 572 BLAKE2B f9115cc452891e1267268df6d4beb7eeb69ec27edc9 AUX mit-krb5kpropd.confd 84 BLAKE2B e3f47a3c520af14794c2fe11368651ba56e8aa059babb91b3112af9682403a6409b3fb39ed6313f9cd87169c3754e4c4fc17bc24b0b773cfdf01e7df3eb03490 SHA512 afd1cf21a6afd3bc73b1ef3cb0a26ec3420b26ed31196f8c092ae880b235043273c95e2ecb3b88e65ea008cd8ea6a10553d1966f45646cf5993d5752dfc945ac AUX mit-krb5kpropd.initd-r2 608 BLAKE2B 9737f5ff711b8e30444c14ca871e01f2c45e9aecdab99d3dcfd8c16bae65ed05fc732f2007c65f0abfab10cf766035c03c557d217f750ab06f804b639722b27e SHA512 28b9d9bc9d132d8bd87d5fd9e74103d4772f26cba48d28ad53f40ade037a5ac91e07c01aa3180d50c3624673bf4e534f76689b03feb4888cdd9198755576b6a7 DIST krb5-1.15.2.tar.gz 9380755 BLAKE2B 3f5d00a70bf44ef077872bde282e4753e82acb70632e136b8f9f8d3a192e3e7b692840803e5a3f67ddb202d53631767ea9eb8b7615d45a3479389a01a6390ac4 SHA512 e5814bb66384b13637c37918df694c6b9933c29c2d952da0ed0dcd2e623b269060b4c16b6c02162039dadebdab99ff1085e37e7621ae4748dafb036424e612c2 +EBUILD mit-krb5-1.15.2-r1.ebuild 3920 BLAKE2B 4874c8516130a6ff27fc03aef15e0cb2a5fce3b8580d0797846da422a54615234097e6d25e4272ade5624136c84489d32416718d59595317c5522e68eee51389 SHA512 f44f5e7a2fc57156b23d4e91541d8fcf7b644eb0f4b293292a97bf690b93e2f379e070b1b9d31db72bb2af799afeea8b0ccc5e5f53c4d29f449ff76e0f9a22bb EBUILD mit-krb5-1.15.2.ebuild 3855 BLAKE2B fa45466eeb8cc35048b654d10a997fb85d35a004e51de910a6ce2b0c239c88b9048837ce81abf8a00b867d6278cb7f6f082fc9c63ffe9e74522668e79c664c64 SHA512 e80bd080eea92ccdc0c475bdc02fc5eed67af1168c98095782233a55524404e0e210c598bf19f999777a334682b717b76e767c11954d7710c405434d5154a927 MISC metadata.xml 828 BLAKE2B f317440eac9d164e0640cb059dee0c3bdcfeaeb2d0e346d962f09b7152224efc10084611768663b84c67fdf73c9d89481370fe0b70ffe14aa10a360f60bd00f6 SHA512 c0f45699280d49b91eab24de6cbb28900170c3c4526b8c6ef0f6a996d3e53abd49911ce4f6ce7b28c69d37e86cc9e5b830977b9640809734e7fccf078886685c diff --git a/app-crypt/mit-krb5/files/mit-krb5-1.15.2-fix-pkinit.patch b/app-crypt/mit-krb5/files/mit-krb5-1.15.2-fix-pkinit.patch new file mode 100644 index 000000000000..4f721d4d9616 --- /dev/null +++ b/app-crypt/mit-krb5/files/mit-krb5-1.15.2-fix-pkinit.patch @@ -0,0 +1,98 @@ +diff --git a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c +index 74fffbf321..4b86a6f302 100644 +--- a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c ++++ b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c +@@ -5145,33 +5145,29 @@ crypto_retieve_X509_key_usage(krb5_context context, + return retval; + } + +-/* +- * Return a string format of an X509_NAME in buf where +- * size is an in/out parameter. On input it is the size +- * of the buffer, and on output it is the actual length +- * of the name. +- * If buf is NULL, returns the length req'd to hold name +- */ +-static char * +-X509_NAME_oneline_ex(X509_NAME * a, +- char *buf, +- unsigned int *size, +- unsigned long flag) ++static krb5_error_code ++rfc2253_name(X509_NAME *name, char **str_out) + { +- BIO *out = NULL; ++ BIO *b = NULL; ++ char *str; + +- out = BIO_new(BIO_s_mem ()); +- if (X509_NAME_print_ex(out, a, 0, flag) > 0) { +- if (buf != NULL && (*size) > (unsigned int) BIO_number_written(out)) { +- memset(buf, 0, *size); +- BIO_read(out, buf, (int) BIO_number_written(out)); +- } +- else { +- *size = BIO_number_written(out); +- } +- } +- BIO_free(out); +- return (buf); ++ *str_out = NULL; ++ b = BIO_new(BIO_s_mem()); ++ if (b == NULL) ++ return ENOMEM; ++ if (X509_NAME_print_ex(b, name, 0, XN_FLAG_SEP_COMMA_PLUS) < 0) ++ goto error; ++ str = calloc(BIO_number_written(b) + 1, 1); ++ if (str == NULL) ++ goto error; ++ BIO_read(b, str, BIO_number_written(b)); ++ BIO_free(b); ++ *str_out = str; ++ return 0; ++ ++error: ++ BIO_free(b); ++ return ENOMEM; + } + + /* +@@ -5187,8 +5183,6 @@ crypto_cert_get_matching_data(krb5_context context, + krb5_principal *pkinit_sans =NULL, *upn_sans = NULL; + struct _pkinit_cert_data *cd = (struct _pkinit_cert_data *)ch; + unsigned int i, j; +- char buf[DN_BUF_LEN]; +- unsigned int bufsize = sizeof(buf); + + if (cd == NULL || cd->magic != CERT_MAGIC) + return EINVAL; +@@ -5201,23 +5195,14 @@ crypto_cert_get_matching_data(krb5_context context, + + md->ch = ch; + +- /* get the subject name (in rfc2253 format) */ +- X509_NAME_oneline_ex(X509_get_subject_name(cd->cred->cert), +- buf, &bufsize, XN_FLAG_SEP_COMMA_PLUS); +- md->subject_dn = strdup(buf); +- if (md->subject_dn == NULL) { +- retval = ENOMEM; ++ retval = rfc2253_name(X509_get_subject_name(cd->cred->cert), ++ &md->subject_dn); ++ if (retval) + goto cleanup; +- } +- +- /* get the issuer name (in rfc2253 format) */ +- X509_NAME_oneline_ex(X509_get_issuer_name(cd->cred->cert), +- buf, &bufsize, XN_FLAG_SEP_COMMA_PLUS); +- md->issuer_dn = strdup(buf); +- if (md->issuer_dn == NULL) { +- retval = ENOMEM; ++ retval = rfc2253_name(X509_get_issuer_name(cd->cred->cert), ++ &md->issuer_dn); ++ if (retval) + goto cleanup; +- } + + /* get the san data */ + retval = crypto_retrieve_X509_sans(context, cd->plgctx, cd->reqctx, diff --git a/app-crypt/mit-krb5/mit-krb5-1.15.2-r1.ebuild b/app-crypt/mit-krb5/mit-krb5-1.15.2-r1.ebuild new file mode 100644 index 000000000000..1f9cfda94660 --- /dev/null +++ b/app-crypt/mit-krb5/mit-krb5-1.15.2-r1.ebuild @@ -0,0 +1,149 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +inherit autotools flag-o-matic multilib-minimal python-any-r1 versionator + +MY_P="${P/mit-}" +P_DIR=$(get_version_component_range 1-2) +DESCRIPTION="MIT Kerberos V" +HOMEPAGE="http://web.mit.edu/kerberos/www/" +SRC_URI="http://web.mit.edu/kerberos/dist/krb5/${P_DIR}/${MY_P}.tar.gz" + +LICENSE="openafs-krb5-a BSD MIT OPENLDAP BSD-2 HPND BSD-4 ISC RSA CC-BY-SA-3.0 || ( BSD-2 GPL-2+ )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="doc +keyutils libressl nls openldap +pkinit selinux +threads test xinetd" + +CDEPEND=" + !!app-crypt/heimdal + >=sys-libs/e2fsprogs-libs-1.42.9[${MULTILIB_USEDEP}] + || ( + >=dev-libs/libverto-0.2.5[libev,${MULTILIB_USEDEP}] + >=dev-libs/libverto-0.2.5[libevent,${MULTILIB_USEDEP}] + >=dev-libs/libverto-0.2.5[tevent,${MULTILIB_USEDEP}] + ) + keyutils? ( >=sys-apps/keyutils-1.5.8[${MULTILIB_USEDEP}] ) + openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] ) + pkinit? ( + !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] ) + libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] ) + ) + xinetd? ( sys-apps/xinetd ) + abi_x86_32? ( + !<=app-emulation/emul-linux-x86-baselibs-20140508-r1 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] + )" +DEPEND="${CDEPEND} + ${PYTHON_DEPS} + virtual/yacc + doc? ( virtual/latex-base ) + test? ( + ${PYTHON_DEPS} + dev-lang/tcl:0 + dev-util/dejagnu + )" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-kerberos )" + +S=${WORKDIR}/${MY_P}/src + +MULTILIB_CHOST_TOOLS=( + /usr/bin/krb5-config +) + +src_prepare() { + eapply "${FILESDIR}/${PN}-1.12_warn_cflags.patch" + eapply -p2 "${FILESDIR}/${PN}-config_LDFLAGS.patch" + eapply -p0 "${FILESDIR}/${PN}-1.14.2-redeclared-ttyname.patch" + eapply "${FILESDIR}/${PN}-1.14.4-disable-nls.patch" + eapply -p2 "${FILESDIR}/${PN}-1.15.2-fix-pkinit.patch" + + # Make sure we always use the system copies. + rm -rf util/{et,ss,verto} + sed -i 's:^[[:space:]]*util/verto$::' configure.in || die + + eapply_user + eautoreconf +} + +src_configure() { + # QA + append-flags -fno-strict-aliasing + append-flags -fno-strict-overflow + + multilib-minimal_src_configure +} + +multilib_src_configure() { + use keyutils || export ac_cv_header_keyutils_h=no + ECONF_SOURCE=${S} \ + WARN_CFLAGS="set" \ + econf \ + $(use_with openldap ldap) \ + "$(multilib_native_use_with test tcl "${EPREFIX}/usr")" \ + $(use_enable nls) \ + $(use_enable pkinit) \ + $(use_enable threads thread-support) \ + --without-hesiod \ + --enable-shared \ + --with-system-et \ + --with-system-ss \ + --enable-dns-for-realm \ + --enable-kdc-lookaside-cache \ + --with-system-verto \ + --disable-rpath +} + +multilib_src_compile() { + emake -j1 +} + +multilib_src_test() { + multilib_is_native_abi && emake -j1 check +} + +multilib_src_install() { + emake \ + DESTDIR="${D}" \ + EXAMPLEDIR="${EPREFIX}/usr/share/doc/${PF}/examples" \ + install +} + +multilib_src_install_all() { + # default database dir + keepdir /var/lib/krb5kdc + + cd .. + dodoc README + + if use doc; then + dodoc -r doc/html + docinto pdf + dodoc doc/pdf/*.pdf + fi + + newinitd "${FILESDIR}"/mit-krb5kadmind.initd-r2 mit-krb5kadmind + newinitd "${FILESDIR}"/mit-krb5kdc.initd-r2 mit-krb5kdc + newinitd "${FILESDIR}"/mit-krb5kpropd.initd-r2 mit-krb5kpropd + newconfd "${FILESDIR}"/mit-krb5kadmind.confd mit-krb5kadmind + newconfd "${FILESDIR}"/mit-krb5kdc.confd mit-krb5kdc + newconfd "${FILESDIR}"/mit-krb5kpropd.confd mit-krb5kpropd + + insinto /etc + newins "${ED}/usr/share/doc/${PF}/examples/krb5.conf" krb5.conf.example + insinto /var/lib/krb5kdc + newins "${ED}/usr/share/doc/${PF}/examples/kdc.conf" kdc.conf.example + + if use openldap ; then + insinto /etc/openldap/schema + doins "${S}/plugins/kdb/ldap/libkdb_ldap/kerberos.schema" + fi + + if use xinetd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}/kpropd.xinetd" kpropd + fi +} -- cgit v1.2.3