summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Thode <prometheanfire@gentoo.org>2017-06-23 11:33:38 -0500
committerMatthew Thode <prometheanfire@gentoo.org>2017-06-23 11:34:27 -0500
commiteaa4df2ad0d1a6328b82fd01eee327061a7115b2 (patch)
tree2109c2dc8a548839c24298878e99d888849e74fe /net-nds
parentx11-wm/page: add missing requirement. (diff)
downloadgentoo-eaa4df2ad0d1a6328b82fd01eee327061a7115b2.tar.gz
gentoo-eaa4df2ad0d1a6328b82fd01eee327061a7115b2.tar.bz2
gentoo-eaa4df2ad0d1a6328b82fd01eee327061a7115b2.zip
net-nds/openldap: added sha2 contrib support pre bug 621670 and pr \#4973
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'net-nds')
-rw-r--r--net-nds/openldap/metadata.xml3
-rw-r--r--net-nds/openldap/openldap-2.4.45.ebuild29
2 files changed, 30 insertions, 2 deletions
diff --git a/net-nds/openldap/metadata.xml b/net-nds/openldap/metadata.xml
index cda62a661593..4e5e2c49039f 100644
--- a/net-nds/openldap/metadata.xml
+++ b/net-nds/openldap/metadata.xml
@@ -4,7 +4,7 @@
<maintainer type="project">
<email>ldap-bugs@gentoo.org</email>
</maintainer>
- <use>
+ <use>
<flag name="experimental">Enable experimental backend options</flag>
<flag name="kinit">Enable support for kerberos init</flag>
<flag name="odbc">Enable ODBC and SQL backend options</flag>
@@ -13,6 +13,7 @@
lanman passwords</flag>
<flag name="minimal">Build libraries &amp; userspace tools only. Does not install any server code.</flag>
<flag name="pbkdf2">Enable support for pbkdf2 passwords</flag>
+ <flag name="sha2">Enable support for pw-sha2 password hashes.</flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:openldap:openldap</remote-id>
diff --git a/net-nds/openldap/openldap-2.4.45.ebuild b/net-nds/openldap/openldap-2.4.45.ebuild
index b2493271ba45..e81d3543054c 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"