diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2009-07-28 21:28:25 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2009-07-28 21:28:25 +0000 |
commit | 75cb260dd94a67f61806ea541f67c38521cd6857 (patch) | |
tree | a3f1d5fa51e7c5d10e0ccb7514d4e0d4a57d3a9d /net-nds/openldap/files | |
parent | Version bump thanks to Alexander Stein, fixes bug #278387. (diff) | |
download | gentoo-2-75cb260dd94a67f61806ea541f67c38521cd6857.tar.gz gentoo-2-75cb260dd94a67f61806ea541f67c38521cd6857.tar.bz2 gentoo-2-75cb260dd94a67f61806ea541f67c38521cd6857.zip |
Bug #219371: Install C++ libraries and headers as needed. Bug #233633: Fix compile with USE="samba gnutls". Bug #273699: Fix slapd init ordering. Bug #261186: Build plugins with libtool instead of directly. Bug #279461: Update smbk5pwd building.
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'net-nds/openldap/files')
3 files changed, 115 insertions, 5 deletions
diff --git a/net-nds/openldap/files/openldap-2.4.17-contrib-smbk5pwd.patch b/net-nds/openldap/files/openldap-2.4.17-contrib-smbk5pwd.patch index 670324929e82..bf59170adef4 100644 --- a/net-nds/openldap/files/openldap-2.4.17-contrib-smbk5pwd.patch +++ b/net-nds/openldap/files/openldap-2.4.17-contrib-smbk5pwd.patch @@ -6,7 +6,7 @@ diff -Nuar --exclude 'openldap-2.4*' --exclude p -I '$OpenLDAP' openldap-2.4.17. # <http://www.OpenLDAP.org/license.html>. +#libexecdir=/usr/lib/openldap -+moduledir=$(libexecdir)/openldap ++moduledir=$(libexecdir) LIBTOOL=../../../libtool -OPT=-g -O2 +#OPT= @@ -56,6 +56,6 @@ diff -Nuar --exclude 'openldap-2.4*' --exclude p -I '$OpenLDAP' openldap-2.4.17. - mkdir -p $(PREFIX)/lib/openldap - $(LIBTOOL) --mode=install cp smbk5pwd.la $(PREFIX)/lib/openldap - $(LIBTOOL) --finish $(PREFIX)/lib -+ mkdir -p $(moduledir) -+ $(LIBTOOL) --mode=install cp smbk5pwd.la $(moduledir) -+ $(LIBTOOL) --finish $(libexecdir) ++ mkdir -p $(DESTDIR)$(moduledir) ++ $(LIBTOOL) --mode=install cp smbk5pwd.la $(DESTDIR)$(moduledir) ++ $(LIBTOOL) --finish $(DESTDIR)$(libexecdir) diff --git a/net-nds/openldap/files/openldap-2.4.17-fix-lmpasswd-gnutls-symbols.patch b/net-nds/openldap/files/openldap-2.4.17-fix-lmpasswd-gnutls-symbols.patch new file mode 100644 index 000000000000..e5117468f809 --- /dev/null +++ b/net-nds/openldap/files/openldap-2.4.17-fix-lmpasswd-gnutls-symbols.patch @@ -0,0 +1,109 @@ +If GnuTLS is used, the lmpasswd module for USE=samba does not compile. +Forward-port an old Debian patch that upstream never applied. + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> +Signed-off-by: Steffen Hau <steffen@hauihau.de> +X-Gentoo-Bug: http://bugs.gentoo.org/show_bug.cgi?id=233633 +X-Upstream-Bug: http://www.openldap.org/its/index.cgi/Software%20Enhancements?id=4997 +X-Debian-Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=245341 + +--- openldap-2.4.17.orig/libraries/liblutil/passwd.c 2009-07-27 18:59:19.635995474 -0700 ++++ openldap-2.4.17/libraries/liblutil/passwd.c 2009-07-27 19:01:13.588069010 -0700 +@@ -51,6 +51,26 @@ typedef unsigned char des_data_block[8]; + typedef PK11Context *des_context[1]; + #define DES_ENCRYPT CKA_ENCRYPT + ++#elif defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT) ++# include <gcrypt.h> ++static int gcrypt_init = 0; ++ ++typedef const void* des_key; ++typedef unsigned char des_cblock[8]; ++typedef des_cblock des_data_block; ++typedef int des_key_schedule; /* unused */ ++typedef des_key_schedule des_context; /* unused */ ++#define des_failed(encrypted) 0 ++#define des_finish(key, schedule) ++ ++#define des_set_key_unchecked( key, key_sched ) \ ++ gcry_cipher_setkey( hd, key, 8 ) ++ ++#define des_ecb_encrypt( input, output, key_sched, enc ) \ ++ gcry_cipher_encrypt( hd, *output, 8, *input, 8 ) ++ ++#define des_set_odd_parity( key ) do {} while(0) ++ + #endif + + #endif /* SLAPD_LMHASH */ +@@ -651,7 +671,7 @@ static int chk_md5( + + #ifdef SLAPD_LMHASH + +-#if defined(HAVE_OPENSSL) ++#if defined(HAVE_OPENSSL) || defined(HAVE_GNUTLS_GNUTLS_H) + + /* + * abstract away setting the parity. +@@ -841,6 +861,19 @@ static int chk_lanman( + des_data_block StdText = "KGS!@#$%"; + des_data_block PasswordHash1, PasswordHash2; + char PasswordHash[33], storedPasswordHash[33]; ++ ++#if defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT) ++ gcry_cipher_hd_t hd; ++ ++ if ( !gcrypt_init ) { ++ gcry_check_version( GCRYPT_VERSION ); ++ gcrypt_init = 1; ++ } ++ ++ schedule = schedule; /* unused - avoid warning */ ++ ++ gcry_cipher_open( &hd, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0 ); ++#endif /* HAVE_GNUTLS_GNUTLS_H && !DES_ENCRYPT */ + + for( i=0; i<cred->bv_len; i++) { + if(cred->bv_val[i] == '\0') { +@@ -883,6 +916,10 @@ static int chk_lanman( + strncpy( storedPasswordHash, passwd->bv_val, 32 ); + storedPasswordHash[32] = '\0'; + ldap_pvt_str2lower( storedPasswordHash ); ++ ++#if defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT) ++ gcry_cipher_close( hd ); ++#endif /* HAVE_GNUTLS_GNUTLS_H && !DES_ENCRYPT */ + + return memcmp( PasswordHash, storedPasswordHash, 32) ? LUTIL_PASSWD_ERR : LUTIL_PASSWD_OK; + } +@@ -1138,6 +1175,19 @@ static int hash_lanman( + des_data_block PasswordHash1, PasswordHash2; + char PasswordHash[33]; + ++#if defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT) ++ gcry_cipher_hd_t hd; ++ ++ if ( !gcrypt_init ) { ++ gcry_check_version( GCRYPT_VERSION ); ++ gcrypt_init = 1; ++ } ++ ++ schedule = schedule; /* unused - avoid warning */ ++ ++ gcry_cipher_open( &hd, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0 ); ++#endif /* HAVE_GNUTLS_GNUTLS_H && !DES_ENCRYPT */ ++ + for( i=0; i<passwd->bv_len; i++) { + if(passwd->bv_val[i] == '\0') { + return LUTIL_PASSWD_ERR; /* NUL character in password */ +@@ -1168,6 +1218,10 @@ static int hash_lanman( + + hash->bv_val = PasswordHash; + hash->bv_len = 32; ++ ++#if defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT) ++ gcry_cipher_close( hd ); ++#endif /* HAVE_GNUTLS_GNUTLS_H && !DES_ENCRYPT */ + + return pw_string( scheme, hash ); + } diff --git a/net-nds/openldap/files/slapd-initd b/net-nds/openldap/files/slapd-initd index 963188af0448..0746cf47cd4e 100644 --- a/net-nds/openldap/files/slapd-initd +++ b/net-nds/openldap/files/slapd-initd @@ -1,10 +1,11 @@ #!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/files/slapd-initd,v 1.2 2008/10/14 10:29:44 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/files/slapd-initd,v 1.3 2009/07/28 21:28:25 robbat2 Exp $ depend() { need net + before dbus hald avahi-daemon } start() { |