From eaa4df2ad0d1a6328b82fd01eee327061a7115b2 Mon Sep 17 00:00:00 2001 From: Matthew Thode Date: Fri, 23 Jun 2017 11:33:38 -0500 Subject: [PATCH] net-nds/openldap: added sha2 contrib support pre bug 621670 and pr \#4973 Package-Manager: Portage-2.3.6, Repoman-2.3.2 --- net-nds/openldap/metadata.xml | 3 ++- net-nds/openldap/openldap-2.4.45.ebuild | 29 ++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/net-nds/openldap/metadata.xml b/net-nds/openldap/metadata.xml index cda62a661593c..4e5e2c49039f2 100644 --- a/net-nds/openldap/metadata.xml +++ b/net-nds/openldap/metadata.xml @@ -4,7 +4,7 @@ ldap-bugs@gentoo.org - + Enable experimental backend options Enable support for kerberos init Enable ODBC and SQL backend options @@ -13,6 +13,7 @@ lanman passwords Build libraries & userspace tools only. Does not install any server code. Enable support for pbkdf2 passwords + Enable support for pw-sha2 password hashes. cpe:/a:openldap:openldap diff --git a/net-nds/openldap/openldap-2.4.45.ebuild b/net-nds/openldap/openldap-2.4.45.ebuild index b2493271ba45a..e81d3543054cb 100644 --- a/net-nds/openldap/openldap-2.4.45.ebuild +++ b/net-nds/openldap/openldap-2.4.45.ebuild @@ -24,7 +24,7 @@ IUSE_DAEMON="crypt samba slp tcpd experimental minimal" IUSE_BACKEND="+berkdb" IUSE_OVERLAY="overlays perl" IUSE_OPTIONAL="gnutls iodbc sasl ssl odbc debug ipv6 libressl +syslog selinux static-libs" -IUSE_CONTRIB="smbkrb5passwd kerberos kinit pbkdf2" +IUSE_CONTRIB="smbkrb5passwd kerberos kinit pbkdf2 sha2" IUSE_CONTRIB="${IUSE_CONTRIB} -cxx" IUSE="${IUSE_DAEMON} ${IUSE_BACKEND} ${IUSE_OVERLAY} ${IUSE_OPTIONAL} ${IUSE_CONTRIB}" @@ -618,6 +618,33 @@ multilib_src_compile() { pbkdf2.lo || die "linking pw-pbkdf2 failed" fi + if use sha2 ; then + cd "${S}/contrib/slapd-modules/passwd/sha2" || die + einfo "Compiling contrib-module: pw-sha2" + "${lt}" --mode=compile --tag=CC \ + "${CC}" \ + -I"${BUILD_DIR}"/include \ + -I../../../../include \ + ${CFLAGS} \ + -o sha2.lo \ + -c sha2.c || die "compiling pw-sha2 failed" + "${lt}" --mode=compile --tag=CC \ + "${CC}" \ + -I"${BUILD_DIR}"/include \ + -I../../../../include \ + ${CFLAGS} \ + -o slapd-sha2.lo \ + -c slapd-sha2.c || die "compiling pw-sha2 failed" + einfo "Linking contrib-module: pw-sha2" + "${lt}" --mode=link --tag=CC \ + "${CC}" -module \ + ${CFLAGS} \ + ${LDFLAGS} \ + -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \ + -o pw-sha2.la \ + sha2.lo slapd-sha2.lo || die "linking pw-sha2 failed" + fi + # We could build pw-radius if GNURadius would install radlib.h cd "${S}/contrib/slapd-modules/passwd" || die einfo "Compiling contrib-module: pw-netscape"