net-nds/openldap: bump and add samba4 overlay
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@2251 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
25
net-nds/openldap/files/DB_CONFIG.fast.example
Normal file
25
net-nds/openldap/files/DB_CONFIG.fast.example
Normal file
@@ -0,0 +1,25 @@
|
||||
# $OpenLDAP: pkg/ldap/servers/slapd/DB_CONFIG,v 1.1 2004/06/18 02:49:08 kurt Exp $
|
||||
# Example DB_CONFIG file for use with slapd(8) BDB/HDB databases.
|
||||
#
|
||||
# See Sleepycat Berkeley DB documentation
|
||||
# <http://www.sleepycat.com/docs/ref/env/db_config.html>
|
||||
# for detail description of DB_CONFIG syntax and semantics.
|
||||
#
|
||||
# Hints can also be found in the OpenLDAP Software FAQ
|
||||
# <http://www.openldap.org/faq/index.cgi?file=2>
|
||||
|
||||
# one 0.25 GB cache
|
||||
set_cachesize 0 16777216 0
|
||||
|
||||
# Data Directory
|
||||
#set_data_dir db
|
||||
|
||||
# Transaction Log settings
|
||||
set_lg_regionmax 262144
|
||||
set_lg_bsize 524288
|
||||
#set_lg_dir logs
|
||||
|
||||
# When using (and only when using) slapadd(8) or slapindex(8),
|
||||
# the following flags may be useful:
|
||||
#set_flags DB_TXN_NOSYNC
|
||||
#set_flags DB_TXN_NOT_DURABLE
|
||||
12
net-nds/openldap/files/openldap-2.2.14-perlthreadsfix.patch
Normal file
12
net-nds/openldap/files/openldap-2.2.14-perlthreadsfix.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff -ur openldap-2.2.14.orig/servers/slapd/back-perl/Makefile.in openldap-2.2.14/servers/slapd/back-perl/Makefile.in
|
||||
--- openldap-2.2.14.orig/servers/slapd/back-perl/Makefile.in 2004-04-12 11:20:14.000000000 -0700
|
||||
+++ openldap-2.2.14/servers/slapd/back-perl/Makefile.in 2004-06-20 18:43:41.000000000 -0700
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
shared_LDAP_LIBS = $(LDAP_LIBLDAP_R_LA) $(LDAP_LIBLBER_LA)
|
||||
NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
||||
-UNIX_LINK_LIBS = $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
||||
+UNIX_LINK_LIBS = $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS) `perl -MExtUtils::Embed -e ldopts`
|
||||
|
||||
LIBBASE = back_perl
|
||||
|
||||
11
net-nds/openldap/files/openldap-2.4.11-libldap_r.patch
Normal file
11
net-nds/openldap/files/openldap-2.4.11-libldap_r.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
diff -Nuar openldap-2.4.11.orig/servers/slapd/slapi/Makefile.in openldap-2.4.11/servers/slapd/slapi/Makefile.in
|
||||
--- openldap-2.4.11.orig/servers/slapd/slapi/Makefile.in 2008-02-11 15:26:49.000000000 -0800
|
||||
+++ openldap-2.4.11/servers/slapd/slapi/Makefile.in 2008-10-14 02:10:18.402799262 -0700
|
||||
@@ -37,6 +37,7 @@
|
||||
XLIBS = $(LIBRARY)
|
||||
XXLIBS =
|
||||
NT_LINK_LIBS = $(AC_LIBS)
|
||||
+UNIX_LINK_LIBS = ../../../libraries/libldap_r/libldap_r.la $(LTHREAD_LIBS)
|
||||
|
||||
XINCPATH = -I$(srcdir)/.. -I$(srcdir)
|
||||
XDEFS = $(MODULES_CPPFLAGS)
|
||||
12
net-nds/openldap/files/openldap-2.4.15-ppolicy.patch
Normal file
12
net-nds/openldap/files/openldap-2.4.15-ppolicy.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
--- openldap-2.4.15/clients/tools/common.c.orig 2009-02-05 15:05:03.000000000 -0800
|
||||
+++ openldap-2.4.15/clients/tools/common.c 2009-03-21 01:45:14.000000000 -0700
|
||||
@@ -1315,8 +1315,8 @@
|
||||
int nsctrls = 0;
|
||||
|
||||
#ifdef LDAP_CONTROL_PASSWORDPOLICYREQUEST
|
||||
+ LDAPControl c;
|
||||
if ( ppolicy ) {
|
||||
- LDAPControl c;
|
||||
c.ldctl_oid = LDAP_CONTROL_PASSWORDPOLICYREQUEST;
|
||||
c.ldctl_value.bv_val = NULL;
|
||||
c.ldctl_value.bv_len = 0;
|
||||
@@ -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 );
|
||||
}
|
||||
11
net-nds/openldap/files/openldap-2.4.17-gcc44.patch
Normal file
11
net-nds/openldap/files/openldap-2.4.17-gcc44.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
diff -ur openldap-2.4.17.orig/contrib/ldapc++/src/SaslInteractionHandler.cpp openldap-2.4.17/contrib/ldapc++/src/SaslInteractionHandler.cpp
|
||||
--- openldap-2.4.17.orig/contrib/ldapc++/src/SaslInteractionHandler.cpp 2008-04-15 02:09:26.000000000 +0300
|
||||
+++ openldap-2.4.17/contrib/ldapc++/src/SaslInteractionHandler.cpp 2009-08-10 13:21:24.000000000 +0300
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <termios.h>
|
||||
#endif
|
||||
|
||||
+#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "SaslInteractionHandler.h"
|
||||
#include "SaslInteraction.h"
|
||||
@@ -0,0 +1,51 @@
|
||||
diff -Nuar openldap-2.4.19.orig/contrib/slapd-modules/smbk5pwd/Makefile openldap-2.4.19/contrib/slapd-modules/smbk5pwd/Makefile
|
||||
--- openldap-2.4.19.orig/contrib/slapd-modules/smbk5pwd/Makefile 2009-10-02 21:16:53.000000000 +0000
|
||||
+++ openldap-2.4.19/contrib/slapd-modules/smbk5pwd/Makefile 2009-11-03 21:01:41.199550611 +0000
|
||||
@@ -13,22 +13,26 @@
|
||||
# <http://www.OpenLDAP.org/license.html>.
|
||||
|
||||
LIBTOOL=../../../libtool
|
||||
-OPT=-g -O2
|
||||
+#OPT=
|
||||
CC=gcc
|
||||
|
||||
# Omit DO_KRB5 or DO_SAMBA if you don't want to support it.
|
||||
-DEFS=-DDO_KRB5 -DDO_SAMBA
|
||||
+#DEFS=
|
||||
|
||||
-HEIMDAL_INC=-I/usr/heimdal/include
|
||||
+#KRB5_INC=
|
||||
SSL_INC=
|
||||
LDAP_INC=-I../../../include -I../../../servers/slapd
|
||||
-INCS=$(LDAP_INC) $(HEIMDAL_INC) $(SSL_INC)
|
||||
+INCS=$(LDAP_INC) $(SSL_INC) $(KRB5_INC)
|
||||
|
||||
-HEIMDAL_LIB=-L/usr/heimdal/lib -lkrb5 -lkadm5srv
|
||||
+KRB5_LIB=-lkrb5 -lkadm5srv
|
||||
SSL_LIB=-lcrypto
|
||||
-LDAP_LIB=-lldap_r -llber
|
||||
-LIBS=$(LDAP_LIB) $(HEIMDAL_LIB) $(SSL_LIB)
|
||||
-
|
||||
+LDAP_LIB=-L../../../libraries/libldap_r -lldap_r -llber
|
||||
+ifneq (DDO_KRB5,$(findstring DDO_KRB5,$(DEFS)))
|
||||
+ LIBS=$(LDAP_LIB) $(SSL_LIB)
|
||||
+else
|
||||
+ LIBS=$(LDAP_LIB) $(KRB5_LIB) $(SSL_LIB)
|
||||
+endif
|
||||
+
|
||||
prefix=/usr/local
|
||||
exec_prefix=$(prefix)
|
||||
ldap_subdir=/openldap
|
||||
@@ -41,10 +45,10 @@
|
||||
|
||||
|
||||
smbk5pwd.lo: smbk5pwd.c
|
||||
- $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $?
|
||||
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(DEFS) $(INCS) -c $?
|
||||
|
||||
smbk5pwd.la: smbk5pwd.lo
|
||||
- $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \
|
||||
+ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -version-info 0:0:0 \
|
||||
-rpath $(moduledir) -module -o $@ $? $(LIBS)
|
||||
|
||||
clean:
|
||||
9
net-nds/openldap/files/slapd-confd
Normal file
9
net-nds/openldap/files/slapd-confd
Normal file
@@ -0,0 +1,9 @@
|
||||
# conf.d file for openldap
|
||||
#
|
||||
# To enable both the standard unciphered server and the ssl encrypted
|
||||
# one uncomment this line or set any other server starting options
|
||||
# you may desire.
|
||||
#
|
||||
# OPTS="-h 'ldaps:// ldap:// ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock'"
|
||||
# Uncomment the below to use the new slapd configuration for openldap 2.3
|
||||
#OPTS="-F /etc/openldap/slapd.d -h 'ldaps:// ldap:// ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock'"
|
||||
22
net-nds/openldap/files/slapd-initd2
Normal file
22
net-nds/openldap/files/slapd-initd2
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/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-initd2,v 1.1 2010/04/11 15:14:48 jokey Exp $
|
||||
|
||||
depend() {
|
||||
need net
|
||||
before dbus hald avahi-daemon
|
||||
provide ldap
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting ldap-server"
|
||||
eval start-stop-daemon --start --pidfile /var/run/openldap/slapd.pid --exec /usr/lib/openldap/slapd -- -u ldap -g ldap "${OPTS}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping ldap-server"
|
||||
start-stop-daemon --stop --signal 2 --quiet --pidfile /var/run/openldap/slapd.pid
|
||||
eend $?
|
||||
}
|
||||
22
net-nds/openldap/files/slurpd-initd
Normal file
22
net-nds/openldap/files/slurpd-initd
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/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/slurpd-initd,v 1.1 2007/01/16 23:22:02 jokey Exp $
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting slurpd"
|
||||
start-stop-daemon --start --quiet \
|
||||
--exec /usr/lib/openldap/slurpd
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping slurpd"
|
||||
start-stop-daemon --stop --quiet \
|
||||
--exec /usr/lib/openldap/slurpd
|
||||
eend $?
|
||||
}
|
||||
Reference in New Issue
Block a user