summaryrefslogtreecommitdiffstats
path: root/recipes-support
diff options
context:
space:
mode:
authorAmy Fong <amy.fong@windriver.com>2014-07-15 17:48:54 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-07-30 00:54:30 -0400
commitfb81abecb4e8b212f30607bf86d5b1fd769fb19d (patch)
treed7c21313e70db1a96bdb916ccdc741c4729dda1c /recipes-support
parenta3ce5306cdddb8f737f14d746ac1a892019836e3 (diff)
downloadmeta-cloud-services-fb81abecb4e8b212f30607bf86d5b1fd769fb19d.tar.gz
keystone: package openLDAP 2.4.39
The patches are taken from Debian. Signed-off-by: Amy Fong <amy.fong@windriver.com>
Diffstat (limited to 'recipes-support')
-rw-r--r--recipes-support/openldap/openldap-2.4.39/add-tlscacert-option-to-ldap-conf.patch10
-rw-r--r--recipes-support/openldap/openldap-2.4.39/autogroup-makefile.patch35
-rw-r--r--recipes-support/openldap/openldap-2.4.39/contrib-modules-use-dpkg-buildflags.patch40
-rw-r--r--recipes-support/openldap/openldap-2.4.39/do-not-second-guess-sonames.patch68
-rw-r--r--recipes-support/openldap/openldap-2.4.39/evolution-ntlm.patch222
-rw-r--r--recipes-support/openldap/openldap-2.4.39/fix-build-top-mk.patch11
-rw-r--r--recipes-support/openldap/openldap-2.4.39/fix-ftbfs-binutils-gold.patch64
-rw-r--r--recipes-support/openldap/openldap-2.4.39/getaddrinfo-is-threadsafe.patch43
-rw-r--r--recipes-support/openldap/openldap-2.4.39/heimdal-fix.patch23
-rw-r--r--recipes-support/openldap/openldap-2.4.39/index-files-created-as-root.patch37
-rw-r--r--recipes-support/openldap/openldap-2.4.39/install-strip.patch14
-rw-r--r--recipes-support/openldap/openldap-2.4.39/ldap-conf-tls-cacertdir.patch29
-rw-r--r--recipes-support/openldap/openldap-2.4.39/ldapi-socket-place.patch16
-rw-r--r--recipes-support/openldap/openldap-2.4.39/libldap-symbol-versions.patch161
-rw-r--r--recipes-support/openldap/openldap-2.4.39/man-slapd.patch60
-rw-r--r--recipes-support/openldap/openldap-2.4.39/no-AM_INIT_AUTOMAKE.patch25
-rw-r--r--recipes-support/openldap/openldap-2.4.39/no-bdb-ABI-second-guessing.patch42
-rw-r--r--recipes-support/openldap/openldap-2.4.39/sasl-default-path.patch55
-rw-r--r--recipes-support/openldap/openldap-2.4.39/series21
-rw-r--r--recipes-support/openldap/openldap-2.4.39/slapi-errorlog-file.patch16
-rw-r--r--recipes-support/openldap/openldap-2.4.39/smbk5pwd-makefile.patch53
-rw-r--r--recipes-support/openldap/openldap-2.4.39/switch-to-lt_dlopenadvise-to-get-RTLD_GLOBAL-set.diff.patch40
-rw-r--r--recipes-support/openldap/openldap-2.4.39/wrong-database-location.patch74
-rw-r--r--recipes-support/openldap/openldap_2.4.39.bb182
24 files changed, 1341 insertions, 0 deletions
diff --git a/recipes-support/openldap/openldap-2.4.39/add-tlscacert-option-to-ldap-conf.patch b/recipes-support/openldap/openldap-2.4.39/add-tlscacert-option-to-ldap-conf.patch
new file mode 100644
index 0000000..e8e731a
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/add-tlscacert-option-to-ldap-conf.patch
@@ -0,0 +1,10 @@
1--- a/libraries/libldap/ldap.conf
2+++ b/libraries/libldap/ldap.conf
3@@ -11,3 +11,7 @@
4 #SIZELIMIT 12
5 #TIMELIMIT 15
6 #DEREF never
7+
8+# TLS certificates (needed for GnuTLS)
9+TLS_CACERT /etc/ssl/certs/ca-certificates.crt
10+
diff --git a/recipes-support/openldap/openldap-2.4.39/autogroup-makefile.patch b/recipes-support/openldap/openldap-2.4.39/autogroup-makefile.patch
new file mode 100644
index 0000000..d3f56c3
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/autogroup-makefile.patch
@@ -0,0 +1,35 @@
1--- a/contrib/slapd-modules/autogroup/Makefile
2+++ b/contrib/slapd-modules/autogroup/Makefile
3@@ -2,11 +2,11 @@
4
5 LDAP_SRC = ../../..
6 LDAP_BUILD = ../../..
7-LDAP_INC = -I$(LDAP_BUILD)/include -I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd
8-LDAP_LIB = $(LDAP_BUILD)/libraries/libldap_r/libldap_r.la \
9- $(LDAP_BUILD)/libraries/liblber/liblber.la
10+LDAP_INC = -I$(LDAP_BUILD)/debian/build/include -I$(LDAP_BUILD)/include -I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd
11+LDAP_LIB = $(LDAP_BUILD)/debian/build/libraries/libldap_r/libldap_r.la \
12+ $(LDAP_BUILD)/debian/build/libraries/liblber/liblber.la
13
14-LIBTOOL = $(LDAP_BUILD)/libtool
15+LIBTOOL = $(LDAP_BUILD)/debian/build/libtool
16 CC = gcc
17 OPT = -g -O2 -Wall
18 DEFS =
19@@ -16,13 +16,13 @@ LIBS = $(LDAP_LIB)
20 PROGRAMS = autogroup.la
21 LTVER = 0:0:0
22
23-prefix=/usr/local
24+prefix=/usr
25 exec_prefix=$(prefix)
26-ldap_subdir=/openldap
27+ldap_subdir=/ldap
28
29 libdir=$(exec_prefix)/lib
30 libexecdir=$(exec_prefix)/libexec
31-moduledir = $(libexecdir)$(ldap_subdir)
32+moduledir = $(libdir)$(ldap_subdir)
33
34 .SUFFIXES: .c .o .lo
35
diff --git a/recipes-support/openldap/openldap-2.4.39/contrib-modules-use-dpkg-buildflags.patch b/recipes-support/openldap/openldap-2.4.39/contrib-modules-use-dpkg-buildflags.patch
new file mode 100644
index 0000000..1b15529
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/contrib-modules-use-dpkg-buildflags.patch
@@ -0,0 +1,40 @@
1Description: pass CFLAGS to contrib builds
2 $(CFLAGS) is missing from the compiler invocations for autogroup and
3 smbk5pwd, which means they're not being hardened.
4Author: Simon Ruderich <simon@ruderich.org>
5Bug-Debian: http://bugs.debian.org/663724
6
7--- a/contrib/slapd-modules/autogroup/Makefile
8+++ b/contrib/slapd-modules/autogroup/Makefile
9@@ -27,12 +27,12 @@ moduledir = $(libexecdir)$(ldap_subdir)
10 .SUFFIXES: .c .o .lo
11
12 .c.lo:
13- $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $<
14+ $(LIBTOOL) --mode=compile $(CC) $(OPT) $(CFLAGS) $(DEFS) $(INCS) -c $<
15
16 all: $(PROGRAMS)
17
18 autogroup.la: autogroup.lo
19- $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
20+ $(LIBTOOL) --mode=link $(CC) $(OPT) $(LDFLAGS) -version-info $(LTVER) \
21 -rpath $(moduledir) -module -o $@ $? $(LIBS)
22
23 clean:
24--- a/contrib/slapd-modules/smbk5pwd/Makefile
25+++ b/contrib/slapd-modules/smbk5pwd/Makefile
26@@ -46,12 +46,12 @@ moduledir = $(libexecdir)$(ldap_subdir)
27 .SUFFIXES: .c .o .lo
28
29 .c.lo:
30- $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $<
31+ $(LIBTOOL) --mode=compile $(CC) $(OPT) $(CFLAGS) $(DEFS) $(INCS) -c $<
32
33 all: $(PROGRAMS)
34
35 smbk5pwd.la: smbk5pwd.lo
36- $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
37+ $(LIBTOOL) --mode=link $(CC) $(OPT) $(LDFLAGS) -version-info $(LTVER) \
38 -rpath $(moduledir) -module -o $@ $? $(LIBS)
39
40 clean:
diff --git a/recipes-support/openldap/openldap-2.4.39/do-not-second-guess-sonames.patch b/recipes-support/openldap/openldap-2.4.39/do-not-second-guess-sonames.patch
new file mode 100644
index 0000000..31cf652
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/do-not-second-guess-sonames.patch
@@ -0,0 +1,68 @@
1Rip out code that second-guesses the libsasl soname / Debian shlibs. If
2cyrus sasl upstream is breaking the ABI, this needs to be fixed upstream
3there, not kludged around upstream here!
4
5Debian bug #546885
6
7Upstream ITS #6302 filed.
8
9--- a/libraries/libldap/cyrus.c
10+++ b/libraries/libldap/cyrus.c
11@@ -74,28 +74,6 @@ int ldap_int_sasl_init( void )
12 /* XXX not threadsafe */
13 static int sasl_initialized = 0;
14
15-#ifdef HAVE_SASL_VERSION
16- /* stringify the version number, sasl.h doesn't do it for us */
17-#define VSTR0(maj, min, pat) #maj "." #min "." #pat
18-#define VSTR(maj, min, pat) VSTR0(maj, min, pat)
19-#define SASL_VERSION_STRING VSTR(SASL_VERSION_MAJOR, SASL_VERSION_MINOR, \
20- SASL_VERSION_STEP)
21- { int rc;
22- sasl_version( NULL, &rc );
23- if ( ((rc >> 16) != ((SASL_VERSION_MAJOR << 8)|SASL_VERSION_MINOR)) ||
24- (rc & 0xffff) < SASL_VERSION_STEP) {
25- char version[sizeof("xxx.xxx.xxxxx")];
26- sprintf( version, "%u.%d.%d", (unsigned)rc >> 24, (rc >> 16) & 0xff,
27- rc & 0xffff );
28-
29- Debug( LDAP_DEBUG_ANY,
30- "ldap_int_sasl_init: SASL library version mismatch:"
31- " expected " SASL_VERSION_STRING ","
32- " got %s\n", version, 0, 0 );
33- return -1;
34- }
35- }
36-#endif
37 if ( sasl_initialized ) {
38 return 0;
39 }
40--- a/servers/slapd/sasl.c
41+++ b/servers/slapd/sasl.c
42@@ -1145,26 +1145,6 @@ int slap_sasl_init( void )
43 #endif
44
45 #ifdef HAVE_CYRUS_SASL
46-#ifdef HAVE_SASL_VERSION
47- /* stringify the version number, sasl.h doesn't do it for us */
48-#define VSTR0(maj, min, pat) #maj "." #min "." #pat
49-#define VSTR(maj, min, pat) VSTR0(maj, min, pat)
50-#define SASL_VERSION_STRING VSTR(SASL_VERSION_MAJOR, SASL_VERSION_MINOR, \
51- SASL_VERSION_STEP)
52-
53- sasl_version( NULL, &rc );
54- if ( ((rc >> 16) != ((SASL_VERSION_MAJOR << 8)|SASL_VERSION_MINOR)) ||
55- (rc & 0xffff) < SASL_VERSION_STEP)
56- {
57- char version[sizeof("xxx.xxx.xxxxx")];
58- sprintf( version, "%u.%d.%d", (unsigned)rc >> 24, (rc >> 16) & 0xff,
59- rc & 0xffff );
60- Debug( LDAP_DEBUG_ANY, "slap_sasl_init: SASL library version mismatch:"
61- " expected %s, got %s\n",
62- SASL_VERSION_STRING, version, 0 );
63- return -1;
64- }
65-#endif
66
67 sasl_set_mutex(
68 ldap_pvt_sasl_mutex_new,
diff --git a/recipes-support/openldap/openldap-2.4.39/evolution-ntlm.patch b/recipes-support/openldap/openldap-2.4.39/evolution-ntlm.patch
new file mode 100644
index 0000000..cd9bc26
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/evolution-ntlm.patch
@@ -0,0 +1,222 @@
1Patch from evolution-exchange (2.10.3). The ldap_ntlm_bind function is
2actually called by evolution-data-server, checked at version 1.12.2.
3Without this patch, the Exchange addressbook integration uses simple binds
4with cleartext passwords.
5
6Russ checked with openldap-software for upstream's opinion on this patch
7on 2007-12-21. Upstream had never received it as a patch submission and
8given that it's apparently only for older Exchange servers that can't do
9SASL and DIGEST-MD5, it's not very appealing.
10
11Bug#457374 filed against evolution-data-server asking if this support is
12still required on 2007-12-21.
13
14--- a/include/ldap.h
15+++ b/include/ldap.h
16@@ -2517,5 +2517,25 @@ ldap_parse_deref_control LDAP_P((
17 LDAPControl **ctrls,
18 LDAPDerefRes **drp ));
19
20+/*
21+ * hacks for NTLM
22+ */
23+#define LDAP_AUTH_NTLM_REQUEST ((ber_tag_t) 0x8aU)
24+#define LDAP_AUTH_NTLM_RESPONSE ((ber_tag_t) 0x8bU)
25+LDAP_F( int )
26+ldap_ntlm_bind LDAP_P((
27+ LDAP *ld,
28+ LDAP_CONST char *dn,
29+ ber_tag_t tag,
30+ struct berval *cred,
31+ LDAPControl **sctrls,
32+ LDAPControl **cctrls,
33+ int *msgidp ));
34+LDAP_F( int )
35+ldap_parse_ntlm_bind_result LDAP_P((
36+ LDAP *ld,
37+ LDAPMessage *res,
38+ struct berval *challenge));
39+
40 LDAP_END_DECL
41 #endif /* _LDAP_H */
42--- /dev/null
43+++ b/libraries/libldap/ntlm.c
44@@ -0,0 +1,138 @@
45+/* $OpenLDAP: pkg/ldap/libraries/libldap/ntlm.c,v 1.1.4.10 2002/01/04 20:38:21 kurt Exp $ */
46+/*
47+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
48+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
49+ */
50+
51+/* Mostly copied from sasl.c */
52+
53+#include "portable.h"
54+
55+#include <stdlib.h>
56+#include <stdio.h>
57+
58+#include <ac/socket.h>
59+#include <ac/string.h>
60+#include <ac/time.h>
61+#include <ac/errno.h>
62+
63+#include "ldap-int.h"
64+
65+int
66+ldap_ntlm_bind(
67+ LDAP *ld,
68+ LDAP_CONST char *dn,
69+ ber_tag_t tag,
70+ struct berval *cred,
71+ LDAPControl **sctrls,
72+ LDAPControl **cctrls,
73+ int *msgidp )
74+{
75+ BerElement *ber;
76+ int rc;
77+ ber_int_t id;
78+
79+ Debug( LDAP_DEBUG_TRACE, "ldap_ntlm_bind\n", 0, 0, 0 );
80+
81+ assert( ld != NULL );
82+ assert( LDAP_VALID( ld ) );
83+ assert( msgidp != NULL );
84+
85+ if( msgidp == NULL ) {
86+ ld->ld_errno = LDAP_PARAM_ERROR;
87+ return ld->ld_errno;
88+ }
89+
90+ /* create a message to send */
91+ if ( (ber = ldap_alloc_ber_with_options( ld )) == NULL ) {
92+ ld->ld_errno = LDAP_NO_MEMORY;
93+ return ld->ld_errno;
94+ }
95+
96+ assert( LBER_VALID( ber ) );
97+
98+ LDAP_NEXT_MSGID( ld, id );
99+ rc = ber_printf( ber, "{it{istON}" /*}*/,
100+ id, LDAP_REQ_BIND,
101+ ld->ld_version, dn, tag,
102+ cred );
103+
104+ /* Put Server Controls */
105+ if( ldap_int_put_controls( ld, sctrls, ber ) != LDAP_SUCCESS ) {
106+ ber_free( ber, 1 );
107+ return ld->ld_errno;
108+ }
109+
110+ if ( ber_printf( ber, /*{*/ "N}" ) == -1 ) {
111+ ld->ld_errno = LDAP_ENCODING_ERROR;
112+ ber_free( ber, 1 );
113+ return ld->ld_errno;
114+ }
115+
116+ /* send the message */
117+ *msgidp = ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber, id );
118+
119+ if(*msgidp < 0)
120+ return ld->ld_errno;
121+
122+ return LDAP_SUCCESS;
123+}
124+
125+int
126+ldap_parse_ntlm_bind_result(
127+ LDAP *ld,
128+ LDAPMessage *res,
129+ struct berval *challenge)
130+{
131+ ber_int_t errcode;
132+ ber_tag_t tag;
133+ BerElement *ber;
134+ ber_len_t len;
135+
136+ Debug( LDAP_DEBUG_TRACE, "ldap_parse_ntlm_bind_result\n", 0, 0, 0 );
137+
138+ assert( ld != NULL );
139+ assert( LDAP_VALID( ld ) );
140+ assert( res != NULL );
141+
142+ if ( ld == NULL || res == NULL ) {
143+ return LDAP_PARAM_ERROR;
144+ }
145+
146+ if( res->lm_msgtype != LDAP_RES_BIND ) {
147+ ld->ld_errno = LDAP_PARAM_ERROR;
148+ return ld->ld_errno;
149+ }
150+
151+ if ( ld->ld_error ) {
152+ LDAP_FREE( ld->ld_error );
153+ ld->ld_error = NULL;
154+ }
155+ if ( ld->ld_matched ) {
156+ LDAP_FREE( ld->ld_matched );
157+ ld->ld_matched = NULL;
158+ }
159+
160+ /* parse results */
161+
162+ ber = ber_dup( res->lm_ber );
163+
164+ if( ber == NULL ) {
165+ ld->ld_errno = LDAP_NO_MEMORY;
166+ return ld->ld_errno;
167+ }
168+
169+ tag = ber_scanf( ber, "{ioa" /*}*/,
170+ &errcode, challenge, &ld->ld_error );
171+ ber_free( ber, 0 );
172+
173+ if( tag == LBER_ERROR ) {
174+ ld->ld_errno = LDAP_DECODING_ERROR;
175+ return ld->ld_errno;
176+ }
177+
178+ ld->ld_errno = errcode;
179+
180+ return( ld->ld_errno );
181+}
182+
183--- a/libraries/libldap/Makefile.in
184+++ b/libraries/libldap/Makefile.in
185@@ -27,7 +27,7 @@ SRCS = bind.c open.c result.c error.c co
186 init.c options.c print.c string.c util-int.c schema.c \
187 charray.c os-local.c dnssrv.c utf-8.c utf-8-conv.c \
188 tls2.c tls_o.c tls_g.c tls_m.c \
189- turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c \
190+ turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c ntlm.c \
191 assertion.c deref.c ldif.c fetch.c
192
193 OBJS = bind.lo open.lo result.lo error.lo compare.lo search.lo \
194@@ -40,7 +40,7 @@ OBJS = bind.lo open.lo result.lo error.l
195 init.lo options.lo print.lo string.lo util-int.lo schema.lo \
196 charray.lo os-local.lo dnssrv.lo utf-8.lo utf-8-conv.lo \
197 tls2.lo tls_o.lo tls_g.lo tls_m.lo \
198- turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl.lo \
199+ turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl.lo ntlm.lo \
200 assertion.lo deref.lo ldif.lo fetch.lo
201
202 LDAP_INCDIR= ../../include
203--- a/libraries/libldap_r/Makefile.in
204+++ b/libraries/libldap_r/Makefile.in
205@@ -29,7 +29,7 @@ XXSRCS = apitest.c test.c \
206 init.c options.c print.c string.c util-int.c schema.c \
207 charray.c os-local.c dnssrv.c utf-8.c utf-8-conv.c \
208 tls2.c tls_o.c tls_g.c tls_m.c \
209- turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c \
210+ turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c ntlm.c \
211 assertion.c deref.c ldif.c fetch.c
212 SRCS = threads.c rdwr.c rmutex.c tpool.c rq.c \
213 thr_posix.c thr_cthreads.c thr_thr.c thr_nt.c \
214@@ -47,7 +47,7 @@ OBJS = threads.lo rdwr.lo rmutex.lo tpoo
215 init.lo options.lo print.lo string.lo util-int.lo schema.lo \
216 charray.lo os-local.lo dnssrv.lo utf-8.lo utf-8-conv.lo \
217 tls2.lo tls_o.lo tls_g.lo tls_m.lo \
218- turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl.lo \
219+ turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl.lo ntlm.lo \
220 assertion.lo deref.lo ldif.lo fetch.lo
221
222 LDAP_INCDIR= ../../include
diff --git a/recipes-support/openldap/openldap-2.4.39/fix-build-top-mk.patch b/recipes-support/openldap/openldap-2.4.39/fix-build-top-mk.patch
new file mode 100644
index 0000000..418fe35
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/fix-build-top-mk.patch
@@ -0,0 +1,11 @@
1--- a/build/top.mk
2+++ b/build/top.mk
3@@ -20,7 +20,7 @@
4 RELEASEDATE= @OPENLDAP_RELEASE_DATE@
5
6 @SET_MAKE@
7-SHELL = /bin/sh
8+SHELL = @SHELL@
9
10 top_builddir = @top_builddir@
11
diff --git a/recipes-support/openldap/openldap-2.4.39/fix-ftbfs-binutils-gold.patch b/recipes-support/openldap/openldap-2.4.39/fix-ftbfs-binutils-gold.patch
new file mode 100644
index 0000000..1f0ca88
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/fix-ftbfs-binutils-gold.patch
@@ -0,0 +1,64 @@
1--- a/configure.in
2+++ b/configure.in
3@@ -1214,7 +1214,7 @@ if test $ol_link_tls = no ; then
4 ol_with_tls=gnutls
5 ol_link_tls=yes
6
7- TLS_LIBS="-lgnutls"
8+ TLS_LIBS="-lgnutls -lgcrypt"
9
10 AC_DEFINE(HAVE_GNUTLS, 1,
11 [define if you have GNUtls])
12--- a/libraries/libldap/Makefile.in
13+++ b/libraries/libldap/Makefile.in
14@@ -51,21 +51,21 @@ LIB_DEFS = -DLDAP_LIBRARY
15 XLIBS = $(LIBRARY) $(LDAP_LIBLBER_LA) $(LDAP_LIBLUTIL_A)
16 XXLIBS = $(SECURITY_LIBS) $(LUTIL_LIBS)
17 NT_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
18-UNIX_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
19+UNIX_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS) $(TLS_LIBS)
20 ifneq (,$(VERSION_OPTION))
21 VERSION_FLAGS = $(VERSION_OPTION)$(srcdir)/libldap.map
22 endif
23
24 apitest: $(XLIBS) apitest.o
25- $(LTLINK) -o $@ apitest.o $(LIBS)
26+ $(LTLINK) -o $@ apitest.o $(LIBS) $(TLS_LIBS)
27 dntest: $(XLIBS) dntest.o
28- $(LTLINK) -o $@ dntest.o $(LIBS)
29+ $(LTLINK) -o $@ dntest.o $(LIBS) $(TLS_LIBS)
30 ftest: $(XLIBS) ftest.o
31- $(LTLINK) -o $@ ftest.o $(LIBS)
32+ $(LTLINK) -o $@ ftest.o $(LIBS) $(TLS_LIBS)
33 ltest: $(XLIBS) test.o
34- $(LTLINK) -o $@ test.o $(LIBS)
35+ $(LTLINK) -o $@ test.o $(LIBS) $(TLS_LIBS)
36 urltest: $(XLIBS) urltest.o
37- $(LTLINK) -o $@ urltest.o $(LIBS)
38+ $(LTLINK) -o $@ urltest.o $(LIBS) $(TLS_LIBS)
39
40 CFFILES=ldap.conf
41
42--- a/libraries/libldap_r/Makefile.in
43+++ b/libraries/libldap_r/Makefile.in
44@@ -60,7 +60,7 @@ XLIBS = $(LIBRARY) $(LDAP_LIBLBER_LA) $(
45 XXLIBS = $(SECURITY_LIBS) $(LUTIL_LIBS)
46 XXXLIBS = $(LTHREAD_LIBS)
47 NT_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
48-UNIX_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS) $(LTHREAD_LIBS)
49+UNIX_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS) $(LTHREAD_LIBS) $(TLS_LIBS)
50 ifneq (,$(VERSION_OPTION))
51 VERSION_FLAGS = "$(VERSION_OPTION)$(XXDIR)/libldap.map"
52 endif
53@@ -80,9 +80,9 @@ clean-local: FORCE
54 depend-common: .links
55
56 apitest: $(XLIBS) apitest.o
57- $(LTLINK) -o $@ apitest.o $(LIBS)
58+ $(LTLINK) -o $@ apitest.o $(LIBS) $(TLS_LIBS)
59 ltest: $(XLIBS) test.o
60- $(LTLINK) -o $@ test.o $(LIBS)
61+ $(LTLINK) -o $@ test.o $(LIBS) $(TLS_LIBS)
62
63 install-local: $(CFFILES) FORCE
64 -$(MKDIR) $(DESTDIR)$(libdir)
diff --git a/recipes-support/openldap/openldap-2.4.39/getaddrinfo-is-threadsafe.patch b/recipes-support/openldap/openldap-2.4.39/getaddrinfo-is-threadsafe.patch
new file mode 100644
index 0000000..ab6e2b7
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/getaddrinfo-is-threadsafe.patch
@@ -0,0 +1,43 @@
1Author: Steve Langasek <vorlon@debian.org>
2
3OpenLDAP upstream conservatively assumes that certain resolver functions
4(getaddrinfo, getnameinfo, res_query, dn_expand) are not re-entrant; but we
5know that the glibc implementations of these functions are thread-safe, so
6we should bypass the use of this mutex. This fixes a locking problem when
7an application uses libldap and libnss-ldap is also used for hosts
8resolution.
9
10Closes Debian bug #340601.
11
12Not suitable for forwarding upstream; might be made suitable by adding a
13configure-time check for glibc and disabling the mutex only on known
14thread-safe implementations.
15
16--- a/libraries/libldap/os-ip.c
17+++ b/libraries/libldap/os-ip.c
18@@ -602,13 +602,7 @@ ldap_connect_to_host(LDAP *ld, Sockbuf *
19 hints.ai_socktype = socktype;
20 snprintf(serv, sizeof serv, "%d", port );
21
22- /* most getaddrinfo(3) use non-threadsafe resolver libraries */
23- LDAP_MUTEX_LOCK(&ldap_int_resolv_mutex);
24-
25 err = getaddrinfo( host, serv, &hints, &res );
26-
27- LDAP_MUTEX_UNLOCK(&ldap_int_resolv_mutex);
28-
29 if ( err != 0 ) {
30 osip_debug(ld, "ldap_connect_to_host: getaddrinfo failed: %s\n",
31 AC_GAI_STRERROR(err), 0, 0);
32--- a/libraries/libldap/util-int.c
33+++ b/libraries/libldap/util-int.c
34@@ -431,9 +431,7 @@ int ldap_pvt_get_hname(
35 int rc;
36 #if defined( HAVE_GETNAMEINFO )
37
38- LDAP_MUTEX_LOCK( &ldap_int_resolv_mutex );
39 rc = getnameinfo( sa, len, name, namelen, NULL, 0, 0 );
40- LDAP_MUTEX_UNLOCK( &ldap_int_resolv_mutex );
41 if ( rc ) *err = (char *)AC_GAI_STRERROR( rc );
42 return rc;
43
diff --git a/recipes-support/openldap/openldap-2.4.39/heimdal-fix.patch b/recipes-support/openldap/openldap-2.4.39/heimdal-fix.patch
new file mode 100644
index 0000000..f6fa7ec
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/heimdal-fix.patch
@@ -0,0 +1,23 @@
1Author: Mattias Ellert <mattias.ellert@fysast.uu.se>
2Description: adapt parameters of hdb_generate_key_set_password() to heimdal 1.6~git20120311
3 .
4 With version heimdal 1.6~git20120311 heimdal schanged the number of parameters
5 of function hdb_generate_key_set_password(), implementing a fallback to "default"
6 values when NULL-values are passed for these parameters.
7 .
8 This patch does exactly that.
9 .
10Bug-Debian: 664930
11Reviewed-by: Peter Marschall <peter@adpm.de>
12
13--- a/contrib/slapd-modules/smbk5pwd/smbk5pwd.c
14+++ b/contrib/slapd-modules/smbk5pwd/smbk5pwd.c
15@@ -470,7 +470,7 @@ static int smbk5pwd_exop_passwd(
16 }
17
18 ret = hdb_generate_key_set_password(context, ent.principal,
19- qpw->rs_new.bv_val, &ent.keys.val, &nkeys);
20+ qpw->rs_new.bv_val, NULL, 0, &ent.keys.val, &nkeys);
21 ent.keys.len = nkeys;
22 hdb_seal_keys(context, db, &ent);
23 krb5_free_principal( context, ent.principal );
diff --git a/recipes-support/openldap/openldap-2.4.39/index-files-created-as-root.patch b/recipes-support/openldap/openldap-2.4.39/index-files-created-as-root.patch
new file mode 100644
index 0000000..47fc88a
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/index-files-created-as-root.patch
@@ -0,0 +1,37 @@
1Document in the man page that slapindex should be run as the same user
2as slapd, and print a warning if it's run as root (since Debian defaults
3to running slapd as openldap).
4
5Not suitable for upstream in this form. This patch needs to be reworked
6to check the BerkeleyDB database ownership and only warn if running as
7root with a database that's not owned by root.
8
9Upstream ITS #5356 filed requesting better handling of this. Current
10upstream discussion leans towards putting the check into the database
11backend and aborting if slapd is run as a different user than the database
12owner, which is an even better fix.
13
14--- a/doc/man/man8/slapindex.8
15+++ b/doc/man/man8/slapindex.8
16@@ -148,6 +148,10 @@
17 should not be running (at least, not in read-write
18 mode) when you do this to ensure consistency of the database.
19 .LP
20+slapindex ought to be run as the user specified for
21+.BR slapd (8)
22+to ensure correct database permissions.
23+.LP
24 This command provides ample opportunity for the user to obtain
25 and drink their favorite beverage.
26 .SH EXAMPLES
27--- a/servers/slapd/slapindex.c
28+++ b/servers/slapd/slapindex.c
29@@ -34,6 +34,8 @@
30 int
31 slapindex( int argc, char **argv )
32 {
33+ if (geteuid() == 0)
34+ fprintf( stderr, "\nWARNING!\nRunnig as root!\nThere's a fair chance slapd will fail to start.\nCheck file permissions!\n\n");
35 ID id;
36 int rc = EXIT_SUCCESS;
37 const char *progname = "slapindex";
diff --git a/recipes-support/openldap/openldap-2.4.39/install-strip.patch b/recipes-support/openldap/openldap-2.4.39/install-strip.patch
new file mode 100644
index 0000000..2992b70
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/install-strip.patch
@@ -0,0 +1,14 @@
1# This patch ensures that the install operations which strip
2# programs and libraries (LTINSTALL) work in a cross build
3# environment.
4--- openldap-2.2.24/.pc/install-strip.patch/build/top.mk 2005-01-20 09:00:55.000000000 -0800
5+++ openldap-2.2.24/build/top.mk 2005-04-16 13:48:20.536710376 -0700
6@@ -116,7 +116,7 @@
7 LTLINK_MOD = $(LIBTOOL) $(LTONLY_MOD) --mode=link \
8 $(CC) $(LT_CFLAGS) $(LDFLAGS) $(LTFLAGS_MOD)
9
10-LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
11+LTINSTALL = STRIPPROG="" $(LIBTOOL) --mode=install $(top_srcdir)/contrib/ldapc++/install-sh -c
12 LTFINISH = $(LIBTOOL) --mode=finish
13
14 # Misc UNIX commands used in build environment
diff --git a/recipes-support/openldap/openldap-2.4.39/ldap-conf-tls-cacertdir.patch b/recipes-support/openldap/openldap-2.4.39/ldap-conf-tls-cacertdir.patch
new file mode 100644
index 0000000..e8aab91
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/ldap-conf-tls-cacertdir.patch
@@ -0,0 +1,29 @@
1--- a/doc/man/man5/ldap.conf.5
2+++ b/doc/man/man5/ldap.conf.5
3@@ -317,7 +317,7 @@ certificates in separate individual file
4 .B TLS_CACERT
5 is always used before
6 .B TLS_CACERTDIR.
7-This parameter is ignored with GnuTLS.
8+This parameter is ignored with GnuTLS. On Debian openldap is linked against GnuTLS.
9
10 When using Mozilla NSS, <path> may contain a Mozilla NSS cert/key
11 database. If <path> contains a Mozilla NSS cert/key database and
12@@ -428,7 +428,7 @@ This parameter is ignored with GnuTLS.
13 Specifies the file to obtain random bits from when /dev/[u]random is
14 not available. Generally set to the name of the EGD/PRNGD socket.
15 The environment variable RANDFILE can also be used to specify the filename.
16-This parameter is ignored with GnuTLS and Mozilla NSS.
17+This parameter is ignored with GnuTLS and Mozilla NSS. On Debian openldap is linked against GnuTLS.
18 .TP
19 .B TLS_REQCERT <level>
20 Specifies what checks to perform on server certificates in a TLS session,
21@@ -461,7 +461,7 @@ Specifies if the Certificate Revocation
22 used to verify if the server certificates have not been revoked. This
23 requires
24 .B TLS_CACERTDIR
25-parameter to be set. This parameter is ignored with GnuTLS and Mozilla NSS.
26+parameter to be set. This parameter is ignored with GnuTLS and Mozilla NSS. On Debian openldap is linked against GnuTLS.
27 .B <level>
28 can be specified as one of the following keywords:
29 .RS
diff --git a/recipes-support/openldap/openldap-2.4.39/ldapi-socket-place.patch b/recipes-support/openldap/openldap-2.4.39/ldapi-socket-place.patch
new file mode 100644
index 0000000..a482bbf
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/ldapi-socket-place.patch
@@ -0,0 +1,16 @@
1Move the ldapi socket to /var/run/slapd from /var/run, since /var/run
2is only writable by root and slapd runs as openldap.
3
4Debian-specific.
5
6--- a/include/ldap_defaults.h
7+++ b/include/ldap_defaults.h
8@@ -39,7 +39,7 @@
9 #define LDAP_ENV_PREFIX "LDAP"
10
11 /* default ldapi:// socket */
12-#define LDAPI_SOCK LDAP_RUNDIR LDAP_DIRSEP "run" LDAP_DIRSEP "ldapi"
13+#define LDAPI_SOCK LDAP_RUNDIR LDAP_DIRSEP "run" LDAP_DIRSEP "slapd" LDAP_DIRSEP "ldapi"
14
15 /*
16 * SLAPD DEFINITIONS
diff --git a/recipes-support/openldap/openldap-2.4.39/libldap-symbol-versions.patch b/recipes-support/openldap/openldap-2.4.39/libldap-symbol-versions.patch
new file mode 100644
index 0000000..fb28f49
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/libldap-symbol-versions.patch
@@ -0,0 +1,161 @@
1Add symbol versioning to the public LDAP libraries. This is required for
2library transitions, such as the current transition from 2.1 to 2.4,
3since programs will sometimes have both libraries loaded by different
4dependency chains during the transition.
5
6Not yet contributed upstream.
7
8Upstream ITS #5365 filed requesting symbol versioning for libldap and
9libber.
10
11--- a/libraries/libldap_r/Makefile.in
12+++ b/libraries/libldap_r/Makefile.in
13@@ -61,6 +61,9 @@ XXLIBS = $(SECURITY_LIBS) $(LUTIL_LIBS)
14 XXXLIBS = $(LTHREAD_LIBS)
15 NT_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
16 UNIX_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS) $(LTHREAD_LIBS)
17+ifneq (,$(VERSION_OPTION))
18+ VERSION_FLAGS = "$(VERSION_OPTION)$(XXDIR)/libldap.map"
19+endif
20
21 .links : Makefile
22 @for i in $(XXSRCS); do \
23--- a/build/top.mk
24+++ b/build/top.mk
25@@ -104,6 +104,9 @@ LTFLAGS_MOD = $(@PLAT@_LTFLAGS_MOD)
26 # LINK_LIBS referenced in library and module link commands.
27 LINK_LIBS = $(MOD_LIBS) $(@PLAT@_LINK_LIBS)
28
29+# option to pass to $(CC) to support library symbol versioning, if any
30+VERSION_OPTION = @VERSION_OPTION@
31+
32 LTSTATIC = @LTSTATIC@
33
34 LTLINK = $(LIBTOOL) --mode=link \
35@@ -113,7 +116,7 @@ LTCOMPILE_LIB = $(LIBTOOL) $(LTONLY_LIB)
36 $(CC) $(LT_CFLAGS) $(LT_CPPFLAGS) $(LIB_DEFS) -c
37
38 LTLINK_LIB = $(LIBTOOL) $(LTONLY_LIB) --mode=link \
39- $(CC) $(LT_CFLAGS) $(LDFLAGS) $(LTFLAGS_LIB)
40+ $(CC) $(LT_CFLAGS) $(LDFLAGS) $(LTFLAGS_LIB) $(VERSION_FLAGS)
41
42 LTCOMPILE_MOD = $(LIBTOOL) $(LTONLY_MOD) --mode=compile \
43 $(CC) $(LT_CFLAGS) $(LT_CPPFLAGS) $(MOD_DEFS) -c
44--- a/build/openldap.m4
45+++ b/build/openldap.m4
46@@ -1136,3 +1136,54 @@ AC_DEFUN([OL_SSL_COMPAT],
47 #endif
48 ], [ol_cv_ssl_crl_compat=yes], [ol_cv_ssl_crl_compat=no])])
49 ])
50+
51+dnl ====================================================================
52+dnl check for symbol versioning support
53+AC_DEFUN([OL_SYMBOL_VERSIONING],
54+[AC_CACHE_CHECK([for .symver assembler directive],
55+ [ol_cv_asm_symver_directive],[
56+cat > conftest.s <<EOF
57+${libc_cv_dot_text}
58+_sym:
59+.symver _sym,sym@VERS
60+EOF
61+if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
62+ ol_cv_asm_symver_directive=yes
63+else
64+ ol_cv_asm_symver_directive=no
65+fi
66+rm -f conftest*])
67+AC_CACHE_CHECK([for ld --version-script],
68+ [ol_cv_ld_version_script_option],[
69+if test $ol_cv_asm_symver_directive = yes; then
70+ cat > conftest.s <<EOF
71+${libc_cv_dot_text}
72+_sym:
73+.symver _sym,sym@VERS
74+EOF
75+ cat > conftest.map <<EOF
76+VERS_1 {
77+ global: sym;
78+};
79+
80+VERS_2 {
81+ global: sym;
82+} VERS_1;
83+EOF
84+ if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
85+ if AC_TRY_COMMAND([${CC-cc} $CFLAGS $LDFLAGS -shared
86+ -o conftest.so conftest.o
87+ -Wl,--version-script,conftest.map
88+ 1>&AS_MESSAGE_LOG_FD]);
89+ then
90+ ol_cv_ld_version_script_option=yes
91+ else
92+ ol_cv_ld_version_script_option=no
93+ fi
94+ else
95+ ol_cv_ld_version_script_option=no
96+ fi
97+else
98+ ol_cv_ld_version_script_option=no
99+fi
100+rm -f conftest*])])
101--- a/configure.in
102+++ b/configure.in
103@@ -1909,6 +1909,13 @@ else
104 fi
105 AC_SUBST(LTSTATIC)dnl
106
107+VERSION_OPTION=""
108+OL_SYMBOL_VERSIONING
109+if test $ol_cv_ld_version_script_option = yes ; then
110+ VERSION_OPTION="-Wl,--version-script="
111+fi
112+AC_SUBST(VERSION_OPTION)
113+
114 dnl ----------------------------------------------------------------
115 if test $ol_enable_wrappers != no ; then
116 AC_CHECK_HEADERS(tcpd.h,[
117--- /dev/null
118+++ b/libraries/libldap/libldap.map
119@@ -0,0 +1,7 @@
120+OPENLDAP_2.4_2 {
121+ global:
122+ ldap_*;
123+ ldif_*;
124+ local:
125+ *;
126+};
127--- a/libraries/libldap/Makefile.in
128+++ b/libraries/libldap/Makefile.in
129@@ -52,6 +52,9 @@ XLIBS = $(LIBRARY) $(LDAP_LIBLBER_LA) $(
130 XXLIBS = $(SECURITY_LIBS) $(LUTIL_LIBS)
131 NT_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
132 UNIX_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
133+ifneq (,$(VERSION_OPTION))
134+ VERSION_FLAGS = $(VERSION_OPTION)$(srcdir)/libldap.map
135+endif
136
137 apitest: $(XLIBS) apitest.o
138 $(LTLINK) -o $@ apitest.o $(LIBS)
139--- a/libraries/liblber/Makefile.in
140+++ b/libraries/liblber/Makefile.in
141@@ -38,6 +38,9 @@ XLIBS = $(LIBRARY) $(LDAP_LIBLUTIL_A)
142 XXLIBS =
143 NT_LINK_LIBS = $(AC_LIBS)
144 UNIX_LINK_LIBS = $(AC_LIBS)
145+ifneq (,$(VERSION_OPTION))
146+ VERSION_FLAGS = "$(VERSION_OPTION)$(srcdir)/liblber.map"
147+endif
148
149 dtest: $(XLIBS) dtest.o
150 $(LTLINK) -o $@ dtest.o $(LIBS)
151--- /dev/null
152+++ b/libraries/liblber/liblber.map
153@@ -0,0 +1,8 @@
154+OPENLDAP_2.4_2 {
155+ global:
156+ ber_*;
157+ der_alloc;
158+ lutil_*;
159+ local:
160+ *;
161+};
diff --git a/recipes-support/openldap/openldap-2.4.39/man-slapd.patch b/recipes-support/openldap/openldap-2.4.39/man-slapd.patch
new file mode 100644
index 0000000..5f55137
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/man-slapd.patch
@@ -0,0 +1,60 @@
1Patch the slapd man page to not refer to a header file that isn't
2installed with the slapd package and to reference the correct path
3for slapd.
4
5Debian-specific.
6
7--- a/doc/man/man8/slapd.8
8+++ b/doc/man/man8/slapd.8
9@@ -5,7 +5,7 @@
10 .SH NAME
11 slapd \- Stand-alone LDAP Daemon
12 .SH SYNOPSIS
13-.B LIBEXECDIR/slapd
14+.B /usr/sbin/slapd
15 [\c
16 .BR \-4 | \-6 ]
17 [\c
18@@ -103,11 +103,10 @@
19 will not fork or disassociate from the invoking terminal. Some general
20 operation and status messages are printed for any value of \fIdebug-level\fP.
21 \fIdebug-level\fP is taken as a bit string, with each bit corresponding to a
22-different kind of debugging information. See <ldap_log.h> for details.
23-Comma-separated arrays of friendly names can be specified to select
24-debugging output of the corresponding debugging information.
25-All the names recognized by the \fIloglevel\fP directive
26-described in \fBslapd.conf\fP(5) are supported.
27+different kind of debugging information. Comma-separated arrays of friendly
28+names can be specified to select debugging output of the corresponding
29+debugging information. All the names recognized by the \fIloglevel\fP
30+directive described in \fBslapd.conf\fP(5) are supported.
31 If \fIdebug-level\fP is \fB?\fP, a list of installed debug-levels is printed,
32 and slapd exits.
33
34@@ -317,7 +316,7 @@
35 .LP
36 .nf
37 .ft tt
38- LIBEXECDIR/slapd
39+ /usr/sbin/slapd
40 .ft
41 .fi
42 .LP
43@@ -328,7 +327,7 @@
44 .LP
45 .nf
46 .ft tt
47- LIBEXECDIR/slapd \-f /var/tmp/slapd.conf \-d 255
48+ /usr/sbin/slapd \-f /var/tmp/slapd.conf \-d 255
49 .ft
50 .fi
51 .LP
52@@ -336,7 +335,7 @@
53 .LP
54 .nf
55 .ft tt
56- LIBEXECDIR/slapd \-Tt
57+ /usr/sbin/slapd \-Tt
58 .ft
59 .fi
60 .LP
diff --git a/recipes-support/openldap/openldap-2.4.39/no-AM_INIT_AUTOMAKE.patch b/recipes-support/openldap/openldap-2.4.39/no-AM_INIT_AUTOMAKE.patch
new file mode 100644
index 0000000..8e7812d
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/no-AM_INIT_AUTOMAKE.patch
@@ -0,0 +1,25 @@
1Description: don't use AM_INIT_AUTOMAKE macro when we aren't using automake
2 Calling AM_INIT_AUTOMAKE() in configure.in serves no purpose if we're not
3 using automake, and it confuses autoreconf. Use AC_INIT() instead.
4Author: Steve Langasek <vorlon@debian.org>
5
6--- a/configure.in
7+++ b/configure.in
8@@ -26,7 +26,8 @@ dnl Configure.in for OpenLDAP
9 AC_COPYRIGHT([[Copyright 1998-2014 The OpenLDAP Foundation. All rights reserved.
10 Restrictions apply, see COPYRIGHT and LICENSE files.]])
11 AC_REVISION([$Id: 81bd528fb5194c83d688db355737b7715448b958 $])
12-AC_INIT([OpenLDAP],,[http://www.openldap.org/its/])
13+AC_INIT([OpenLDAP],[$OL_VERSION],[http://www.openldap.org/its/])
14+AC_PROG_MAKE_SET
15 m4_define([AC_PACKAGE_BUGREPORT],[<http://www.openldap.org/its/>])
16 AC_CONFIG_SRCDIR(build/version.sh)dnl
17 dnl ----------------------------------------------------------------
18@@ -69,7 +70,6 @@ dnl Determine host platform
19 dnl we try not to use this for much
20 AC_CANONICAL_TARGET([])
21
22-AM_INIT_AUTOMAKE([$OL_PACKAGE],[$OL_VERSION], [no defines])dnl
23 AC_SUBST(PACKAGE)dnl
24 AC_SUBST(VERSION)dnl
25 AC_DEFINE_UNQUOTED(OPENLDAP_PACKAGE,"$PACKAGE",Package)
diff --git a/recipes-support/openldap/openldap-2.4.39/no-bdb-ABI-second-guessing.patch b/recipes-support/openldap/openldap-2.4.39/no-bdb-ABI-second-guessing.patch
new file mode 100644
index 0000000..db76aa7
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/no-bdb-ABI-second-guessing.patch
@@ -0,0 +1,42 @@
1Author: Steve Langasek <vorlon@debian.org>
2Description: don't second-guess BDB ABI
3 OpenLDAP upstream conservatively assumes that any change to the version
4 number of libdb can result in an API-breaking change that could impact
5 the database. In Debian, we know that such changes require bumping the
6 library soname and changing the package name, and demand such rigor from
7 our package maintainers even when upstreams don't deliver; so any such
8 check in the source code works against the packaging system by forcing
9 database upgrades when we know none are required. Disable this check
10 so we rely on the packaging system to do its job.
11Bug-Debian: http://bugs.debian.org/651333
12Forwarded: not-needed
13
14--- a/servers/slapd/back-bdb/init.c
15+++ b/servers/slapd/back-bdb/init.c
16@@ -762,7 +762,7 @@ bdb_back_initialize(
17 bi->bi_controls = controls;
18
19 { /* version check */
20- int major, minor, patch, ver;
21+ int major, minor, patch;
22 char *version = db_version( &major, &minor, &patch );
23 #ifdef HAVE_EBCDIC
24 char v2[1024];
25@@ -776,17 +776,6 @@ bdb_back_initialize(
26 version = v2;
27 #endif
28
29- ver = (major << 24) | (minor << 16) | patch;
30- if( ver != DB_VERSION_FULL ) {
31- /* fail if a versions don't match */
32- Debug( LDAP_DEBUG_ANY,
33- LDAP_XSTRING(bdb_back_initialize) ": "
34- "BDB library version mismatch:"
35- " expected " DB_VERSION_STRING ","
36- " got %s\n", version, 0, 0 );
37- return -1;
38- }
39-
40 Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_back_initialize)
41 ": %s\n", version, 0, 0 );
42 }
diff --git a/recipes-support/openldap/openldap-2.4.39/sasl-default-path.patch b/recipes-support/openldap/openldap-2.4.39/sasl-default-path.patch
new file mode 100644
index 0000000..5ea240f
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/sasl-default-path.patch
@@ -0,0 +1,55 @@
1Add /etc/ldap/sasl2 to the SASL configuration search path.
2
3Not submitted upstream. Somewhat Debian-specific and probably not of
4interest upstream.
5
6--- a/include/ldap_defaults.h
7+++ b/include/ldap_defaults.h
8@@ -63,4 +63,6 @@
9 /* dn of the default "monitor" subentry */
10 #define SLAPD_MONITOR_DN "cn=Monitor"
11
12+#define SASL_CONFIGPATH LDAP_SYSCONFDIR LDAP_DIRSEP "sasl2"
13+
14 #endif /* _LDAP_CONFIG_H */
15--- a/servers/slapd/sasl.c
16+++ b/servers/slapd/sasl.c
17@@ -1103,12 +1103,38 @@ static const rewrite_mapper slapd_mapper
18 };
19 #endif
20
21+static int
22+slap_sasl_getconfpath( void * context, char ** path )
23+{
24+ char * sasl_default_configpath;
25+ size_t len;
26+
27+#if SASL_VERSION_MAJOR >= 2
28+ sasl_default_configpath = "/usr/lib/sasl2";
29+#else
30+ sasl_default_configpath = "/usr/lib/sasl";
31+#endif
32+
33+ len = strlen(SASL_CONFIGPATH) + 1 /* colon */ +
34+ strlen(sasl_default_configpath) + 1 /* \0 */;
35+ *path = malloc( len );
36+ if ( *path == NULL )
37+ return SASL_FAIL;
38+
39+ if (snprintf( *path, len, "%s:%s", SASL_CONFIGPATH,
40+ sasl_default_configpath ) != len-1 )
41+ return SASL_FAIL;
42+
43+ return SASL_OK;
44+}
45+
46 int slap_sasl_init( void )
47 {
48 #ifdef HAVE_CYRUS_SASL
49 int rc;
50 static sasl_callback_t server_callbacks[] = {
51 { SASL_CB_LOG, &slap_sasl_log, NULL },
52+ { SASL_CB_GETCONFPATH, &slap_sasl_getconfpath, NULL },
53 { SASL_CB_GETOPT, &slap_sasl_getopt, NULL },
54 { SASL_CB_LIST_END, NULL, NULL }
55 };
diff --git a/recipes-support/openldap/openldap-2.4.39/series b/recipes-support/openldap/openldap-2.4.39/series
new file mode 100644
index 0000000..2f47de3
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/series
@@ -0,0 +1,21 @@
1man-slapd
2evolution-ntlm
3slapi-errorlog-file
4ldapi-socket-place
5wrong-database-location
6index-files-created-as-root
7sasl-default-path
8libldap-symbol-versions
9getaddrinfo-is-threadsafe
10do-not-second-guess-sonames
11contrib-modules-use-dpkg-buildflags
12smbk5pwd-makefile
13autogroup-makefile
14ldap-conf-tls-cacertdir
15add-tlscacert-option-to-ldap-conf
16fix-ftbfs-binutils-gold
17fix-build-top-mk
18no-AM_INIT_AUTOMAKE
19switch-to-lt_dlopenadvise-to-get-RTLD_GLOBAL-set.diff
20no-bdb-ABI-second-guessing
21heimdal-fix
diff --git a/recipes-support/openldap/openldap-2.4.39/slapi-errorlog-file.patch b/recipes-support/openldap/openldap-2.4.39/slapi-errorlog-file.patch
new file mode 100644
index 0000000..4899451
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/slapi-errorlog-file.patch
@@ -0,0 +1,16 @@
1The slapi error log file defaults to /var/errors given our setting
2of --localstatedir. Move it to /var/log/slapi-errors instead.
3
4Debian-specific.
5
6--- a/servers/slapd/slapi/slapi_overlay.c
7+++ b/servers/slapd/slapi/slapi_overlay.c
8@@ -930,7 +930,7 @@ int slapi_over_config( BackendDB *be, Co
9 ldap_pvt_thread_mutex_init( &slapi_printmessage_mutex );
10
11 if ( slapi_log_file == NULL )
12- slapi_log_file = slapi_ch_strdup( LDAP_RUNDIR LDAP_DIRSEP "errors" );
13+ slapi_log_file = slapi_ch_strdup( LDAP_RUNDIR LDAP_DIRSEP "log" LDAP_DIRSEP "slapi-errors" );
14
15 rc = slapi_int_init_object_extensions();
16 if ( rc != 0 )
diff --git a/recipes-support/openldap/openldap-2.4.39/smbk5pwd-makefile.patch b/recipes-support/openldap/openldap-2.4.39/smbk5pwd-makefile.patch
new file mode 100644
index 0000000..17d1b56
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/smbk5pwd-makefile.patch
@@ -0,0 +1,53 @@
1--- a/contrib/slapd-modules/smbk5pwd/Makefile
2+++ b/contrib/slapd-modules/smbk5pwd/Makefile
3@@ -14,17 +14,17 @@
4
5 LDAP_SRC = ../../..
6 LDAP_BUILD = ../../..
7-LDAP_INC = -I$(LDAP_BUILD)/include -I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd
8-LDAP_LIB = $(LDAP_BUILD)/libraries/libldap_r/libldap_r.la \
9- $(LDAP_BUILD)/libraries/liblber/liblber.la
10+LDAP_INC = -I$(LDAP_BUILD)/debian/build/include -I$(LDAP_BUILD)/debian/build/servers/slapd -I$(LDAP_BUILD)/include -I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd
11+LDAP_LIB = $(LDAP_BUILD)/debian/build/libraries/libldap_r/libldap_r.la \
12+ $(LDAP_BUILD)/debian/build/libraries/liblber/liblber.la
13
14 SSL_INC =
15-SSL_LIB = -lcrypto
16+SSL_LIB = -lgcrypt
17
18-HEIMDAL_INC = -I/usr/heimdal/include
19-HEIMDAL_LIB = -L/usr/heimdal/lib -lkrb5 -lkadm5srv
20+HEIMDAL_INC = -I/usr/include
21+HEIMDAL_LIB = -lkrb5 -lkadm5srv
22
23-LIBTOOL = $(LDAP_BUILD)/libtool
24+LIBTOOL = $(LDAP_BUILD)/debian/build/libtool
25 CC = gcc
26 OPT = -g -O2 -Wall
27 # Omit DO_KRB5, DO_SAMBA or DO_SHADOW if you don't want to support it.
28@@ -35,13 +35,13 @@ LIBS = $(LDAP_LIB) $(HEIMDAL_LIB) $(SSL_
29 PROGRAMS = smbk5pwd.la
30 LTVER = 0:0:0
31
32-prefix=/usr/local
33+prefix=/usr
34 exec_prefix=$(prefix)
35-ldap_subdir=/openldap
36+ldap_subdir=/ldap
37
38 libdir=$(exec_prefix)/lib
39 libexecdir=$(exec_prefix)/libexec
40-moduledir = $(libexecdir)$(ldap_subdir)
41+moduledir = $(libdir)$(ldap_subdir)
42
43 .SUFFIXES: .c .o .lo
44
45@@ -55,7 +55,7 @@ smbk5pwd.la: smbk5pwd.lo
46 -rpath $(moduledir) -module -o $@ $? $(LIBS)
47
48 clean:
49- rm -rf *.o *.lo *.la .libs
50+ $(LIBTOOL) --mode=clean rm -f
51
52 install: $(PROGRAMS)
53 mkdir -p $(DESTDIR)$(moduledir)
diff --git a/recipes-support/openldap/openldap-2.4.39/switch-to-lt_dlopenadvise-to-get-RTLD_GLOBAL-set.diff.patch b/recipes-support/openldap/openldap-2.4.39/switch-to-lt_dlopenadvise-to-get-RTLD_GLOBAL-set.diff.patch
new file mode 100644
index 0000000..df2801f
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/switch-to-lt_dlopenadvise-to-get-RTLD_GLOBAL-set.diff.patch
@@ -0,0 +1,40 @@
1From: Jan-Marek Glogowski <jan-marek.glogowski@muenchen.de>
2Date: Tue, 18 May 2010 17:47:05 +0200
3Subject: Switch to lt_dlopenadvise() so back_perl can be opened with RTLD_GLOBAL.
4 Open all modules with RTLD_GLOBAL, needed so that back_perl can load
5 non-trivial Perl extensions that require symbols from back_perl.so itself.
6Bug-Debian: http://bugs.debian.org/327585
7
8---
9--- a/servers/slapd/module.c
10+++ b/servers/slapd/module.c
11@@ -117,6 +117,20 @@ int module_unload( const char *file_name
12 return -1; /* not found */
13 }
14
15+static lt_dlhandle slapd_lt_dlopenext_global( const char *filename )
16+{
17+ lt_dlhandle handle = 0;
18+ lt_dladvise advise;
19+
20+ if (!lt_dladvise_init (&advise) && !lt_dladvise_ext (&advise)
21+ && !lt_dladvise_global (&advise))
22+ handle = lt_dlopenadvise (filename, advise);
23+
24+ lt_dladvise_destroy (&advise);
25+
26+ return handle;
27+}
28+
29 int module_load(const char* file_name, int argc, char *argv[])
30 {
31 module_loaded_t *module;
32@@ -180,7 +194,7 @@ int module_load(const char* file_name, i
33 * to calling Debug. This is because Debug is a macro that expands
34 * into multiple function calls.
35 */
36- if ((module->lib = lt_dlopenext(file)) == NULL) {
37+ if ((module->lib = slapd_lt_dlopenext_global(file)) == NULL) {
38 error = lt_dlerror();
39 #ifdef HAVE_EBCDIC
40 strcpy( ebuf, error );
diff --git a/recipes-support/openldap/openldap-2.4.39/wrong-database-location.patch b/recipes-support/openldap/openldap-2.4.39/wrong-database-location.patch
new file mode 100644
index 0000000..25d96cb
--- /dev/null
+++ b/recipes-support/openldap/openldap-2.4.39/wrong-database-location.patch
@@ -0,0 +1,74 @@
1Move the default slapd database location to /var/lib/ldap instead of
2/var/openldap-data.
3
4Debian-specific.
5
6--- a/doc/man/man5/slapd-bdb.5
7+++ b/doc/man/man5/slapd-bdb.5
8@@ -131,7 +131,7 @@ Specify the directory where the BDB file
9 associated indexes live.
10 A separate directory must be specified for each database.
11 The default is
12-.BR LOCALSTATEDIR/openldap\-data .
13+.BR LOCALSTATEDIR/lib/ldap .
14 .TP
15 .B dirtyread
16 Allow reads of modified but not yet committed data.
17--- a/doc/man/man5/slapd.conf.5
18+++ b/doc/man/man5/slapd.conf.5
19@@ -2007,7 +2007,7 @@ suffix "dc=our\-domain,dc=com"
20 # The database directory MUST exist prior to
21 # running slapd AND should only be accessible
22 # by the slapd/tools. Mode 0700 recommended.
23-directory LOCALSTATEDIR/openldap\-data
24+directory LOCALSTATEDIR/lib/ldap
25 # Indices to maintain
26 index objectClass eq
27 index cn,sn,mail pres,eq,approx,sub
28--- a/include/ldap_defaults.h
29+++ b/include/ldap_defaults.h
30@@ -47,7 +47,7 @@
31 /* location of the default slapd config file */
32 #define SLAPD_DEFAULT_CONFIGFILE LDAP_SYSCONFDIR LDAP_DIRSEP "slapd.conf"
33 #define SLAPD_DEFAULT_CONFIGDIR LDAP_SYSCONFDIR LDAP_DIRSEP "slapd.d"
34-#define SLAPD_DEFAULT_DB_DIR LDAP_RUNDIR LDAP_DIRSEP "openldap-data"
35+#define SLAPD_DEFAULT_DB_DIR LDAP_RUNDIR LDAP_DIRSEP "lib" LDAP_DIRSEP "ldap"
36 #define SLAPD_DEFAULT_DB_MODE 0600
37 #define SLAPD_DEFAULT_UCDATA LDAP_DATADIR LDAP_DIRSEP "ucdata"
38 /* default max deref depth for aliases */
39--- a/servers/slapd/Makefile.in
40+++ b/servers/slapd/Makefile.in
41@@ -445,9 +445,9 @@ install-conf: FORCE
42
43 install-db-config: FORCE
44 @-$(MKDIR) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir)
45- @-$(INSTALL) -m 700 -d $(DESTDIR)$(localstatedir)/openldap-data
46+ @-$(INSTALL) -m 700 -d $(DESTDIR)$(localstatedir)/lib/ldap
47 $(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \
48- $(DESTDIR)$(localstatedir)/openldap-data/DB_CONFIG.example
49+ $(DESTDIR)$(localstatedir)/lib/ldap/DB_CONFIG.example
50 $(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \
51 $(DESTDIR)$(sysconfdir)/DB_CONFIG.example
52
53--- a/doc/man/man5/slapd-config.5
54+++ b/doc/man/man5/slapd-config.5
55@@ -2051,7 +2051,7 @@ olcSuffix: "dc=our\-domain,dc=com"
56 # The database directory MUST exist prior to
57 # running slapd AND should only be accessible
58 # by the slapd/tools. Mode 0700 recommended.
59-olcDbDirectory: LOCALSTATEDIR/openldap\-data
60+olcDbDirectory: LOCALSTATEDIR/lib/ldap
61 # Indices to maintain
62 olcDbIndex: objectClass eq
63 olcDbIndex: cn,sn,mail pres,eq,approx,sub
64--- a/doc/man/man5/slapd-mdb.5
65+++ b/doc/man/man5/slapd-mdb.5
66@@ -52,7 +52,7 @@ Specify the directory where the LMDB fil
67 associated indexes live.
68 A separate directory must be specified for each database.
69 The default is
70-.BR LOCALSTATEDIR/openldap\-data .
71+.BR LOCALSTATEDIR/lib/ldap .
72 .TP
73 \fBenvflags \fR{\fBnosync\fR,\fBnometasync\fR,\fBwritemap\fR,\fBmapasync\fR,\fBnordahead\fR}
74 Specify flags for finer-grained control of the LMDB library's operation.
diff --git a/recipes-support/openldap/openldap_2.4.39.bb b/recipes-support/openldap/openldap_2.4.39.bb
new file mode 100644
index 0000000..3048c8e
--- /dev/null
+++ b/recipes-support/openldap/openldap_2.4.39.bb
@@ -0,0 +1,182 @@
1# OpenLDAP, a license free (see http://www.OpenLDAP.org/license.html)
2#
3DESCRIPTION = "OpenLDAP Software is an open source implementation of the Lightweight Directory Access Protocol."
4HOMEPAGE = "http://www.OpenLDAP.org/license.html"
5# The OpenLDAP Public License - see the HOMEPAGE - defines
6# the license. www.openldap.org claims this is Open Source
7# (see http://www.openldap.org), the license appears to be
8# basically BSD. opensource.org does not record this license
9# at present (so it is apparently not OSI certified).
10LICENSE = "OpenLDAP"
11LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=f2bdbaa4f50199a00b6de2ca7ec1db05"
12SECTION = "libs"
13
14# patches taken from Debian
15SRC_URI = "\
16 ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${P}.tgz \
17 file://man-slapd.patch \
18 file://evolution-ntlm.patch \
19 file://slapi-errorlog-file.patch \
20 file://ldapi-socket-place.patch \
21 file://wrong-database-location.patch \
22 file://index-files-created-as-root.patch \
23 file://sasl-default-path.patch \
24 file://libldap-symbol-versions.patch \
25 file://getaddrinfo-is-threadsafe.patch \
26 file://do-not-second-guess-sonames.patch \
27 file://contrib-modules-use-dpkg-buildflags.patch \
28 file://smbk5pwd-makefile.patch \
29 file://autogroup-makefile.patch \
30 file://ldap-conf-tls-cacertdir.patch \
31 file://add-tlscacert-option-to-ldap-conf.patch \
32 file://fix-ftbfs-binutils-gold.patch \
33 file://fix-build-top-mk.patch \
34 file://no-AM_INIT_AUTOMAKE.patch \
35 file://switch-to-lt_dlopenadvise-to-get-RTLD_GLOBAL-set.diff.patch \
36 file://no-bdb-ABI-second-guessing.patch \
37 file://heimdal-fix.patch \
38"
39SRC_URI[md5sum] = "b0d5ee4b252c841dec6b332d679cf943"
40SRC_URI[sha256sum] = "8267c87347103fef56b783b24877c0feda1063d3cb85d070e503d076584bf8a7"
41
42DEPENDS = "util-linux groff-native db"
43
44PR = "r0"
45# The original top.mk used INSTALL, not INSTALL_STRIP_PROGRAM when
46# installing .so and executables, this fails in cross compilation
47# environments
48SRC_URI += "file://install-strip.patch"
49
50# inherit autotools
51inherit autotools-brokensep
52
53# CV SETTINGS
54# Required to work round AC_FUNC_MEMCMP which gets the wrong answer
55# when cross compiling (should be in site?)
56EXTRA_OECONF += "ac_cv_func_memcmp_working=yes"
57
58# CONFIG DEFINITIONS
59# The following is necessary because it cannot be determined for a
60# cross compile automagically. Select should yield fine on all OE
61# systems...
62EXTRA_OECONF += "--with-yielding-select=yes"
63# Shared libraries are nice...
64EXTRA_OECONF += "--enable-dynamic"
65
66PACKAGECONFIG ??= "openssl modules \
67 ldap meta monitor null passwd shell proxycache dnssrv \
68 bdb hdb mdb sasl \
69"
70#--with-tls with TLS/SSL support auto|openssl|gnutls [auto]
71PACKAGECONFIG[gnutls] = "--with-tls=gnutls,,gnutls"
72PACKAGECONFIG[openssl] = "--with-tls=openssl,,openssl"
73
74PACKAGECONFIG[sasl] = "--with-cyrus-sasl,--without-cyrus-sasl,cyrus-sasl"
75PACKAGECONFIG[modules] = "lt_cv_dlopen_self=yes --enable-modules,--disable-modules,libtool"
76
77# SLAPD options
78#
79# UNIX crypt(3) passwd support:
80EXTRA_OECONF += "--enable-crypt"
81
82EXTRA_OECONF += "--enable-ipv6"
83
84# SLAPD BACKEND
85#
86# The backend must be set by the configuration. This controls the
87# required database, the default database, bdb, is turned off but
88# can be turned back on again and it *is* below! The monitor backend
89# is also disabled. If you try to change the backends but fail to
90# enable a single one the build will fail in an obvious way.
91#
92# EXTRA_OECONF += "--disable-bdb --disable-hdb --disable-monitor"
93#
94# Backends="bdb dnssrv hdb ldap ldbm meta monitor null passwd perl shell sql"
95#
96# Note that multiple backends can be built. The ldbm backend requires a
97# build-time choice of database API. The bdb backend forces this to be
98# DB4. To use the gdbm (or other) API the Berkely database module must
99# be removed from the build.
100md = "${libexecdir}/openldap"
101#
102#--enable-bdb enable Berkeley DB backend no|yes|mod yes
103# The Berkely DB is the standard choice. This version of OpenLDAP requires
104# the version 4 implementation or better.
105PACKAGECONFIG[bdb] = "--enable-bdb=mod,--enable-bdb=no,db"
106
107#--enable-dnssrv enable dnssrv backend no|yes|mod no
108PACKAGECONFIG[dnssrv] = "--enable-dnssrv=mod,--enable-dnssrv=no"
109
110#--enable-hdb enable Hierarchical DB backend no|yes|mod no
111# This forces ldbm to use Berkeley too, remove to use gdbm
112PACKAGECONFIG[hdb] = "--enable-hdb=mod,--enable-hdb=no,db"
113
114#--enable-ldap enable ldap backend no|yes|mod no
115PACKAGECONFIG[ldap] = "--enable-ldap=mod,--enable-ldap=no,"
116
117#--enable-ldbm enable ldbm backend no|yes|mod no
118# ldbm requires further specification of the underlying database API, because
119# bdb is enabled above this must be set to berkeley, however the config
120# defaults this correctly so --with-ldbm-api is *not* set. The build will
121# fail if bdb is removed, but no database is built to provide the
122# support for ldbm
123# guide.html:<P>back-ldbm was both slow and unreliable. Its byzantine indexing code was prone to spontaneous corruption, as were the underlying database libraries that were commonly used (e.g. GDBM or NDBM). back-bdb and back-hdb are superior in every aspect, with simplified indexing to avoid index corruption, fine-grained locking for greater concurrency, hierarchical caching for greater performance, streamlined on-disk format for greater efficiency and portability, and full transaction support for greater reliability.</P>
124# configure: WARNING: unrecognized options: --disable-silent-rules, --enable-ldbm, --with-ldbm-api
125#PACKAGECONFIG[ldbm] = "--enable-ldbm=mod --with-ldbm-api=gdbm,--enable-ldbm-no,gdbm"
126
127#--enable-meta enable metadirectory backend no|yes|mod no
128PACKAGECONFIG[meta] = "--enable-meta=mod,--enable-meta=no,"
129
130#--enable-monitor enable monitor backend no|yes|mod yes
131PACKAGECONFIG[monitor] = "--enable-monitor=mod,--enable-monitor=no,"
132
133#--enable-null enable null backend no|yes|mod no
134PACKAGECONFIG[null] = "--enable-null=mod,--enable-null=no,"
135
136#--enable-passwd enable passwd backend no|yes|mod no
137PACKAGECONFIG[passwd] = "--enable-passwd=mod,--enable-passwd=no,"
138
139# disabling perl support - host contamination issues
140#
141#--enable-perl enable perl backend no|yes|mod no
142# This requires a loadable perl dynamic library, if enabled without
143# doing something appropriate (building perl?) the build will pick
144# up the build machine perl - not good (inherit perlnative?)
145# PACKAGECONFIG[perl] = "--enable-perl=mod,--enable-perl=no,perl"
146
147#--enable-shell enable shell backend no|yes|mod no
148# configure: WARNING: Use of --without-threads is recommended with back-shell
149PACKAGECONFIG[shell] = "--enable-shell=mod --without-threads,--enable-shell=no,"
150
151#--enable-sql enable sql backend no|yes|mod no
152# sql requires some sql backend which provides sql.h, sqlite* provides
153# sqlite.h (which may be compatible but hasn't been tried.)
154PACKAGECONFIG[sql] = "--enable-sql=mod,--enable-sql=no,sqlite3"
155
156#--enable-dyngroup Dynamic Group overlay no|yes|mod no
157# This is a demo, Proxy Cache defines init_module which conflicts with the
158# same symbol in dyngroup
159PACKAGECONFIG[dyngroup] = "--enable-dyngroup=mod,--enable-dyngroup=no,"
160
161#--enable-proxycache Proxy Cache overlay no|yes|mod no
162PACKAGECONFIG[proxycache] = "--enable-proxycache=mod,--enable-proxycache=no,"
163
164#--enable-mdb enable mdb database backend no|yes|mod no
165PACKAGECONFIG[mdb] = "--enable-mdb=mod,--enable-mdb=no,"
166
167CPPFLAGS_append = " -D_GNU_SOURCE"
168
169do_configure() {
170 cp ${STAGING_DATADIR_NATIVE}/libtool/config/ltmain.sh ${S}/build
171 rm -f ${S}/libtool
172 rm -f ${S}/libtool
173 aclocal
174 libtoolize --force --copy
175 gnu-configize
176 autoconf
177 oe_runconf
178}
179
180FILES_${PN}-dev = "${includedir} ${libdir}/lib*.so ${libdir}/*.la ${libdir}/*.a ${libexecdir}/openldap/*.a ${libexecdir}/openldap/*.la ${libexecdir}/openldap/*.so"
181FILES_${PN}-dbg += "${libexecdir}/openldap/.debug"
182