From 623ee73d661e5ed8475cb264511f683407d87365 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 12 Apr 2020 03:41:30 +0100 Subject: gentoo Easter resync : 12.04.2020 --- app-admin/sudo/Manifest | 15 +- .../sudo-1.8.28-no_pam_error_message_fix.patch | 46 ---- app-admin/sudo/sudo-1.8.28_p1-r2.ebuild | 267 --------------------- app-admin/sudo/sudo-1.8.29-r2.ebuild | 267 --------------------- app-admin/sudo/sudo-1.8.30.ebuild | 263 -------------------- app-admin/sudo/sudo-1.8.31.ebuild | 2 +- app-admin/sudo/sudo-1.8.31_p1.ebuild | 263 ++++++++++++++++++++ app-admin/sudo/sudo-1.9.0_rc2.ebuild | 259 ++++++++++++++++++++ app-admin/sudo/sudo-9999.ebuild | 42 ++-- 9 files changed, 548 insertions(+), 876 deletions(-) delete mode 100644 app-admin/sudo/files/sudo-1.8.28-no_pam_error_message_fix.patch delete mode 100644 app-admin/sudo/sudo-1.8.28_p1-r2.ebuild delete mode 100644 app-admin/sudo/sudo-1.8.29-r2.ebuild delete mode 100644 app-admin/sudo/sudo-1.8.30.ebuild create mode 100644 app-admin/sudo/sudo-1.8.31_p1.ebuild create mode 100644 app-admin/sudo/sudo-1.9.0_rc2.ebuild (limited to 'app-admin/sudo') diff --git a/app-admin/sudo/Manifest b/app-admin/sudo/Manifest index dc044dcdec79..72a5e1279ea9 100644 --- a/app-admin/sudo/Manifest +++ b/app-admin/sudo/Manifest @@ -1,11 +1,8 @@ -AUX sudo-1.8.28-no_pam_error_message_fix.patch 1405 BLAKE2B 924c8be80bbbe75e1f3fbd9c598d91a02bd4a2c26efd8936c018d54f99977f0c64351f07a9fa5c6bffd52374accb143360da68c9a70eda0b16cf4019b419cb47 SHA512 9afcfc841635d5bcf67da292a205633fd7b4202d007dd3992e6e69ce98feb0cd5c8ebcd646ea8b46cdafad59779ae41dc3593b13ad35f9017e6c0c2cdc20ed2d -DIST sudo-1.8.28p1.tar.gz 3310254 BLAKE2B a1810af7a42d05cce49bb9d0acf6f3731a5193e9e9c3b458691379131eb86d36995854d11c09525e8d999ed1da7e99cf170634667c5a444aa522b8f23db7d1aa SHA512 bda3de34c15fbb68fc29759542295560ccc1562b419d03709cea51613937e9b92ba689c79c3ef4858aeea90d3d1a4dc0148225b11b22cf82395ae1bad8cb1734 -DIST sudo-1.8.29.tar.gz 3338260 BLAKE2B 7ba29d155bfb1d7ba20e32ade2e8ee3919e70400b6c235e313052b247b48406b9a051e71daa7e47fdb0a9fd0889f4c05b8a1a170c027503b90081e8cec81660e SHA512 ea780922b2afb47df4df4b533fb355fd916cb18a6bfd13c7ca36a25b03ef585d805648c6fa85692bea363b1f83664ac3bc622f99bcd149b3a86f70522eb4d340 -DIST sudo-1.8.30.tar.gz 3349455 BLAKE2B 5e0aaa41f42c18cd0de473add3665adf797cd37eacfb4abfc9472814ea679c1e88e28e95e13a73eb7d9648174609d80a2d4eccf3bdf87a44186df07aeba60eee SHA512 d44831feabd92d736614239e0e0f086829d84b213c98524fffb4b926a96715b1156538a7ab5e0b6e0db8be67a6e24a1642b3648105b076d23b58c39d0dd947af DIST sudo-1.8.31.tar.gz 3350674 BLAKE2B de5a968732fdd58933b4c513d13c43a08cb50075a00c3e0d338c9892570a416a2b3a8f19940c0893715f4eeab991e804831a87ef656ffd91e7f1ba047c119261 SHA512 b9e408a322938c7a712458e9012d8a5f648fba5b23a5057cf5d8372c7f931262595f1575c32c32b9cb1a04af670ff4611e7df48d197e5c4cc038d6b65439a28a -EBUILD sudo-1.8.28_p1-r2.ebuild 6944 BLAKE2B 483a62064d6ace45693a5178b5f580f600549732293e0dd46ad8b33a4a58019cad15fe6fc250778ede05b771a2f691fc2215c9495eb135b5d73874b009a964b6 SHA512 23b58e7763f9ecc952bbd95666b8b8feb59625d7ac9de40315d165682b56a5670cd47b3a2be9cd235492a4e1ed558a935b1c1cd1979d7261d11d676ebecd1104 -EBUILD sudo-1.8.29-r2.ebuild 6956 BLAKE2B 4065346eafcaf93f22182bb168b5ed753e65a59f2d5469c48883d19c962bd4754cff648d10bdd404d0ba846f74944670c194ad5740edcaafb605a596d214f664 SHA512 c034ce70c59e5d1bd51b1f9514aa410e372ad987776ec4447b368448770a677b548fd8aec27477f2e0c64ba050617714489f7406977e4cb762b9a14c815affb6 -EBUILD sudo-1.8.30.ebuild 6876 BLAKE2B 8115b04d517ffce1527c8d5672702623ce7d22345617a0bdacd8b67219040f651563e3cd973497a0383a65045757e7a4c3d3d483bf024e52edc0dbcb75030286 SHA512 2b894667bf8fb198561c3c7a02ce9b9501aabd142f1da2563b84ea512a63d39a6a014d7a2d46dca2d87a55721f687d24aa28dcf67ca2db9f643f65fd0dc57da8 -EBUILD sudo-1.8.31.ebuild 6876 BLAKE2B 8115b04d517ffce1527c8d5672702623ce7d22345617a0bdacd8b67219040f651563e3cd973497a0383a65045757e7a4c3d3d483bf024e52edc0dbcb75030286 SHA512 2b894667bf8fb198561c3c7a02ce9b9501aabd142f1da2563b84ea512a63d39a6a014d7a2d46dca2d87a55721f687d24aa28dcf67ca2db9f643f65fd0dc57da8 -EBUILD sudo-9999.ebuild 6876 BLAKE2B 3fa9af915033ac10e6cf54880b64df0dadf7fa30ccf85d34fafa1c9fbc57cc187f7820086f242d90733583c79e82a50f336b9bdb9b21b98e72b2c377f6e550af SHA512 5efb6786e9d56e0b6b6f48fd4d25b24327772ce2b2ee0af366d73d67387f959159a83b66c2421e6a919b088d8143e3396f64423200bdfbb28a38e69043de0c7c +DIST sudo-1.8.31p1.tar.gz 3351312 BLAKE2B 85775ef574a3a1a9cc749809fe81f8350f7a4e3f46a905bc3392790b20bb7bc8e3c99fb504e01776f3a92aa6afa7972d3ff1c071aadd3a08ee1d2281f8b9ba50 SHA512 9344fd1d8a8445e8afb9c5628cdc832fe32ea29199f071f35fb6ec694371801556df560f4382afec199f468b1f3264ad5e3a89e964612e571b8d911f823724cc +DIST sudo-1.9.0rc2.tar.gz 3722476 BLAKE2B 490ecc4604c242a09d98bd1da3bb46c977f22d308d269a99c858f77576934e7d2fc27cd641bcca67323f74165eadbc6e63064e63759ba0e1d4a743b14b701bd7 SHA512 a68bd37e0d848dba1ea9e48313a3cac5153ea1be7635a1f5a342f245c183b486f2868f9217d2667dafed9d504a1442239c3a434b2bab2ff109aac980815e53fa +EBUILD sudo-1.8.31.ebuild 6862 BLAKE2B 3fd57062538cee9e3cfc9fdcdd1523ce872e021af01273c23a42c638de76c48c10f3cab832189698ab7f25f2ca1207bb77909b69bea70b9392f3e7fb9a50748d SHA512 a09ee24eadc14cd136bb23d2bd0c1f8b9f8fcdefb3020ddff73fa5741fda29536fb0b5c91c44d9c9a8dfeef924426fa87884f15b81a67c9432f343950ece6b42 +EBUILD sudo-1.8.31_p1.ebuild 6872 BLAKE2B df4b0b8974bebc5683f9e1e1331c1e25f8c2dea63bd8162a3906dda75c92197a35007d3fb3fb257cee91643918be81222cf0141ab13f28a3a789c0c96053cc1b SHA512 688162c59941c57261c7a15726bb5a368bbc40a990c98d18d7d46f67fd0aef3f1a332703a79691f0c133af0202beeaf0af1e8249a8ab6fad0879899698f40f89 +EBUILD sudo-1.9.0_rc2.ebuild 6818 BLAKE2B 7e4ab79b53a510067f52d4082ba38331b12083104b61c53d737d701ed1edd7150d7dd4302b42bd958175307fb0374496bd41a4ab683f363fb94e9dd8fcd12944 SHA512 4e1ab7142549eab298f1ef450877789d405c425abf9e13cf8b739c1805ed1c71a0bd2651273a928b57e113bbcb73734af754b730d4cd114c905651e3b1633296 +EBUILD sudo-9999.ebuild 6818 BLAKE2B 7e4ab79b53a510067f52d4082ba38331b12083104b61c53d737d701ed1edd7150d7dd4302b42bd958175307fb0374496bd41a4ab683f363fb94e9dd8fcd12944 SHA512 4e1ab7142549eab298f1ef450877789d405c425abf9e13cf8b739c1805ed1c71a0bd2651273a928b57e113bbcb73734af754b730d4cd114c905651e3b1633296 MISC metadata.xml 1379 BLAKE2B 3fb47838664544236c2c5ce55ba77cda8fdef3ff1bd050a775878444040c76ec1d18fecd7ecbcc11121c90e76e9634f4c01da676dc178dbc7787b9250774e28a SHA512 81def82cf20eb6a57d38a1cced2fef18f5f5b56b6bb92a036cf925dec1c1b77f18e3c7b5997f4055ce840873032df65edae08810e6838bb0ab6309020a4a30d6 diff --git a/app-admin/sudo/files/sudo-1.8.28-no_pam_error_message_fix.patch b/app-admin/sudo/files/sudo-1.8.28-no_pam_error_message_fix.patch deleted file mode 100644 index 6931ea26c3b5..000000000000 --- a/app-admin/sudo/files/sudo-1.8.28-no_pam_error_message_fix.patch +++ /dev/null @@ -1,46 +0,0 @@ - -# HG changeset patch -# User Todd C. Miller -# Date 1573059314 25200 -# Node ID f85ff5ee2caf19cefca67ae49c1d6048d61125cb -# Parent 5cdcfd9a6c33a157a12f1b1893e397c3198b206b -Do not warn about a missing /etc/environment file on Linux without PAM. -Bug #907 - -diff -r 5cdcfd9a6c33 -r f85ff5ee2caf plugins/sudoers/env.c ---- a/plugins/sudoers/env.c Tue Nov 05 15:18:34 2019 -0700 -+++ b/plugins/sudoers/env.c Wed Nov 06 09:55:14 2019 -0700 -@@ -940,7 +940,8 @@ - #endif /* HAVE_LOGIN_CAP_H */ - #if defined(_AIX) || (defined(__linux__) && !defined(HAVE_PAM)) - /* Insert system-wide environment variables. */ -- read_env_file(_PATH_ENVIRONMENT, true, false); -+ if (!read_env_file(_PATH_ENVIRONMENT, true, false)) -+ sudo_warn("%s", _PATH_ENVIRONMENT); - #endif - for (ep = env.envp; *ep; ep++) - env_update_didvar(*ep, &didvar); -@@ -1218,8 +1219,10 @@ - efl = calloc(1, sizeof(*efl)); - if (efl != NULL) { - if ((efl->fp = fopen(path, "r")) == NULL) { -- free(efl); -- efl = NULL; -+ if (errno != ENOENT) { -+ free(efl); -+ efl = NULL; -+ } - } - } - debug_return_ptr(efl); -@@ -1259,6 +1262,9 @@ - debug_decl(env_file_next_local, SUDOERS_DEBUG_ENV) - - *errnum = 0; -+ if (efl->fp == NULL) -+ debug_return_ptr(NULL); -+ - for (;;) { - if (sudo_parseln(&efl->line, &efl->linesize, NULL, efl->fp, PARSELN_CONT_IGN) == -1) { - if (!feof(efl->fp)) - diff --git a/app-admin/sudo/sudo-1.8.28_p1-r2.ebuild b/app-admin/sudo/sudo-1.8.28_p1-r2.ebuild deleted file mode 100644 index e43a49df1202..000000000000 --- a/app-admin/sudo/sudo-1.8.28_p1-r2.ebuild +++ /dev/null @@ -1,267 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit pam multilib libtool tmpfiles - -MY_P="${P/_/}" -MY_P="${MY_P/beta/b}" - -DESCRIPTION="Allows users or groups to run commands as other users" -HOMEPAGE="https://www.sudo.ws/" -if [[ ${PV} == "9999" ]] ; then - inherit mercurial - EHG_REPO_URI="https://www.sudo.ws/repos/sudo" -else - uri_prefix= - case ${P} in - *_beta*|*_rc*) uri_prefix=beta/ ;; - esac - - SRC_URI="https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz - ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz" - if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-solaris" - fi -fi - -# Basic license is ISC-style as-is, some files are released under -# 3-clause BSD license -LICENSE="ISC BSD" -SLOT="0" -IUSE="gcrypt ldap libressl nls offensive pam sasl +secure-path selinux +sendmail skey sssd system-digest" - -DEPEND=" - sys-libs/zlib:= - ldap? ( - >=net-nds/openldap-2.1.30-r1 - sasl? ( - dev-libs/cyrus-sasl - net-nds/openldap[sasl] - ) - ) - pam? ( sys-libs/pam ) - sasl? ( dev-libs/cyrus-sasl ) - skey? ( >=sys-auth/skey-1.1.5-r1 ) - sssd? ( sys-auth/sssd[sudo] ) - system-digest? ( - gcrypt? ( dev-libs/libgcrypt:= ) - !gcrypt? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) - ) - ) -" -RDEPEND=" - ${DEPEND} - >=app-misc/editor-wrapper-3 - virtual/editor - ldap? ( dev-lang/perl ) - pam? ( sys-auth/pambase ) - selinux? ( sec-policy/selinux-sudo ) - sendmail? ( virtual/mta ) -" -BDEPEND=" - sys-devel/bison -" - -S="${WORKDIR}/${MY_P}" - -REQUIRED_USE=" - pam? ( !skey ) - skey? ( !pam ) -" - -MAKEOPTS+=" SAMPLES=" - -PATCHES=( - "${FILESDIR}/${PN}-1.8.28-no_pam_error_message_fix.patch" #698946 -) - -src_prepare() { - default - elibtoolize -} - -set_secure_path() { - # FIXME: secure_path is a compile time setting. using PATH or - # ROOTPATH is not perfect, env-update may invalidate this, but until it - # is available as a sudoers setting this will have to do. - einfo "Setting secure_path ..." - - # first extract the default ROOTPATH from build env - SECURE_PATH=$(unset ROOTPATH; . "${EPREFIX}"/etc/profile.env; - echo "${ROOTPATH}") - case "${SECURE_PATH}" in - */usr/sbin*) ;; - *) SECURE_PATH=$(unset PATH; - . "${EPREFIX}"/etc/profile.env; echo "${PATH}") - ;; - esac - if [[ -z ${SECURE_PATH} ]] ; then - ewarn " Failed to detect SECURE_PATH, please report this" - fi - - # then remove duplicate path entries - cleanpath() { - local newpath thisp IFS=: - for thisp in $1 ; do - if [[ :${newpath}: != *:${thisp}:* ]] ; then - newpath+=:${thisp} - else - einfo " Duplicate entry ${thisp} removed..." - fi - done - SECURE_PATH=${newpath#:} - } - cleanpath /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin${SECURE_PATH:+:${SECURE_PATH}} - - # finally, strip gcc paths #136027 - rmpath() { - local e newpath thisp IFS=: - for thisp in ${SECURE_PATH} ; do - for e ; do [[ ${thisp} == ${e} ]] && continue 2 ; done - newpath+=:${thisp} - done - SECURE_PATH=${newpath#:} - } - rmpath '*/gcc-bin/*' '*/gnat-gcc-bin/*' '*/gnat-gcc/*' - - einfo "... done" -} - -src_configure() { - local SECURE_PATH - set_secure_path - - # audit: somebody got to explain me how I can test this before I - # enable it.. - Diego - # plugindir: autoconf code is crappy and does not delay evaluation - # until `make` time, so we have to use a full path here rather than - # basing off other values. - myeconfargs=( - --enable-zlib=system - --enable-tmpfiles.d="${EPREFIX}"/usr/lib/tmpfiles.d - --with-editor="${EPREFIX}"/usr/libexec/editor - --with-env-editor - --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo - --with-rundir="${EPREFIX}"/run/sudo - $(use_with secure-path secure-path "${SECURE_PATH}") - --with-vardir="${EPREFIX}"/var/db/sudo - --without-linux-audit - --without-opie - $(use_enable gcrypt) - $(use_enable nls) - $(use_enable sasl) - $(use_with offensive insults) - $(use_with offensive all-insults) - $(use_with ldap ldap_conf_file /etc/ldap.conf.sudo) - $(use_with ldap) - $(use_with pam) - $(use_with skey) - $(use_with sssd) - $(use_with selinux) - $(use_with sendmail) - ) - - if use system-digest && ! use gcrypt; then - myeconfargs+=("--enable-openssl") - else - myeconfargs+=("--disable-openssl") - fi - - econf "${myeconfargs[@]}" -} - -src_install() { - default - - if use ldap ; then - dodoc README.LDAP - - cat <<-EOF > "${T}"/ldap.conf.sudo - # See ldap.conf(5) and README.LDAP for details - # This file should only be readable by root - - # supported directives: host, port, ssl, ldap_version - # uri, binddn, bindpw, sudoers_base, sudoers_debug - # tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key} - EOF - - if use sasl ; then - cat <<-EOF >> "${T}"/ldap.conf.sudo - - # SASL directives: use_sasl, sasl_mech, sasl_auth_id - # sasl_secprops, rootuse_sasl, rootsasl_auth_id, krb5_ccname - EOF - fi - - insinto /etc - doins "${T}"/ldap.conf.sudo - fperms 0440 /etc/ldap.conf.sudo - - insinto /etc/openldap/schema - newins doc/schema.OpenLDAP sudo.schema - fi - - pamd_mimic system-auth sudo auth account session - - keepdir /var/db/sudo/lectured - fperms 0700 /var/db/sudo/lectured - fperms 0711 /var/db/sudo #652958 - - # Don't install into /run as that is a tmpfs most of the time - # (bug #504854) - rm -rf "${ED}"/run - - find "${ED}" -type f -name "*.la" -delete || die #697812 -} - -pkg_postinst() { - tmpfiles_process sudo.conf - - #652958 - local sudo_db="${EROOT}/var/db/sudo" - if [[ "$(stat -c %a "${sudo_db}")" -ne 711 ]] ; then - chmod 711 "${sudo_db}" || die - fi - - if use ldap ; then - ewarn - ewarn "sudo uses the /etc/ldap.conf.sudo file for ldap configuration." - ewarn - if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then - ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly" - ewarn "configured in /etc/nsswitch.conf." - ewarn - ewarn "To make use of LDAP, add this line to your /etc/nsswitch.conf:" - ewarn " sudoers: ldap files" - ewarn - fi - fi - if use prefix ; then - ewarn - ewarn "To use sudo, you need to change file ownership and permissions" - ewarn "with root privileges, as follows:" - ewarn - ewarn " # chown root:root ${EPREFIX}/usr/bin/sudo" - ewarn " # chown root:root ${EPREFIX}/usr/lib/sudo/sudoers.so" - ewarn " # chown root:root ${EPREFIX}/etc/sudoers" - ewarn " # chown root:root ${EPREFIX}/etc/sudoers.d" - ewarn " # chown root:root ${EPREFIX}/var/db/sudo" - ewarn " # chmod 4111 ${EPREFIX}/usr/bin/sudo" - ewarn - fi - - elog "To use the -A (askpass) option, you need to install a compatible" - elog "password program from the following list. Starred packages will" - elog "automatically register for the use with sudo (but will not force" - elog "the -A option):" - elog "" - elog " [*] net-misc/ssh-askpass-fullscreen" - elog " net-misc/x11-ssh-askpass" - elog "" - elog "You can override the choice by setting the SUDO_ASKPASS environmnent" - elog "variable to the program you want to use." -} diff --git a/app-admin/sudo/sudo-1.8.29-r2.ebuild b/app-admin/sudo/sudo-1.8.29-r2.ebuild deleted file mode 100644 index 50585e30f912..000000000000 --- a/app-admin/sudo/sudo-1.8.29-r2.ebuild +++ /dev/null @@ -1,267 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit pam multilib libtool tmpfiles - -MY_P="${P/_/}" -MY_P="${MY_P/beta/b}" - -DESCRIPTION="Allows users or groups to run commands as other users" -HOMEPAGE="https://www.sudo.ws/" -if [[ ${PV} == "9999" ]] ; then - inherit mercurial - EHG_REPO_URI="https://www.sudo.ws/repos/sudo" -else - uri_prefix= - case ${P} in - *_beta*|*_rc*) uri_prefix=beta/ ;; - esac - - SRC_URI="https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz - ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz" - if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-solaris" - fi -fi - -# Basic license is ISC-style as-is, some files are released under -# 3-clause BSD license -LICENSE="ISC BSD" -SLOT="0" -IUSE="gcrypt ldap libressl nls offensive pam sasl +secure-path selinux +sendmail skey sssd system-digest" - -DEPEND=" - sys-libs/zlib:= - ldap? ( - >=net-nds/openldap-2.1.30-r1 - sasl? ( - dev-libs/cyrus-sasl - net-nds/openldap[sasl] - ) - ) - pam? ( sys-libs/pam ) - sasl? ( dev-libs/cyrus-sasl ) - skey? ( >=sys-auth/skey-1.1.5-r1 ) - sssd? ( sys-auth/sssd[sudo] ) - system-digest? ( - gcrypt? ( dev-libs/libgcrypt:= ) - !gcrypt? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) - ) - ) -" -RDEPEND=" - ${DEPEND} - >=app-misc/editor-wrapper-3 - virtual/editor - ldap? ( dev-lang/perl ) - pam? ( sys-auth/pambase ) - selinux? ( sec-policy/selinux-sudo ) - sendmail? ( virtual/mta ) -" -BDEPEND=" - sys-devel/bison -" - -S="${WORKDIR}/${MY_P}" - -REQUIRED_USE=" - pam? ( !skey ) - skey? ( !pam ) -" - -MAKEOPTS+=" SAMPLES=" - -PATCHES=( - "${FILESDIR}/${PN}-1.8.28-no_pam_error_message_fix.patch" #698946 -) - -src_prepare() { - default - elibtoolize -} - -set_secure_path() { - # FIXME: secure_path is a compile time setting. using PATH or - # ROOTPATH is not perfect, env-update may invalidate this, but until it - # is available as a sudoers setting this will have to do. - einfo "Setting secure_path ..." - - # first extract the default ROOTPATH from build env - SECURE_PATH=$(unset ROOTPATH; . "${EPREFIX}"/etc/profile.env; - echo "${ROOTPATH}") - case "${SECURE_PATH}" in - */usr/sbin*) ;; - *) SECURE_PATH=$(unset PATH; - . "${EPREFIX}"/etc/profile.env; echo "${PATH}") - ;; - esac - if [[ -z ${SECURE_PATH} ]] ; then - ewarn " Failed to detect SECURE_PATH, please report this" - fi - - # then remove duplicate path entries - cleanpath() { - local newpath thisp IFS=: - for thisp in $1 ; do - if [[ :${newpath}: != *:${thisp}:* ]] ; then - newpath+=:${thisp} - else - einfo " Duplicate entry ${thisp} removed..." - fi - done - SECURE_PATH=${newpath#:} - } - cleanpath /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin${SECURE_PATH:+:${SECURE_PATH}} - - # finally, strip gcc paths #136027 - rmpath() { - local e newpath thisp IFS=: - for thisp in ${SECURE_PATH} ; do - for e ; do [[ ${thisp} == ${e} ]] && continue 2 ; done - newpath+=:${thisp} - done - SECURE_PATH=${newpath#:} - } - rmpath '*/gcc-bin/*' '*/gnat-gcc-bin/*' '*/gnat-gcc/*' - - einfo "... done" -} - -src_configure() { - local SECURE_PATH - set_secure_path - - # audit: somebody got to explain me how I can test this before I - # enable it.. - Diego - # plugindir: autoconf code is crappy and does not delay evaluation - # until `make` time, so we have to use a full path here rather than - # basing off other values. - myeconfargs=( - --enable-zlib=system - --enable-tmpfiles.d="${EPREFIX}"/usr/lib/tmpfiles.d - --with-editor="${EPREFIX}"/usr/libexec/editor - --with-env-editor - --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo - --with-rundir="${EPREFIX}"/run/sudo - $(use_with secure-path secure-path "${SECURE_PATH}") - --with-vardir="${EPREFIX}"/var/db/sudo - --without-linux-audit - --without-opie - $(use_enable gcrypt) - $(use_enable nls) - $(use_enable sasl) - $(use_with offensive insults) - $(use_with offensive all-insults) - $(use_with ldap ldap_conf_file /etc/ldap.conf.sudo) - $(use_with ldap) - $(use_with pam) - $(use_with skey) - $(use_with sssd) - $(use_with selinux) - $(use_with sendmail) - ) - - if use system-digest && ! use gcrypt; then - myeconfargs+=("--enable-openssl") - else - myeconfargs+=("--disable-openssl") - fi - - econf "${myeconfargs[@]}" -} - -src_install() { - default - - if use ldap ; then - dodoc README.LDAP - - cat <<-EOF > "${T}"/ldap.conf.sudo - # See ldap.conf(5) and README.LDAP for details - # This file should only be readable by root - - # supported directives: host, port, ssl, ldap_version - # uri, binddn, bindpw, sudoers_base, sudoers_debug - # tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key} - EOF - - if use sasl ; then - cat <<-EOF >> "${T}"/ldap.conf.sudo - - # SASL directives: use_sasl, sasl_mech, sasl_auth_id - # sasl_secprops, rootuse_sasl, rootsasl_auth_id, krb5_ccname - EOF - fi - - insinto /etc - doins "${T}"/ldap.conf.sudo - fperms 0440 /etc/ldap.conf.sudo - - insinto /etc/openldap/schema - newins doc/schema.OpenLDAP sudo.schema - fi - - pamd_mimic system-auth sudo auth account session - - keepdir /var/db/sudo/lectured - fperms 0700 /var/db/sudo/lectured - fperms 0711 /var/db/sudo #652958 - - # Don't install into /run as that is a tmpfs most of the time - # (bug #504854) - rm -rf "${ED}"/run - - find "${ED}" -type f -name "*.la" -delete || die #697812 -} - -pkg_postinst() { - tmpfiles_process sudo.conf - - #652958 - local sudo_db="${EROOT}/var/db/sudo" - if [[ "$(stat -c %a "${sudo_db}")" -ne 711 ]] ; then - chmod 711 "${sudo_db}" || die - fi - - if use ldap ; then - ewarn - ewarn "sudo uses the /etc/ldap.conf.sudo file for ldap configuration." - ewarn - if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then - ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly" - ewarn "configured in /etc/nsswitch.conf." - ewarn - ewarn "To make use of LDAP, add this line to your /etc/nsswitch.conf:" - ewarn " sudoers: ldap files" - ewarn - fi - fi - if use prefix ; then - ewarn - ewarn "To use sudo, you need to change file ownership and permissions" - ewarn "with root privileges, as follows:" - ewarn - ewarn " # chown root:root ${EPREFIX}/usr/bin/sudo" - ewarn " # chown root:root ${EPREFIX}/usr/lib/sudo/sudoers.so" - ewarn " # chown root:root ${EPREFIX}/etc/sudoers" - ewarn " # chown root:root ${EPREFIX}/etc/sudoers.d" - ewarn " # chown root:root ${EPREFIX}/var/db/sudo" - ewarn " # chmod 4111 ${EPREFIX}/usr/bin/sudo" - ewarn - fi - - elog "To use the -A (askpass) option, you need to install a compatible" - elog "password program from the following list. Starred packages will" - elog "automatically register for the use with sudo (but will not force" - elog "the -A option):" - elog "" - elog " [*] net-misc/ssh-askpass-fullscreen" - elog " net-misc/x11-ssh-askpass" - elog "" - elog "You can override the choice by setting the SUDO_ASKPASS environmnent" - elog "variable to the program you want to use." -} diff --git a/app-admin/sudo/sudo-1.8.30.ebuild b/app-admin/sudo/sudo-1.8.30.ebuild deleted file mode 100644 index 944dd7d03535..000000000000 --- a/app-admin/sudo/sudo-1.8.30.ebuild +++ /dev/null @@ -1,263 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit pam multilib libtool tmpfiles - -MY_P="${P/_/}" -MY_P="${MY_P/beta/b}" - -DESCRIPTION="Allows users or groups to run commands as other users" -HOMEPAGE="https://www.sudo.ws/" -if [[ ${PV} == "9999" ]] ; then - inherit mercurial - EHG_REPO_URI="https://www.sudo.ws/repos/sudo" -else - uri_prefix= - case ${P} in - *_beta*|*_rc*) uri_prefix=beta/ ;; - esac - - SRC_URI="https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz - ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz" - if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-solaris" - fi -fi - -# Basic license is ISC-style as-is, some files are released under -# 3-clause BSD license -LICENSE="ISC BSD" -SLOT="0" -IUSE="gcrypt ldap libressl nls offensive pam sasl +secure-path selinux +sendmail skey sssd system-digest" - -DEPEND=" - sys-libs/zlib:= - ldap? ( - >=net-nds/openldap-2.1.30-r1 - sasl? ( - dev-libs/cyrus-sasl - net-nds/openldap[sasl] - ) - ) - pam? ( sys-libs/pam ) - sasl? ( dev-libs/cyrus-sasl ) - skey? ( >=sys-auth/skey-1.1.5-r1 ) - sssd? ( sys-auth/sssd[sudo] ) - system-digest? ( - gcrypt? ( dev-libs/libgcrypt:= ) - !gcrypt? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) - ) - ) -" -RDEPEND=" - ${DEPEND} - >=app-misc/editor-wrapper-3 - virtual/editor - ldap? ( dev-lang/perl ) - pam? ( sys-auth/pambase ) - selinux? ( sec-policy/selinux-sudo ) - sendmail? ( virtual/mta ) -" -BDEPEND=" - sys-devel/bison -" - -S="${WORKDIR}/${MY_P}" - -REQUIRED_USE=" - pam? ( !skey ) - skey? ( !pam ) -" - -MAKEOPTS+=" SAMPLES=" - -src_prepare() { - default - elibtoolize -} - -set_secure_path() { - # FIXME: secure_path is a compile time setting. using PATH or - # ROOTPATH is not perfect, env-update may invalidate this, but until it - # is available as a sudoers setting this will have to do. - einfo "Setting secure_path ..." - - # first extract the default ROOTPATH from build env - SECURE_PATH=$(unset ROOTPATH; . "${EPREFIX}"/etc/profile.env; - echo "${ROOTPATH}") - case "${SECURE_PATH}" in - */usr/sbin*) ;; - *) SECURE_PATH=$(unset PATH; - . "${EPREFIX}"/etc/profile.env; echo "${PATH}") - ;; - esac - if [[ -z ${SECURE_PATH} ]] ; then - ewarn " Failed to detect SECURE_PATH, please report this" - fi - - # then remove duplicate path entries - cleanpath() { - local newpath thisp IFS=: - for thisp in $1 ; do - if [[ :${newpath}: != *:${thisp}:* ]] ; then - newpath+=:${thisp} - else - einfo " Duplicate entry ${thisp} removed..." - fi - done - SECURE_PATH=${newpath#:} - } - cleanpath /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin${SECURE_PATH:+:${SECURE_PATH}} - - # finally, strip gcc paths #136027 - rmpath() { - local e newpath thisp IFS=: - for thisp in ${SECURE_PATH} ; do - for e ; do [[ ${thisp} == ${e} ]] && continue 2 ; done - newpath+=:${thisp} - done - SECURE_PATH=${newpath#:} - } - rmpath '*/gcc-bin/*' '*/gnat-gcc-bin/*' '*/gnat-gcc/*' - - einfo "... done" -} - -src_configure() { - local SECURE_PATH - set_secure_path - - # audit: somebody got to explain me how I can test this before I - # enable it.. - Diego - # plugindir: autoconf code is crappy and does not delay evaluation - # until `make` time, so we have to use a full path here rather than - # basing off other values. - myeconfargs=( - --enable-zlib=system - --enable-tmpfiles.d="${EPREFIX}"/usr/lib/tmpfiles.d - --with-editor="${EPREFIX}"/usr/libexec/editor - --with-env-editor - --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo - --with-rundir="${EPREFIX}"/run/sudo - $(use_with secure-path secure-path "${SECURE_PATH}") - --with-vardir="${EPREFIX}"/var/db/sudo - --without-linux-audit - --without-opie - $(use_enable gcrypt) - $(use_enable nls) - $(use_enable sasl) - $(use_with offensive insults) - $(use_with offensive all-insults) - $(use_with ldap ldap_conf_file /etc/ldap.conf.sudo) - $(use_with ldap) - $(use_with pam) - $(use_with skey) - $(use_with sssd) - $(use_with selinux) - $(use_with sendmail) - ) - - if use system-digest && ! use gcrypt; then - myeconfargs+=("--enable-openssl") - else - myeconfargs+=("--disable-openssl") - fi - - econf "${myeconfargs[@]}" -} - -src_install() { - default - - if use ldap ; then - dodoc README.LDAP - - cat <<-EOF > "${T}"/ldap.conf.sudo - # See ldap.conf(5) and README.LDAP for details - # This file should only be readable by root - - # supported directives: host, port, ssl, ldap_version - # uri, binddn, bindpw, sudoers_base, sudoers_debug - # tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key} - EOF - - if use sasl ; then - cat <<-EOF >> "${T}"/ldap.conf.sudo - - # SASL directives: use_sasl, sasl_mech, sasl_auth_id - # sasl_secprops, rootuse_sasl, rootsasl_auth_id, krb5_ccname - EOF - fi - - insinto /etc - doins "${T}"/ldap.conf.sudo - fperms 0440 /etc/ldap.conf.sudo - - insinto /etc/openldap/schema - newins doc/schema.OpenLDAP sudo.schema - fi - - pamd_mimic system-auth sudo auth account session - - keepdir /var/db/sudo/lectured - fperms 0700 /var/db/sudo/lectured - fperms 0711 /var/db/sudo #652958 - - # Don't install into /run as that is a tmpfs most of the time - # (bug #504854) - rm -rf "${ED}"/run - - find "${ED}" -type f -name "*.la" -delete || die #697812 -} - -pkg_postinst() { - tmpfiles_process sudo.conf - - #652958 - local sudo_db="${EROOT}/var/db/sudo" - if [[ "$(stat -c %a "${sudo_db}")" -ne 711 ]] ; then - chmod 711 "${sudo_db}" || die - fi - - if use ldap ; then - ewarn - ewarn "sudo uses the /etc/ldap.conf.sudo file for ldap configuration." - ewarn - if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then - ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly" - ewarn "configured in /etc/nsswitch.conf." - ewarn - ewarn "To make use of LDAP, add this line to your /etc/nsswitch.conf:" - ewarn " sudoers: ldap files" - ewarn - fi - fi - if use prefix ; then - ewarn - ewarn "To use sudo, you need to change file ownership and permissions" - ewarn "with root privileges, as follows:" - ewarn - ewarn " # chown root:root ${EPREFIX}/usr/bin/sudo" - ewarn " # chown root:root ${EPREFIX}/usr/lib/sudo/sudoers.so" - ewarn " # chown root:root ${EPREFIX}/etc/sudoers" - ewarn " # chown root:root ${EPREFIX}/etc/sudoers.d" - ewarn " # chown root:root ${EPREFIX}/var/db/sudo" - ewarn " # chmod 4111 ${EPREFIX}/usr/bin/sudo" - ewarn - fi - - elog "To use the -A (askpass) option, you need to install a compatible" - elog "password program from the following list. Starred packages will" - elog "automatically register for the use with sudo (but will not force" - elog "the -A option):" - elog "" - elog " [*] net-misc/ssh-askpass-fullscreen" - elog " net-misc/x11-ssh-askpass" - elog "" - elog "You can override the choice by setting the SUDO_ASKPASS environmnent" - elog "variable to the program you want to use." -} diff --git a/app-admin/sudo/sudo-1.8.31.ebuild b/app-admin/sudo/sudo-1.8.31.ebuild index 944dd7d03535..82002da5ab44 100644 --- a/app-admin/sudo/sudo-1.8.31.ebuild +++ b/app-admin/sudo/sudo-1.8.31.ebuild @@ -22,7 +22,7 @@ else SRC_URI="https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz" if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-solaris" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 s390 sparc x86 ~sparc-solaris" fi fi diff --git a/app-admin/sudo/sudo-1.8.31_p1.ebuild b/app-admin/sudo/sudo-1.8.31_p1.ebuild new file mode 100644 index 000000000000..f0df8a6c9e22 --- /dev/null +++ b/app-admin/sudo/sudo-1.8.31_p1.ebuild @@ -0,0 +1,263 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit pam multilib libtool tmpfiles + +MY_P="${P/_/}" +MY_P="${MY_P/beta/b}" + +DESCRIPTION="Allows users or groups to run commands as other users" +HOMEPAGE="https://www.sudo.ws/" +if [[ ${PV} == "9999" ]] ; then + inherit mercurial + EHG_REPO_URI="https://www.sudo.ws/repos/sudo" +else + uri_prefix= + case ${P} in + *_beta*|*_rc*) uri_prefix=beta/ ;; + esac + + SRC_URI="https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz + ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz" + if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~sparc-solaris" + fi +fi + +# Basic license is ISC-style as-is, some files are released under +# 3-clause BSD license +LICENSE="ISC BSD" +SLOT="0" +IUSE="gcrypt ldap libressl nls offensive pam sasl +secure-path selinux +sendmail skey sssd system-digest" + +DEPEND=" + sys-libs/zlib:= + ldap? ( + >=net-nds/openldap-2.1.30-r1 + sasl? ( + dev-libs/cyrus-sasl + net-nds/openldap[sasl] + ) + ) + pam? ( sys-libs/pam ) + sasl? ( dev-libs/cyrus-sasl ) + skey? ( >=sys-auth/skey-1.1.5-r1 ) + sssd? ( sys-auth/sssd[sudo] ) + system-digest? ( + gcrypt? ( dev-libs/libgcrypt:= ) + !gcrypt? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + ) +" +RDEPEND=" + ${DEPEND} + >=app-misc/editor-wrapper-3 + virtual/editor + ldap? ( dev-lang/perl ) + pam? ( sys-auth/pambase ) + selinux? ( sec-policy/selinux-sudo ) + sendmail? ( virtual/mta ) +" +BDEPEND=" + sys-devel/bison +" + +S="${WORKDIR}/${MY_P}" + +REQUIRED_USE=" + pam? ( !skey ) + skey? ( !pam ) +" + +MAKEOPTS+=" SAMPLES=" + +src_prepare() { + default + elibtoolize +} + +set_secure_path() { + # FIXME: secure_path is a compile time setting. using PATH or + # ROOTPATH is not perfect, env-update may invalidate this, but until it + # is available as a sudoers setting this will have to do. + einfo "Setting secure_path ..." + + # first extract the default ROOTPATH from build env + SECURE_PATH=$(unset ROOTPATH; . "${EPREFIX}"/etc/profile.env; + echo "${ROOTPATH}") + case "${SECURE_PATH}" in + */usr/sbin*) ;; + *) SECURE_PATH=$(unset PATH; + . "${EPREFIX}"/etc/profile.env; echo "${PATH}") + ;; + esac + if [[ -z ${SECURE_PATH} ]] ; then + ewarn " Failed to detect SECURE_PATH, please report this" + fi + + # then remove duplicate path entries + cleanpath() { + local newpath thisp IFS=: + for thisp in $1 ; do + if [[ :${newpath}: != *:${thisp}:* ]] ; then + newpath+=:${thisp} + else + einfo " Duplicate entry ${thisp} removed..." + fi + done + SECURE_PATH=${newpath#:} + } + cleanpath /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin${SECURE_PATH:+:${SECURE_PATH}} + + # finally, strip gcc paths #136027 + rmpath() { + local e newpath thisp IFS=: + for thisp in ${SECURE_PATH} ; do + for e ; do [[ ${thisp} == ${e} ]] && continue 2 ; done + newpath+=:${thisp} + done + SECURE_PATH=${newpath#:} + } + rmpath '*/gcc-bin/*' '*/gnat-gcc-bin/*' '*/gnat-gcc/*' + + einfo "... done" +} + +src_configure() { + local SECURE_PATH + set_secure_path + + # audit: somebody got to explain me how I can test this before I + # enable it.. - Diego + # plugindir: autoconf code is crappy and does not delay evaluation + # until `make` time, so we have to use a full path here rather than + # basing off other values. + myeconfargs=( + --enable-zlib=system + --enable-tmpfiles.d="${EPREFIX}"/usr/lib/tmpfiles.d + --with-editor="${EPREFIX}"/usr/libexec/editor + --with-env-editor + --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo + --with-rundir="${EPREFIX}"/run/sudo + $(use_with secure-path secure-path "${SECURE_PATH}") + --with-vardir="${EPREFIX}"/var/db/sudo + --without-linux-audit + --without-opie + $(use_enable gcrypt) + $(use_enable nls) + $(use_enable sasl) + $(use_with offensive insults) + $(use_with offensive all-insults) + $(use_with ldap ldap_conf_file /etc/ldap.conf.sudo) + $(use_with ldap) + $(use_with pam) + $(use_with skey) + $(use_with sssd) + $(use_with selinux) + $(use_with sendmail) + ) + + if use system-digest && ! use gcrypt; then + myeconfargs+=("--enable-openssl") + else + myeconfargs+=("--disable-openssl") + fi + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + if use ldap ; then + dodoc README.LDAP + + cat <<-EOF > "${T}"/ldap.conf.sudo + # See ldap.conf(5) and README.LDAP for details + # This file should only be readable by root + + # supported directives: host, port, ssl, ldap_version + # uri, binddn, bindpw, sudoers_base, sudoers_debug + # tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key} + EOF + + if use sasl ; then + cat <<-EOF >> "${T}"/ldap.conf.sudo + + # SASL directives: use_sasl, sasl_mech, sasl_auth_id + # sasl_secprops, rootuse_sasl, rootsasl_auth_id, krb5_ccname + EOF + fi + + insinto /etc + doins "${T}"/ldap.conf.sudo + fperms 0440 /etc/ldap.conf.sudo + + insinto /etc/openldap/schema + newins doc/schema.OpenLDAP sudo.schema + fi + + pamd_mimic system-auth sudo auth account session + + keepdir /var/db/sudo/lectured + fperms 0700 /var/db/sudo/lectured + fperms 0711 /var/db/sudo #652958 + + # Don't install into /run as that is a tmpfs most of the time + # (bug #504854) + rm -rf "${ED}"/run + + find "${ED}" -type f -name "*.la" -delete || die #697812 +} + +pkg_postinst() { + tmpfiles_process sudo.conf + + #652958 + local sudo_db="${EROOT}/var/db/sudo" + if [[ "$(stat -c %a "${sudo_db}")" -ne 711 ]] ; then + chmod 711 "${sudo_db}" || die + fi + + if use ldap ; then + ewarn + ewarn "sudo uses the /etc/ldap.conf.sudo file for ldap configuration." + ewarn + if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then + ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly" + ewarn "configured in /etc/nsswitch.conf." + ewarn + ewarn "To make use of LDAP, add this line to your /etc/nsswitch.conf:" + ewarn " sudoers: ldap files" + ewarn + fi + fi + if use prefix ; then + ewarn + ewarn "To use sudo, you need to change file ownership and permissions" + ewarn "with root privileges, as follows:" + ewarn + ewarn " # chown root:root ${EPREFIX}/usr/bin/sudo" + ewarn " # chown root:root ${EPREFIX}/usr/lib/sudo/sudoers.so" + ewarn " # chown root:root ${EPREFIX}/etc/sudoers" + ewarn " # chown root:root ${EPREFIX}/etc/sudoers.d" + ewarn " # chown root:root ${EPREFIX}/var/db/sudo" + ewarn " # chmod 4111 ${EPREFIX}/usr/bin/sudo" + ewarn + fi + + elog "To use the -A (askpass) option, you need to install a compatible" + elog "password program from the following list. Starred packages will" + elog "automatically register for the use with sudo (but will not force" + elog "the -A option):" + elog "" + elog " [*] net-misc/ssh-askpass-fullscreen" + elog " net-misc/x11-ssh-askpass" + elog "" + elog "You can override the choice by setting the SUDO_ASKPASS environmnent" + elog "variable to the program you want to use." +} diff --git a/app-admin/sudo/sudo-1.9.0_rc2.ebuild b/app-admin/sudo/sudo-1.9.0_rc2.ebuild new file mode 100644 index 000000000000..cecc68448ea9 --- /dev/null +++ b/app-admin/sudo/sudo-1.9.0_rc2.ebuild @@ -0,0 +1,259 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit pam multilib libtool tmpfiles + +MY_P="${P/_/}" +MY_P="${MY_P/beta/b}" + +DESCRIPTION="Allows users or groups to run commands as other users" +HOMEPAGE="https://www.sudo.ws/" +if [[ ${PV} == "9999" ]] ; then + inherit mercurial + EHG_REPO_URI="https://www.sudo.ws/repos/sudo" +else + uri_prefix= + case ${P} in + *_beta*|*_rc*) uri_prefix=beta/ ;; + esac + + SRC_URI="https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz + ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz" + if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~sparc-solaris" + fi +fi + +# Basic license is ISC-style as-is, some files are released under +# 3-clause BSD license +LICENSE="ISC BSD" +SLOT="0" +IUSE="gcrypt ldap libressl nls offensive pam sasl +secure-path selinux +sendmail skey ssl sssd" + +DEPEND=" + sys-libs/zlib:= + gcrypt? ( dev-libs/libgcrypt:= ) + ldap? ( + >=net-nds/openldap-2.1.30-r1 + sasl? ( + dev-libs/cyrus-sasl + net-nds/openldap[sasl] + ) + ) + pam? ( sys-libs/pam ) + sasl? ( dev-libs/cyrus-sasl ) + skey? ( >=sys-auth/skey-1.1.5-r1 ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + sssd? ( sys-auth/sssd[sudo] ) +" +RDEPEND=" + ${DEPEND} + >=app-misc/editor-wrapper-3 + virtual/editor + ldap? ( dev-lang/perl ) + pam? ( sys-auth/pambase ) + selinux? ( sec-policy/selinux-sudo ) + sendmail? ( virtual/mta ) +" +BDEPEND=" + sys-devel/bison +" + +S="${WORKDIR}/${MY_P}" + +REQUIRED_USE=" + pam? ( !skey ) + skey? ( !pam ) +" + +MAKEOPTS+=" SAMPLES=" + +src_prepare() { + default + elibtoolize +} + +set_secure_path() { + # FIXME: secure_path is a compile time setting. using PATH or + # ROOTPATH is not perfect, env-update may invalidate this, but until it + # is available as a sudoers setting this will have to do. + einfo "Setting secure_path ..." + + # first extract the default ROOTPATH from build env + SECURE_PATH=$(unset ROOTPATH; . "${EPREFIX}"/etc/profile.env; + echo "${ROOTPATH}") + case "${SECURE_PATH}" in + */usr/sbin*) ;; + *) SECURE_PATH=$(unset PATH; + . "${EPREFIX}"/etc/profile.env; echo "${PATH}") + ;; + esac + if [[ -z ${SECURE_PATH} ]] ; then + ewarn " Failed to detect SECURE_PATH, please report this" + fi + + # then remove duplicate path entries + cleanpath() { + local newpath thisp IFS=: + for thisp in $1 ; do + if [[ :${newpath}: != *:${thisp}:* ]] ; then + newpath+=:${thisp} + else + einfo " Duplicate entry ${thisp} removed..." + fi + done + SECURE_PATH=${newpath#:} + } + cleanpath /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin${SECURE_PATH:+:${SECURE_PATH}} + + # finally, strip gcc paths #136027 + rmpath() { + local e newpath thisp IFS=: + for thisp in ${SECURE_PATH} ; do + for e ; do [[ ${thisp} == ${e} ]] && continue 2 ; done + newpath+=:${thisp} + done + SECURE_PATH=${newpath#:} + } + rmpath '*/gcc-bin/*' '*/gnat-gcc-bin/*' '*/gnat-gcc/*' + + einfo "... done" +} + +src_configure() { + local SECURE_PATH + set_secure_path + + # audit: somebody got to explain me how I can test this before I + # enable it.. - Diego + # plugindir: autoconf code is crappy and does not delay evaluation + # until `make` time, so we have to use a full path here rather than + # basing off other values. + myeconfargs=( + # requires some python eclass + --disable-python + --enable-tmpfiles.d="${EPREFIX}"/usr/lib/tmpfiles.d + --enable-zlib=system + --with-editor="${EPREFIX}"/usr/libexec/editor + --with-env-editor + --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo + --with-rundir="${EPREFIX}"/run/sudo + --with-vardir="${EPREFIX}"/var/db/sudo + --without-linux-audit + --without-opie + $(use_enable gcrypt) + $(use_enable nls) + $(use_enable sasl) + $(use_enable ssl openssl) + $(use_with ldap) + $(use_with ldap ldap_conf_file /etc/ldap.conf.sudo) + $(use_with offensive insults) + $(use_with offensive all-insults) + $(use_with pam) + $(use_with pam pam-login) + $(use_with secure-path secure-path "${SECURE_PATH}") + $(use_with selinux) + $(use_with sendmail) + $(use_with skey) + $(use_with sssd) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + if use ldap ; then + dodoc README.LDAP + + cat <<-EOF > "${T}"/ldap.conf.sudo + # See ldap.conf(5) and README.LDAP for details + # This file should only be readable by root + + # supported directives: host, port, ssl, ldap_version + # uri, binddn, bindpw, sudoers_base, sudoers_debug + # tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key} + EOF + + if use sasl ; then + cat <<-EOF >> "${T}"/ldap.conf.sudo + + # SASL directives: use_sasl, sasl_mech, sasl_auth_id + # sasl_secprops, rootuse_sasl, rootsasl_auth_id, krb5_ccname + EOF + fi + + insinto /etc + doins "${T}"/ldap.conf.sudo + fperms 0440 /etc/ldap.conf.sudo + + insinto /etc/openldap/schema + newins doc/schema.OpenLDAP sudo.schema + fi + + pamd_mimic system-auth sudo auth account session + + keepdir /var/db/sudo/lectured + fperms 0700 /var/db/sudo/lectured + fperms 0711 /var/db/sudo #652958 + + # Don't install into /run as that is a tmpfs most of the time + # (bug #504854) + rm -rf "${ED}"/run || die + + find "${ED}" -type f -name "*.la" -delete || die #697812 +} + +pkg_postinst() { + tmpfiles_process sudo.conf + + #652958 + local sudo_db="${EROOT}/var/db/sudo" + if [[ "$(stat -c %a "${sudo_db}")" -ne 711 ]] ; then + chmod 711 "${sudo_db}" || die + fi + + if use ldap ; then + ewarn + ewarn "sudo uses the /etc/ldap.conf.sudo file for ldap configuration." + ewarn + if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then + ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly" + ewarn "configured in /etc/nsswitch.conf." + ewarn + ewarn "To make use of LDAP, add this line to your /etc/nsswitch.conf:" + ewarn " sudoers: ldap files" + ewarn + fi + fi + if use prefix ; then + ewarn + ewarn "To use sudo, you need to change file ownership and permissions" + ewarn "with root privileges, as follows:" + ewarn + ewarn " # chown root:root ${EPREFIX}/usr/bin/sudo" + ewarn " # chown root:root ${EPREFIX}/usr/lib/sudo/sudoers.so" + ewarn " # chown root:root ${EPREFIX}/etc/sudoers" + ewarn " # chown root:root ${EPREFIX}/etc/sudoers.d" + ewarn " # chown root:root ${EPREFIX}/var/db/sudo" + ewarn " # chmod 4111 ${EPREFIX}/usr/bin/sudo" + ewarn + fi + + elog "To use the -A (askpass) option, you need to install a compatible" + elog "password program from the following list. Starred packages will" + elog "automatically register for the use with sudo (but will not force" + elog "the -A option):" + elog "" + elog " [*] net-misc/ssh-askpass-fullscreen" + elog " net-misc/x11-ssh-askpass" + elog "" + elog "You can override the choice by setting the SUDO_ASKPASS environmnent" + elog "variable to the program you want to use." +} diff --git a/app-admin/sudo/sudo-9999.ebuild b/app-admin/sudo/sudo-9999.ebuild index fc4f44f8e4fc..cecc68448ea9 100644 --- a/app-admin/sudo/sudo-9999.ebuild +++ b/app-admin/sudo/sudo-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -22,7 +22,7 @@ else SRC_URI="https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz" if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-solaris" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~sparc-solaris" fi fi @@ -30,10 +30,11 @@ fi # 3-clause BSD license LICENSE="ISC BSD" SLOT="0" -IUSE="gcrypt ldap libressl nls offensive pam sasl +secure-path selinux +sendmail skey sssd system-digest" +IUSE="gcrypt ldap libressl nls offensive pam sasl +secure-path selinux +sendmail skey ssl sssd" DEPEND=" sys-libs/zlib:= + gcrypt? ( dev-libs/libgcrypt:= ) ldap? ( >=net-nds/openldap-2.1.30-r1 sasl? ( @@ -44,14 +45,11 @@ DEPEND=" pam? ( sys-libs/pam ) sasl? ( dev-libs/cyrus-sasl ) skey? ( >=sys-auth/skey-1.1.5-r1 ) - sssd? ( sys-auth/sssd[sudo] ) - system-digest? ( - gcrypt? ( dev-libs/libgcrypt:= ) - !gcrypt? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) - ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) ) + sssd? ( sys-auth/sssd[sudo] ) " RDEPEND=" ${DEPEND} @@ -137,36 +135,34 @@ src_configure() { # until `make` time, so we have to use a full path here rather than # basing off other values. myeconfargs=( - --enable-zlib=system + # requires some python eclass + --disable-python --enable-tmpfiles.d="${EPREFIX}"/usr/lib/tmpfiles.d + --enable-zlib=system --with-editor="${EPREFIX}"/usr/libexec/editor --with-env-editor --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo --with-rundir="${EPREFIX}"/run/sudo - $(use_with secure-path secure-path "${SECURE_PATH}") --with-vardir="${EPREFIX}"/var/db/sudo --without-linux-audit --without-opie $(use_enable gcrypt) $(use_enable nls) $(use_enable sasl) + $(use_enable ssl openssl) + $(use_with ldap) + $(use_with ldap ldap_conf_file /etc/ldap.conf.sudo) $(use_with offensive insults) $(use_with offensive all-insults) - $(use_with ldap ldap_conf_file /etc/ldap.conf.sudo) - $(use_with ldap) $(use_with pam) - $(use_with skey) - $(use_with sssd) + $(use_with pam pam-login) + $(use_with secure-path secure-path "${SECURE_PATH}") $(use_with selinux) $(use_with sendmail) + $(use_with skey) + $(use_with sssd) ) - if use system-digest && ! use gcrypt; then - myeconfargs+=("--enable-openssl") - else - myeconfargs+=("--disable-openssl") - fi - econf "${myeconfargs[@]}" } @@ -209,7 +205,7 @@ src_install() { # Don't install into /run as that is a tmpfs most of the time # (bug #504854) - rm -rf "${ED}"/run + rm -rf "${ED}"/run || die find "${ED}" -type f -name "*.la" -delete || die #697812 } -- cgit v1.2.3