summaryrefslogtreecommitdiff
path: root/sys-auth/sssd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-09-25 20:21:45 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-09-25 20:21:45 +0100
commitc719fdcee603a5a706a45d10cb598762d56a727d (patch)
tree620cbf137661399a3fb1eff92914204f9a970713 /sys-auth/sssd
parentcc4618c9ba3d974948ebf340b542d8cb01db2f55 (diff)
gentoo resync : 25.09.2021
Diffstat (limited to 'sys-auth/sssd')
-rw-r--r--sys-auth/sssd/Manifest8
-rw-r--r--sys-auth/sssd/sssd-2.3.1-r2.ebuild2
-rw-r--r--sys-auth/sssd/sssd-2.3.1-r3.ebuild290
-rw-r--r--sys-auth/sssd/sssd-2.5.2-r1.ebuild302
-rw-r--r--sys-auth/sssd/sssd-2.5.2.ebuild2
5 files changed, 600 insertions, 4 deletions
diff --git a/sys-auth/sssd/Manifest b/sys-auth/sssd/Manifest
index ccf1a54bc3a7..1213b945e995 100644
--- a/sys-auth/sssd/Manifest
+++ b/sys-auth/sssd/Manifest
@@ -1,7 +1,11 @@
AUX sssd-2.3.1-test_ca-Look-for-libsofthsm2.so-in-usr-libdir-sofths.patch 1180 BLAKE2B 22b12936b8a4256af39396ce31a90742bc93331b2adb9c44442ddd1285ee19e03c24f99b899dfe35768d4383f7e46a241a0fa3975cc3cf4b32e93f1dd0805915 SHA512 d4519c7d9a63d6902da028584379457fda0be7b4e3b882498586504543e944462d93a3fe804f307562d75cd15257a1595c09bc1e804a41f47f1d2ff9999c7973
AUX sssd.conf 124 BLAKE2B b6f9c016a014510f97b036d23d5f50e1e13085220fe82b0e6ef7a3ceeb114e59af935f39e66e4ad60a46f43983930e5d381b16b0ed31ba4349abe38c4b509367 SHA512 f16908c44b213edbf6b0c6e8d49df92e8c06fc623279037074fe51e49b8aca7dc18f5ed83f71909fc8209df80dfc150583edb1687f88e61588bdf9d1fbf6ed5a
+DIST sssd-2.3.1-CVE-2021-3621.patch.bz2 3174 BLAKE2B 201c51fff92dd17d9517834e59a12422850ee3c5aab1efff51bcdc5b82521516589271222b6be36d12da2a388d122d37e9f455d593f22551ba9ea58ead694b49 SHA512 faffe46b710e3f8b2db54fc4f637b176b72f6bc31a2d5d1cae7a5ffc81609c4faa5decee1d6db4b2bf87451677c8eda068e153e38755f013afbce982daf58f65
DIST sssd-2.3.1.tar.gz 7186526 BLAKE2B 6d630fe75b9b426ef54adbe1704fde8e01fc34df7861028c07ce2985db8a151ce743d633061386fea6460fe8eabb89242b816d4bac87975bb9b7b2064ad1d547 SHA512 6aeb52d5222c5992d581296996749327bcaf276e4eb4413a6a32ea6529343432cfe413006aca4245c19b38b515be1c4c2ef88a157c617d889274179253355bc6
+DIST sssd-2.5.2-CVE-2021-3621.patch.bz2 3155 BLAKE2B c50e331f0f1acbb9ef8e6d54a63219da44df5e565608c24635d85a110fcc024f7d5293c4412bca64831a9a3a14e2c1188be1a802c76575ad6d7a83243d3d89c2 SHA512 650af7c67b3a807935c0875ee877d366facdf818492fb4244757448ad351454a279968ea5414e6b3cd116e873abe4f1aef2ccdaf790a4df0cf7f2a0078a41860
DIST sssd-2.5.2.tar.gz 7579208 BLAKE2B ec5d9aeaf5b5e05b56c01f9137f6f24db05544dbd48458d742285b60e7beb6d48af865f3415e11ce89e187f4643bbecf15bbb321859ec80cfe458eb781cea6c9 SHA512 a9bac7b2cc23022dce3bcda314c9c26a0a0914c448f6d5a51c5ba18670f04c1fd1a94cb20173235b6285df1dcc9251cb6b3f3e71a220037b4eb66668e6f33c48
-EBUILD sssd-2.3.1-r2.ebuild 7563 BLAKE2B b7dd8d9487bf8081aff7a20866e63ea37f97c12f4c6075af8080cf120d060c3075d9f0fa87234f5db6d9aa74ab58d0d53b21f059133975a819ee1b963d7e888a SHA512 3980637d2480a2247b897c0412a18c53536481eaf624089f5d697353688b13181d3928e8d665829f411d7bcf3e7da95b51a6407072a5c9548c7f66b47e92b30c
-EBUILD sssd-2.5.2.ebuild 7680 BLAKE2B 0b2dd1baa1329a4a1783acec57bd72f12b5455d97bae3f1f527e12c6caff201c1c41c006bb5de114ef4749608651d4eb5a2c078abecec16036e06f98e0ea6c08 SHA512 c0a1e683a6593681eb8de8f2b1459b4bf40e08f5085087cac6bc98c7bfef77f0e13433ec2fb8fcfa620b2b1666e24ac5d6371bc5092ae477b6cb86b3bee47703
+EBUILD sssd-2.3.1-r2.ebuild 7550 BLAKE2B bb7148a163aafe86d6efbcb29a48829ceed64ddbd328aa68e0d279478dcad70e77027647d4d38a9b56d317d76b024edfeb2d30656f50fd71414cecc25a1f91c9 SHA512 9ebb400f5bf139c18b04501c3b5ae4d74ce6dd4926f76f0b385d8f4b08d1e02b4f0d72cf7765bc30ddcfec50936954812b8522857d7c2b3d3859b12d6db9acb8
+EBUILD sssd-2.3.1-r3.ebuild 7688 BLAKE2B b6c5ef15a1fd5a38a7db69cd012a58674ba3bca3765dc2729a22655c087ee04323d688b07b6c62933b746e84b10ecc76c14516b422a0d35375b96eff4e0e302b SHA512 bd188adc0b8b027c5009d61d9a63b0b80e08633a65ab06bf4480ea7b58f0d6db87aedad5a28974500652fdce6aa20937e98e43f9778a22f10f78fa6fa7e8a501
+EBUILD sssd-2.5.2-r1.ebuild 7816 BLAKE2B f1420eabf6d2fe23695658eb3edb7736a233ad88e398b8088478836ba821eebb4db426710a1a459701560151a3e5dc18ab88a09a1d9cddb89849fbc38e658746 SHA512 ed3823463c6ee321c70b2585882c788e082f397984fb370007ab64dcfc805820e87cb8d6d64341f857a0d8f948d0e3c41562704269dc55e2816d1aa97387216c
+EBUILD sssd-2.5.2.ebuild 7667 BLAKE2B 23b845dba05d2e799a20a02e670759271e17bf6ac214de3a65a8628231490c305b2320d760b621b940bb4c3817a8a80c1efd254b9131a026d31ae0e599b31c84 SHA512 ad2472a15541dd78357b5a7ad42bf60bb0073dd770365ec77f5f0e7c9128941fed72ee9e1f4723d4cdb19e7d5e7d492746e75aff0b182a3b1108c7e65d35bf14
MISC metadata.xml 1182 BLAKE2B 8667ff4514a6cf81e044c53492760a20b4af07a345f75b48707587ce38903a5b5837e8aea5dec119a5f26cb0a5b7ce4577936cf6d4e666894bc5014ec6fd0c51 SHA512 e375a25d8dc8ccd1ec13e7b4bdf3782441b01ff15a0f0a213dbbb27ff9d30ff455e1efe1711096973b5c814dcb7f269af61cb455290b8948b06451e754b40912
diff --git a/sys-auth/sssd/sssd-2.3.1-r2.ebuild b/sys-auth/sssd/sssd-2.3.1-r2.ebuild
index 776c078d1d34..6ecd0e166c35 100644
--- a/sys-auth/sssd/sssd-2.3.1-r2.ebuild
+++ b/sys-auth/sssd/sssd-2.3.1-r2.ebuild
@@ -5,7 +5,7 @@ EAPI=7
PYTHON_COMPAT=( python3_{7,8,9} )
-inherit autotools flag-o-matic linux-info multilib-minimal python-single-r1 pam systemd toolchain-funcs
+inherit autotools linux-info multilib-minimal python-single-r1 pam systemd toolchain-funcs
DESCRIPTION="System Security Services Daemon provides access to identity and authentication"
HOMEPAGE="https://github.com/SSSD/sssd"
diff --git a/sys-auth/sssd/sssd-2.3.1-r3.ebuild b/sys-auth/sssd/sssd-2.3.1-r3.ebuild
new file mode 100644
index 000000000000..3f70659ea8f5
--- /dev/null
+++ b/sys-auth/sssd/sssd-2.3.1-r3.ebuild
@@ -0,0 +1,290 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit autotools linux-info multilib-minimal python-single-r1 pam systemd toolchain-funcs
+
+DESCRIPTION="System Security Services Daemon provides access to identity and authentication"
+HOMEPAGE="https://github.com/SSSD/sssd"
+SRC_URI="https://github.com/SSSD/sssd/releases/download/${PN}-${PV//./_}/${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-CVE-2021-3621.patch.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="acl doc +locator +netlink nfsv4 nls +man pac python samba selinux sudo systemd test valgrind"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="pac? ( samba )
+ python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="
+ >=app-crypt/mit-krb5-1.10.3
+ app-crypt/p11-kit
+ >=dev-libs/ding-libs-0.2
+ dev-libs/glib:2
+ >=dev-libs/cyrus-sasl-2.1.25-r3[kerberos]
+ >=dev-libs/libpcre-8.30:=
+ >=dev-libs/popt-1.16
+ >=dev-libs/openssl-1.0.2:0=
+ >=net-dns/bind-tools-9.9[gssapi]
+ >=net-dns/c-ares-1.7.4
+ >=net-nds/openldap-2.4.30[sasl]
+ >=sys-apps/dbus-1.6
+ >=sys-apps/keyutils-1.5:=
+ >=sys-libs/pam-0-r1[${MULTILIB_USEDEP}]
+ >=sys-libs/talloc-2.0.7
+ >=sys-libs/tdb-1.2.9
+ >=sys-libs/tevent-0.9.16
+ >=sys-libs/ldb-1.1.17-r1:=
+ virtual/libintl
+ locator? (
+ >=app-crypt/mit-krb5-1.12.2[${MULTILIB_USEDEP}]
+ >=net-dns/c-ares-1.10.0-r1[${MULTILIB_USEDEP}]
+ )
+ acl? ( net-fs/cifs-utils[acl] )
+ netlink? ( dev-libs/libnl:3 )
+ nfsv4? ( || ( >=net-fs/nfs-utils-2.3.1-r2 net-libs/libnfsidmap ) )
+ nls? ( >=sys-devel/gettext-0.18 )
+ pac? (
+ app-crypt/mit-krb5[${MULTILIB_USEDEP}]
+ net-fs/samba
+ )
+ python? ( ${PYTHON_DEPS} )
+ samba? ( >=net-fs/samba-4.10.2[winbind] )
+ selinux? (
+ >=sys-libs/libselinux-2.1.9
+ >=sys-libs/libsemanage-2.1
+ )
+ systemd? (
+ dev-libs/jansson:0=
+ net-libs/http-parser:0=
+ net-misc/curl:0=
+ )"
+RDEPEND="${DEPEND}
+ >=sys-libs/glibc-2.17[nscd]
+ selinux? ( >=sec-policy/selinux-sssd-2.20120725-r9 )"
+BDEPEND=">=sys-devel/autoconf-2.69-r5
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ test? (
+ dev-libs/check
+ dev-libs/softhsm:2
+ dev-util/cmocka
+ net-libs/gnutls[pkcs11,tools]
+ sys-libs/libfaketime
+ sys-libs/nss_wrapper
+ sys-libs/pam_wrapper
+ sys-libs/uid_wrapper
+ valgrind? ( dev-util/valgrind )
+ )
+ man? (
+ app-text/docbook-xml-dtd:4.4
+ >=dev-libs/libxslt-1.1.26
+ nls? ( app-text/po4a )
+ )"
+
+CONFIG_CHECK="~KEYS"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/ipa_hbac.h
+ /usr/include/sss_idmap.h
+ /usr/include/sss_nss_idmap.h
+ # --with-ifp
+ /usr/include/sss_sifp.h
+ /usr/include/sss_sifp_dbus.h
+ # from 1.15.3
+ /usr/include/sss_certmap.h
+)
+
+PATCHES=(
+ "${FILESDIR}"/${P}-test_ca-Look-for-libsofthsm2.so-in-usr-libdir-sofths.patch
+ "${WORKDIR}"/${P}-CVE-2021-3621.patch
+)
+
+pkg_setup() {
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ sed -i 's:/var/run:/run:' \
+ "${S}"/src/examples/logrotate || die
+
+ default
+ eautoreconf
+ multilib_copy_sources
+ if use python && multilib_is_native_abi; then
+ python_setup
+ fi
+}
+
+src_configure() {
+ local native_dbus_cflags=$($(tc-getPKG_CONFIG) --cflags dbus-1)
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ myconf+=(
+ --localstatedir="${EPREFIX}"/var
+ --runstatedir="${EPREFIX}"/run
+ --with-pid-path="${EPREFIX}"/run
+ --with-plugin-path="${EPREFIX}"/usr/$(get_libdir)/sssd
+ --enable-pammoddir="${EPREFIX}"/$(getpam_mod_dir)
+ --with-ldb-lib-dir="${EPREFIX}"/usr/$(get_libdir)/samba/ldb
+ --with-db-path="${EPREFIX}"/var/lib/sss/db
+ --with-gpo-cache-path="${EPREFIX}"/var/lib/sss/gpo_cache
+ --with-pubconf-path="${EPREFIX}"/var/lib/sss/pubconf
+ --with-pipe-path="${EPREFIX}"/var/lib/sss/pipes
+ --with-mcache-path="${EPREFIX}"/var/lib/sss/mc
+ --with-secrets-db-path="${EPREFIX}"/var/lib/sss/secrets
+ --with-log-path="${EPREFIX}"/var/log/sssd
+ --with-os=gentoo
+ --with-nscd="${EPREFIX}"/usr/sbin/nscd
+ --with-unicode-lib="glib2"
+ --disable-rpath
+ --sbindir=/usr/sbin
+ --with-crypto="libcrypto"
+ --enable-local-provider
+ $(multilib_native_use_with systemd kcm)
+ $(multilib_native_use_with systemd secrets)
+ $(use_with samba)
+ --with-smb-idmap-interface-version=6
+ $(multilib_native_use_enable acl cifs-idmap-plugin)
+ $(multilib_native_use_with selinux)
+ $(multilib_native_use_with selinux semanage)
+ $(use_enable locator krb5-locator-plugin)
+ $(use_enable pac pac-responder)
+ $(multilib_native_use_with nfsv4 nfsv4-idmapd-plugin)
+ $(use_enable nls)
+ $(multilib_native_use_with netlink libnl)
+ $(multilib_native_use_with man manpages)
+ $(multilib_native_use_with sudo)
+ $(multilib_native_with autofs)
+ $(multilib_native_with ssh)
+ $(use_enable valgrind)
+ --without-python2-bindings
+ $(multilib_native_use_with python python3-bindings)
+ )
+
+ # Annoyingly configure requires that you pick systemd XOR sysv
+ if use systemd; then
+ myconf+=(
+ --with-initscript="systemd"
+ --with-systemdunitdir=$(systemd_get_systemunitdir)
+ )
+ else
+ myconf+=(--with-initscript="sysv")
+ fi
+
+ if ! multilib_is_native_abi; then
+ # work-around all the libraries that are used for CLI and server
+ myconf+=(
+ {POPT,TALLOC,TDB,TEVENT,LDB}_{CFLAGS,LIBS}=' '
+ # ldb headers are fine since native needs it
+ # ldb lib fails... but it does not seem to bother
+ {DHASH,COLLECTION,INI_CONFIG_V{0,1,1_1,1_3}}_{CFLAGS,LIBS}=' '
+ {PCRE,CARES,SYSTEMD_LOGIN,SASL,GLIB2,DBUS,CRYPTO,P11_KIT}_{CFLAGS,LIBS}=' '
+ {NDR_NBT,SMBCLIENT,NDR_KRB5PAC}_{CFLAGS,LIBS}=' '
+
+ # use native include path for dbus (needed for build)
+ DBUS_CFLAGS="${native_dbus_cflags}"
+
+ # non-pkgconfig checks
+ ac_cv_lib_ldap_ldap_search=yes
+ --without-secrets
+ --without-kcm
+ )
+ fi
+
+ econf "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ use doc && emake docs
+ if use man || use nls; then
+ emake update-po
+ fi
+ else
+ emake libnss_sss.la pam_sss.la
+ use locator && emake sssd_krb5_locator_plugin.la
+ use pac && emake sssd_pac_plugin.la
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ emake -j1 DESTDIR="${D}" "${_at_args[@]}" install
+ if use python; then
+ python_optimize
+ python_fix_shebang "${ED}"
+ fi
+
+ else
+ # easier than playing with automake...
+ dopammod .libs/pam_sss.so
+
+ into /
+ dolib.so .libs/libnss_sss.so*
+
+ if use locator; then
+ exeinto /usr/$(get_libdir)/krb5/plugins/libkrb5
+ doexe .libs/sssd_krb5_locator_plugin.so
+ fi
+
+ if use pac; then
+ exeinto /usr/$(get_libdir)/krb5/plugins/authdata
+ doexe .libs/sssd_pac_plugin.so
+ fi
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ find "${ED}" -type f -name '*.la' -delete || die
+
+ insinto /etc/sssd
+ insopts -m600
+ doins "${S}"/src/examples/sssd-example.conf
+
+ insinto /etc/logrotate.d
+ insopts -m644
+ newins "${S}"/src/examples/logrotate sssd
+
+ newconfd "${FILESDIR}"/sssd.conf sssd
+
+ keepdir /var/lib/sss/db
+ keepdir /var/lib/sss/deskprofile
+ keepdir /var/lib/sss/gpo_cache
+ keepdir /var/lib/sss/keytabs
+ keepdir /var/lib/sss/mc
+ keepdir /var/lib/sss/pipes/private
+ keepdir /var/lib/sss/pubconf/krb5.include.d
+ keepdir /var/lib/sss/secrets
+ keepdir /var/log/sssd
+
+ # strip empty dirs
+ if ! use doc ; then
+ rm -r "${ED}"/usr/share/doc/"${PF}"/doc || die
+ rm -r "${ED}"/usr/share/doc/"${PF}"/{hbac,idmap,nss_idmap,sss_simpleifp}_doc || die
+ fi
+
+ rm -r "${ED}"/run || die
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+pkg_postinst() {
+ elog "You must set up sssd.conf (default installed into /etc/sssd)"
+ elog "and (optionally) configuration in /etc/pam.d in order to use SSSD"
+ elog "features. Please see howto in https://sssd.io/docs/design_pages/smartcard_authentication_require.html"
+}
diff --git a/sys-auth/sssd/sssd-2.5.2-r1.ebuild b/sys-auth/sssd/sssd-2.5.2-r1.ebuild
new file mode 100644
index 000000000000..6f4a3307f99b
--- /dev/null
+++ b/sys-auth/sssd/sssd-2.5.2-r1.ebuild
@@ -0,0 +1,302 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit autotools linux-info multilib-minimal python-single-r1 pam systemd toolchain-funcs
+
+DESCRIPTION="System Security Services Daemon provides access to identity and authentication"
+HOMEPAGE="https://github.com/SSSD/sssd"
+SRC_URI="https://github.com/SSSD/sssd/releases/download/${PV}/${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-CVE-2021-3621.patch.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="acl doc +locator +netlink nfsv4 nls +man pac python samba selinux sudo systemd systemtap test valgrind"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ pac? ( samba )
+ test? ( sudo )
+ valgrind? ( test )"
+
+BDEPEND=">=sys-devel/autoconf-2.69-r5
+ virtual/pkgconfig
+ ${PYTHON_DEPS}
+ doc? ( app-doc/doxygen )
+ test? (
+ dev-libs/check
+ dev-libs/softhsm:2
+ dev-util/cmocka
+ net-libs/gnutls[pkcs11,tools]
+ sys-libs/libfaketime
+ sys-libs/nss_wrapper
+ sys-libs/pam_wrapper
+ sys-libs/uid_wrapper
+ valgrind? ( dev-util/valgrind )
+ )
+ man? (
+ app-text/docbook-xml-dtd:4.4
+ >=dev-libs/libxslt-1.1.26
+ nls? ( app-text/po4a )
+ )"
+
+DEPEND=">=app-crypt/mit-krb5-1.19.1[${MULTILIB_USEDEP}]
+ app-crypt/p11-kit
+ >=dev-libs/ding-libs-0.2
+ dev-libs/glib:2
+ >=dev-libs/cyrus-sasl-2.1.25-r3[kerberos]
+ >=dev-libs/libpcre-8.30:=
+ >=dev-libs/popt-1.16
+ >=dev-libs/openssl-1.0.2:0=
+ >=net-dns/bind-tools-9.9[gssapi]
+ >=net-dns/c-ares-1.7.4
+ >=net-nds/openldap-2.4.30[sasl]
+ >=sys-apps/dbus-1.6
+ >=sys-apps/keyutils-1.5:=
+ >=sys-libs/pam-0-r1[${MULTILIB_USEDEP}]
+ >=sys-libs/talloc-2.0.7
+ >=sys-libs/tdb-1.2.9
+ >=sys-libs/tevent-0.9.16
+ >=sys-libs/ldb-1.1.17-r1:=
+ virtual/libintl
+ locator? (
+ >=net-dns/c-ares-1.10.0-r1[${MULTILIB_USEDEP}]
+ )
+ acl? ( net-fs/cifs-utils[acl] )
+ netlink? ( dev-libs/libnl:3 )
+ nfsv4? ( || ( >=net-fs/nfs-utils-2.3.1-r2 net-libs/libnfsidmap ) )
+ nls? ( >=sys-devel/gettext-0.18 )
+ pac? (
+ net-fs/samba
+ )
+ python? ( ${PYTHON_DEPS} )
+ samba? ( >=net-fs/samba-4.10.2[winbind] )
+ selinux? (
+ >=sys-libs/libselinux-2.1.9
+ >=sys-libs/libsemanage-2.1
+ )
+ systemd? (
+ dev-libs/jansson:0=
+ net-libs/http-parser:0=
+ net-misc/curl:0=
+ )
+ systemtap? ( dev-util/systemtap )"
+RDEPEND="${DEPEND}
+ >=sys-libs/glibc-2.17[nscd]
+ selinux? ( >=sec-policy/selinux-sssd-2.20120725-r9 )"
+
+CONFIG_CHECK="~KEYS"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/ipa_hbac.h
+ /usr/include/sss_idmap.h
+ /usr/include/sss_nss_idmap.h
+ # --with-ifp
+ /usr/include/sss_sifp.h
+ /usr/include/sss_sifp_dbus.h
+ # from 1.15.3
+ /usr/include/sss_certmap.h
+)
+
+PATCHES=(
+ "${WORKDIR}"/${P}-CVE-2021-3621.patch
+)
+
+pkg_setup() {
+ linux-info_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e 's:/var/run:/run:' \
+ "${S}"/src/examples/logrotate \
+ || die
+
+ # disable flaky test, see https://github.com/SSSD/sssd/issues/5631
+ sed -i \
+ -e '/^\s*pam-srv-tests[ \\]*$/d' \
+ "${S}"/Makefile.am \
+ || die
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+src_configure() {
+ local native_dbus_cflags=$($(tc-getPKG_CONFIG) --cflags dbus-1)
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ myconf+=(
+ --localstatedir="${EPREFIX}"/var
+ --runstatedir="${EPREFIX}"/run
+ --with-pid-path="${EPREFIX}"/run
+ --with-plugin-path="${EPREFIX}"/usr/$(get_libdir)/sssd
+ --enable-pammoddir="${EPREFIX}"/$(getpam_mod_dir)
+ --with-ldb-lib-dir="${EPREFIX}"/usr/$(get_libdir)/samba/ldb
+ --with-db-path="${EPREFIX}"/var/lib/sss/db
+ --with-gpo-cache-path="${EPREFIX}"/var/lib/sss/gpo_cache
+ --with-pubconf-path="${EPREFIX}"/var/lib/sss/pubconf
+ --with-pipe-path="${EPREFIX}"/var/lib/sss/pipes
+ --with-mcache-path="${EPREFIX}"/var/lib/sss/mc
+ --with-secrets-db-path="${EPREFIX}"/var/lib/sss/secrets
+ --with-log-path="${EPREFIX}"/var/log/sssd
+ --with-os=gentoo
+ --with-nscd="${EPREFIX}"/usr/sbin/nscd
+ --with-unicode-lib="glib2"
+ --disable-rpath
+ --disable-static
+ --sbindir=/usr/sbin
+ --enable-local-provider
+ $(multilib_native_use_with systemd kcm)
+ $(multilib_native_use_with systemd secrets)
+ $(use_with samba)
+ --with-smb-idmap-interface-version=6
+ $(multilib_native_use_enable acl cifs-idmap-plugin)
+ $(multilib_native_use_with selinux)
+ $(multilib_native_use_with selinux semanage)
+ $(use_enable locator krb5-locator-plugin)
+ $(use_enable pac pac-responder)
+ $(multilib_native_use_with nfsv4 nfsv4-idmapd-plugin)
+ $(use_enable nls)
+ $(multilib_native_use_with netlink libnl)
+ $(multilib_native_use_with man manpages)
+ $(multilib_native_use_with sudo)
+ $(multilib_native_with autofs)
+ $(multilib_native_with ssh)
+ $(use_enable systemtap)
+ $(use_enable valgrind)
+ --without-python2-bindings
+ $(multilib_native_use_with python python3-bindings)
+ )
+
+ # Annoyingly configure requires that you pick systemd XOR sysv
+ if use systemd; then
+ myconf+=(
+ --with-initscript="systemd"
+ --with-systemdunitdir=$(systemd_get_systemunitdir)
+ )
+ else
+ myconf+=(--with-initscript="sysv")
+ fi
+
+ if ! multilib_is_native_abi; then
+ # work-around all the libraries that are used for CLI and server
+ myconf+=(
+ {POPT,TALLOC,TDB,TEVENT,LDB}_{CFLAGS,LIBS}=' '
+ # ldb headers are fine since native needs it
+ # ldb lib fails... but it does not seem to bother
+ {DHASH,COLLECTION,INI_CONFIG_V{0,1,1_1,1_3}}_{CFLAGS,LIBS}=' '
+ {PCRE,CARES,SYSTEMD_LOGIN,SASL,GLIB2,DBUS,CRYPTO,P11_KIT}_{CFLAGS,LIBS}=' '
+ {NDR_NBT,SMBCLIENT,NDR_KRB5PAC}_{CFLAGS,LIBS}=' '
+
+ # use native include path for dbus (needed for build)
+ DBUS_CFLAGS="${native_dbus_cflags}"
+
+ # non-pkgconfig checks
+ ac_cv_lib_ldap_ldap_search=yes
+ --without-secrets
+ --without-kcm
+ )
+ fi
+
+ econf "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ use doc && emake docs
+ if use man || use nls; then
+ emake update-po
+ fi
+ else
+ emake libnss_sss.la pam_sss.la
+ use locator && emake sssd_krb5_locator_plugin.la
+ use pac && emake sssd_pac_plugin.la
+ fi
+}
+
+multilib_src_test() {
+ if multilib_is_native_abi; then
+ local -x CK_TIMEOUT_MULTIPLIER=10
+ emake check VERBOSE=yes
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ emake -j1 DESTDIR="${D}" "${_at_args[@]}" install
+ if use python; then
+ python_optimize
+ python_fix_shebang "${ED}"
+ fi
+ else
+ # easier than playing with automake...
+ dopammod .libs/pam_sss.so
+
+ into /
+ dolib.so .libs/libnss_sss.so*
+
+ if use locator; then
+ exeinto /usr/$(get_libdir)/krb5/plugins/libkrb5
+ doexe .libs/sssd_krb5_locator_plugin.so
+ fi
+
+ if use pac; then
+ exeinto /usr/$(get_libdir)/krb5/plugins/authdata
+ doexe .libs/sssd_pac_plugin.so
+ fi
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ find "${ED}" -type f -name '*.la' -delete || die
+
+ insinto /etc/sssd
+ insopts -m600
+ doins "${S}"/src/examples/sssd-example.conf
+
+ insinto /etc/logrotate.d
+ insopts -m644
+ newins "${S}"/src/examples/logrotate sssd
+
+ newconfd "${FILESDIR}"/sssd.conf sssd
+
+ keepdir /var/lib/sss/db
+ keepdir /var/lib/sss/deskprofile
+ keepdir /var/lib/sss/gpo_cache
+ keepdir /var/lib/sss/keytabs
+ keepdir /var/lib/sss/mc
+ keepdir /var/lib/sss/pipes/private
+ keepdir /var/lib/sss/pubconf/krb5.include.d
+ keepdir /var/lib/sss/secrets
+ keepdir /var/log/sssd
+
+ # strip empty dirs
+ if ! use doc; then
+ rm -r "${ED}"/usr/share/doc/"${PF}"/doc || die
+ rm -r "${ED}"/usr/share/doc/"${PF}"/{hbac,idmap,nss_idmap,sss_simpleifp}_doc || die
+ fi
+
+ rm -r "${ED}"/run || die
+}
+
+pkg_postinst() {
+ elog "You must set up sssd.conf (default installed into /etc/sssd)"
+ elog "and (optionally) configuration in /etc/pam.d in order to use SSSD"
+ elog "features. Please see howto in https://sssd.io/docs/design_pages/smartcard_authentication_require.html"
+}
diff --git a/sys-auth/sssd/sssd-2.5.2.ebuild b/sys-auth/sssd/sssd-2.5.2.ebuild
index 4759c47cccdb..9c003fca8553 100644
--- a/sys-auth/sssd/sssd-2.5.2.ebuild
+++ b/sys-auth/sssd/sssd-2.5.2.ebuild
@@ -5,7 +5,7 @@ EAPI=7
PYTHON_COMPAT=( python3_{8..10} )
-inherit autotools flag-o-matic linux-info multilib-minimal python-single-r1 pam systemd toolchain-funcs
+inherit autotools linux-info multilib-minimal python-single-r1 pam systemd toolchain-funcs
DESCRIPTION="System Security Services Daemon provides access to identity and authentication"
HOMEPAGE="https://github.com/SSSD/sssd"