Merge ~sergiodj/ubuntu/+source/openldap:MRE-2.5.15-jammy into ubuntu/+source/openldap:ubuntu/jammy-devel

Proposed by Sergio Durigan Junior
Status: Merged
Approved by: git-ubuntu bot
Approved revision: not available
Merged at revision: cd0f88b119a818e3746edf9cdf8740354d63c09f
Proposed branch: ~sergiodj/ubuntu/+source/openldap:MRE-2.5.15-jammy
Merge into: ubuntu/+source/openldap:ubuntu/jammy-devel
Diff against target: 3560 lines (+794/-804)
69 files modified
CHANGES (+38/-0)
Makefile.in (+1/-1)
aclocal.m4 (+10/-10)
build/lib.mk (+1/-1)
build/openldap.m4 (+13/-3)
build/version.var (+4/-4)
clients/tools/ldapdelete.c (+7/-5)
configure (+239/-36)
configure.ac (+24/-11)
contrib/ldaptcl/tclAppInit.c (+1/-3)
contrib/ldaptcl/tkAppInit.c (+0/-13)
contrib/slapd-modules/datamorph/tests/run (+1/-213)
contrib/slapd-modules/emptyds/tests/run (+1/-202)
contrib/slapd-modules/variant/slapo-variant.5 (+2/-2)
contrib/slapd-modules/variant/tests/data/test001-04a-same-regex.ldif (+4/-0)
contrib/slapd-modules/variant/tests/data/test001-04b-same-regex.ldif (+4/-0)
contrib/slapd-modules/variant/tests/run (+1/-213)
contrib/slapd-modules/variant/variant.c (+30/-11)
debian/changelog (+8/-0)
doc/guide/admin/aspell.en.pws (+0/-1)
doc/guide/admin/guide.html (+3/-3)
doc/guide/admin/overlays.sdf (+2/-2)
doc/man/man5/lloadd.conf.5 (+1/-1)
doc/man/man5/slapd-ldap.5 (+1/-0)
doc/man/man5/slapo-pcache.5 (+1/-1)
libraries/libldap/init.c (+3/-3)
libraries/libldap/open.c (+6/-1)
libraries/libldap/tls_o.c (+16/-2)
libraries/liblmdb/CHANGES (+3/-0)
libraries/liblmdb/lmdb.h (+2/-2)
libraries/liblmdb/mdb.c (+3/-0)
libraries/librewrite/ldapmap.c (+7/-4)
servers/slapd/at.c (+4/-0)
servers/slapd/bconfig.c (+36/-3)
servers/slapd/overlays/constraint.c (+2/-2)
servers/slapd/overlays/dynlist.c (+110/-14)
servers/slapd/overlays/pcache.c (+2/-2)
servers/slapd/overlays/ppolicy.c (+4/-3)
servers/slapd/overlays/syncprov.c (+36/-6)
servers/slapd/overlays/translucent.c (+2/-2)
servers/slapd/overlays/unique.c (+3/-3)
servers/slapd/passwd.c (+2/-0)
servers/slapd/pwmods/README.argon2 (+6/-18)
servers/slapd/syncrepl.c (+3/-1)
servers/slapd/syslog.c (+1/-1)
tests/progs/slapd-mtread.c (+2/-0)
tests/progs/slapd-search.c (+2/-0)
tests/progs/slapd-watcher.c (+1/-1)
tests/scripts/lloadd/test001-backend-issues (+1/-0)
tests/scripts/lloadd/test002-load (+1/-0)
tests/scripts/lloadd/test003-cnconfig (+1/-0)
tests/scripts/lloadd/test004-monitor (+1/-0)
tests/scripts/test049-sync-config (+13/-0)
tests/scripts/test050-syncrepl-multiprovider (+5/-0)
tests/scripts/test053-syncprov-glue (+15/-0)
tests/scripts/test058-syncrepl-asymmetric (+12/-0)
tests/scripts/test059-consumer-config (+13/-0)
tests/scripts/test061-syncreplication-initiation (+6/-0)
tests/scripts/test062-config-delete (+6/-0)
tests/scripts/test063-delta-multiprovider (+6/-0)
tests/scripts/test064-constraint (+5/-0)
tests/scripts/test066-autoca (+6/-0)
tests/scripts/test069-delta-multiprovider-starttls (+7/-0)
tests/scripts/test070-delta-multiprovider-ldaps (+6/-0)
tests/scripts/test071-dirsync (+7/-0)
tests/scripts/test076-authid-rewrite (+6/-0)
tests/scripts/test078-persistent-sessionlog (+6/-0)
tests/scripts/test083-argon2 (+5/-0)
tests/scripts/test086-delta-consumer-config (+13/-0)
Reviewer Review Type Date Requested Status
git-ubuntu bot Approve
Lena Voytek (community) Approve
Canonical Server Reporter Pending
Review via email: mp+446555@code.launchpad.net

Description of the change

This is the MRE of OpenLDAP 2.5.15 for Jammy.

As usual, this MRE introduces several bugfixes to the OpenLDAP package. There is one change which adds support for OpenSSL 3.0 to libldap, but it's a small commit and I don't believe it can be characterized as a new feature:

https://git.openldap.org/openldap/openldap/-/commit/7fba0f7ee568bdf04c608c0e66aefb2012e3fc33

PPA: https://launchpad.net/~sergiodj/+archive/ubuntu/openldap/+packages

I'll wait for the builds to be published before I trigger the dep8 tests for the reverse deps.

To post a comment you must log in.
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

FWIW, in theory this MRE should target Kinetic as well, but I don't think it's worth the effort so I will wait until Kinetic is EOL before I upload it to Jammy.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Analysis of the dep8 failures:

- libaws @ amd64:
- libaws @ arm64:
- libaws @ armhf:
- libaws @ ppc64el:
- libaws @ s390x:
- nss-pam-ldapd @ amd64:
- nss-pam-ldapd @ arm64:
- nss-pam-ldapd @ armhf:
- nss-pam-ldapd @ ppc64el:
- nss-pam-ldapd @ s390x:
- sudo @ armhf:
- volatildap @ armhf:
- cyrus-imapd @ ppc64el:
- pdns @ amd64:
- pdns @ arm64:
- pdns @ armhf:
- pdns @ ppc64el:
- pdns @ s390x:
- kopanocore @ s390x:
- squid @ armhf:

Already failing in Jammy.

- exim4 @ ppc64el:

Retriggered, and it failed again. However, the failure is well known (*** TLS startup failed (connect(): error:0A000438:SSL routines::tlsv1 alert internal error) and flaky.

The libreoffice tests are still running, but I don't foresee any problems with them. Everything else passed.

Revision history for this message
Lena Voytek (lvoytek) wrote :

LGTM, I looked through the list of changes and they all seem fine to me. A lot of them seem pretty helpful and otherwise the rest are mostly code style updates. The OpenSSL 3.0 support update looks fine on its own too. The bug report looks good too, although it may be worth mentioning the update for OpenSSL 3 support since its available in Jammy and could cause varied behavior with other packages.

review: Approve
Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: sergiodj, lvoytek
Uploaders: sergiodj, lvoytek
MP auto-approved

review: Approve
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I don't think we link with openssl, at least in mantic (also checked in focal):

$ grep tls debian/configure.options
# --with-tls with TLS/SSL support auto|openssl|gnutls [auto]
--with-tls=gnutls

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

On Wednesday, July 12 2023, Andreas Hasenack wrote:

> I don't think we link with openssl, at least in mantic (also checked in focal):
>
> $ grep tls debian/configure.options
> # --with-tls with TLS/SSL support auto|openssl|gnutls [auto]
> --with-tls=gnutls

Thanks Lena and Andreas.

Indeed, OpenLDAP isn't linked against OpenSSL in Jammy, so the change is
moot.

I'll go ahead and upload it.

$ dput openldap_2.5.15+dfsg-0ubuntu0.22.04.1_source.changes
Trying to upload package to ubuntu
Checking signature on .changes
gpg: /home/sergio/work/openldap/openldap_2.5.15+dfsg-0ubuntu0.22.04.1_source.changes: Valid signature from 106DA1C8C3CBBF14
Checking signature on .dsc
gpg: /home/sergio/work/openldap/openldap_2.5.15+dfsg-0ubuntu0.22.04.1.dsc: Valid signature from 106DA1C8C3CBBF14
Package includes an .orig.tar.gz file although the debian revision suggests
that it might not be required. Multiple uploads of the .orig.tar.gz may be
rejected by the upload queue management software.
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading openldap_2.5.15+dfsg-0ubuntu0.22.04.1.dsc: done.
  Uploading openldap_2.5.15+dfsg.orig.tar.gz: done.
  Uploading openldap_2.5.15+dfsg-0ubuntu0.22.04.1.debian.tar.xz: done.
  Uploading openldap_2.5.15+dfsg-0ubuntu0.22.04.1_source.buildinfo: done.
  Uploading openldap_2.5.15+dfsg-0ubuntu0.22.04.1_source.changes: done.
Successfully uploaded packages.

--
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0 EB2F 106D A1C8 C3CB BF14

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/CHANGES b/CHANGES
index fe6949b..6256ae7 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,43 @@
1OpenLDAP 2.5 Change Log1OpenLDAP 2.5 Change Log
22
3OpenLDAP 2.5.15 Release (2023/07/10)
4 Added libldap openssl3 support (ITS#9436, ITS#10030)
5 Fixed libldap handling of TCP KEEPALIVE options (ITS#10015)
6 Fixed libldap with async connections (ITS#10023)
7 Fixed libldap openssl TLSv1.3 cipher suite handling (ITS#10035)
8 Fixed slapd callback handling with overlays that do extended operations (ITS#9990)
9 Fixed slapd conversion of pcache configurations (ITS#10031)
10 Fixed slapd cn=config modification handling with abandon (ITS#10045)
11 Fixed slapo-constraint handling of push replication (ITS#9953)
12 Fixed slapo-dynlist filter evaluation efficiency (ITS#10041)
13 Fixed slapo-pcache handling of invalid schema (ITS#10032)
14 Fixed slapo-ppolicy handling of push replication (ITS#9953)
15 Fixed slapo-ppolicy handling of pwdMinDelay (ITS#10028)
16 Fixed slapo-syncprov abandon handling (ITS#10016)
17 Fixed slapo-translucent handling of invalid schema (ITS#10032)
18 Fixed slapo-unique handling of push replication (ITS#9953)
19 Fixed slapo-variant to improve regex handling (ITS#10048)
20 Build Environment
21 Fixed compatibility with stricter C99 compilers (ITS#10011)
22 Keep .pc files during make clean (ITS#9989)
23 Contrib
24 Fixed slapo-variant handling of push replication (ITS#9953)
25 Minor Cleanup
26 ITS#9855
27 ITS#9995
28 ITS#9996
29 ITS#9997
30 ITS#9998
31 ITS#9999
32 ITS#10000
33 ITS#10003
34 ITS#10004
35 ITS#10033
36 ITS#10037
37 ITS#10039
38 ITS#10046
39 ITS#10063
40
3OpenLDAP 2.5.14 Release (2023/02/08)41OpenLDAP 2.5.14 Release (2023/02/08)
4 Fixed client tools to remove 'h' and 'p' options (ITS#9917,ITS#8618)42 Fixed client tools to remove 'h' and 'p' options (ITS#9917,ITS#8618)
5 Fixed ldapsearch memory leak with paged results (ITS#9860)43 Fixed ldapsearch memory leak with paged results (ITS#9860)
diff --git a/Makefile.in b/Makefile.in
index 5c6bec0..2b87aa6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -29,7 +29,7 @@ clean-local: FORCE
29 $(RM) -r autom4te.cache29 $(RM) -r autom4te.cache
3030
31veryclean-local: FORCE31veryclean-local: FORCE
32 $(RM) config.status libtool stamp-h stamp-h.in32 $(RM) config.status libtool stamp-h stamp-h.in libraries/libldap/ldap.pc libraries/liblber/lber.pc
3333
34distclean: veryclean FORCE34distclean: veryclean FORCE
3535
diff --git a/aclocal.m4 b/aclocal.m4
index daf32af..8ccd66a 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
1# generated automatically by aclocal 1.16.1 -*- Autoconf -*-1# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
22
3# Copyright (C) 1996-2018 Free Software Foundation, Inc.3# Copyright (C) 1996-2021 Free Software Foundation, Inc.
44
5# This file is free software; the Free Software Foundation5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,6# gives unlimited permission to copy and/or distribute it,
@@ -12,9 +12,9 @@
12# PARTICULAR PURPOSE.12# PARTICULAR PURPOSE.
1313
14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-15# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
16dnl serial 11 (pkg-config-0.29.1)16# serial 12 (pkg-config-0.29.2)
17dnl17
18dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.18dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
19dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>19dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
20dnl20dnl
@@ -55,7 +55,7 @@ dnl
55dnl See the "Since" comment for each macro you use to see what version55dnl See the "Since" comment for each macro you use to see what version
56dnl of the macros you require.56dnl of the macros you require.
57m4_defun([PKG_PREREQ],57m4_defun([PKG_PREREQ],
58[m4_define([PKG_MACROS_VERSION], [0.29.1])58[m4_define([PKG_MACROS_VERSION], [0.29.2])
59m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,59m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
60 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])60 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
61])dnl PKG_PREREQ61])dnl PKG_PREREQ
@@ -156,7 +156,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
156AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl156AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
157157
158pkg_failed=no158pkg_failed=no
159AC_MSG_CHECKING([for $1])159AC_MSG_CHECKING([for $2])
160160
161_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])161_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
162_PKG_CONFIG([$1][_LIBS], [libs], [$2])162_PKG_CONFIG([$1][_LIBS], [libs], [$2])
@@ -166,11 +166,11 @@ and $1[]_LIBS to avoid the need to call pkg-config.
166See the pkg-config man page for more details.])166See the pkg-config man page for more details.])
167167
168if test $pkg_failed = yes; then168if test $pkg_failed = yes; then
169 AC_MSG_RESULT([no])169 AC_MSG_RESULT([no])
170 _PKG_SHORT_ERRORS_SUPPORTED170 _PKG_SHORT_ERRORS_SUPPORTED
171 if test $_pkg_short_errors_supported = yes; then171 if test $_pkg_short_errors_supported = yes; then
172 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`172 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
173 else 173 else
174 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`174 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
175 fi175 fi
176 # Put the nasty error message in config.log where it belongs176 # Put the nasty error message in config.log where it belongs
@@ -187,7 +187,7 @@ installed software in a non-standard prefix.
187_PKG_TEXT])[]dnl187_PKG_TEXT])[]dnl
188 ])188 ])
189elif test $pkg_failed = untried; then189elif test $pkg_failed = untried; then
190 AC_MSG_RESULT([no])190 AC_MSG_RESULT([no])
191 m4_default([$4], [AC_MSG_FAILURE(191 m4_default([$4], [AC_MSG_FAILURE(
192[The pkg-config script could not be found or is too old. Make sure it192[The pkg-config script could not be found or is too old. Make sure it
193is in your PATH or set the PKG_CONFIG environment variable to the full193is in your PATH or set the PKG_CONFIG environment variable to the full
diff --git a/build/lib.mk b/build/lib.mk
index 442c0d3..c50ef52 100644
--- a/build/lib.mk
+++ b/build/lib.mk
@@ -40,7 +40,7 @@ lint5: lint5-local FORCE
40clean-common: FORCE40clean-common: FORCE
41 $(RM) $(LIBRARY) ../$(LIBRARY) $(XLIBRARY) \41 $(RM) $(LIBRARY) ../$(LIBRARY) $(XLIBRARY) \
42 $(PROGRAMS) $(XPROGRAMS) $(XSRCS) $(XXSRCS) \42 $(PROGRAMS) $(XPROGRAMS) $(XSRCS) $(XXSRCS) \
43 *.o *.lo a.out *.exe *.pc core version.c .libs/*43 *.o *.lo a.out *.exe core version.c .libs/*
4444
45depend-common: FORCE45depend-common: FORCE
46 $(MKDEP) $(DEFS) $(DEFINES) $(SRCS) $(XXSRCS)46 $(MKDEP) $(DEFS) $(DEFINES) $(SRCS) $(XXSRCS)
diff --git a/build/openldap.m4 b/build/openldap.m4
index c7fa19e..9419aaf 100644
--- a/build/openldap.m4
+++ b/build/openldap.m4
@@ -154,6 +154,7 @@ fi
154if test $ol_cv_header_stdc = yes; then154if test $ol_cv_header_stdc = yes; then
155 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.155 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
156AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <ctype.h>156AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <ctype.h>
157#include <stdlib.h>
157#ifndef HAVE_EBCDIC158#ifndef HAVE_EBCDIC
158# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')159# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
159# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))160# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
@@ -303,8 +304,12 @@ AC_DEFUN([OL_PTHREAD_TEST_INCLUDES], [[
303#define NULL (void*)0304#define NULL (void*)0
304#endif305#endif
305306
307#ifdef __STDC__
308static void *task(void *p)
309#else
306static void *task(p)310static void *task(p)
307 void *p;311 void *p;
312#endif
308{313{
309 return (void *) (p == NULL);314 return (void *) (p == NULL);
310}315}
@@ -360,9 +365,13 @@ AC_DEFUN([OL_PTHREAD_TEST_FUNCTION],[[
360AC_DEFUN([OL_PTHREAD_TEST_PROGRAM],365AC_DEFUN([OL_PTHREAD_TEST_PROGRAM],
361[AC_LANG_SOURCE([OL_PTHREAD_TEST_INCLUDES366[AC_LANG_SOURCE([OL_PTHREAD_TEST_INCLUDES
362367
368#ifdef __STDC__
369int main(int argc, char **argv)
370#else
363int main(argc, argv)371int main(argc, argv)
364 int argc;372 int argc;
365 char **argv;373 char **argv;
374#endif
366{375{
367OL_PTHREAD_TEST_FUNCTION376OL_PTHREAD_TEST_FUNCTION
368}377}
@@ -484,7 +493,7 @@ AC_CACHE_CHECK([for compatible POSIX regex],ol_cv_c_posix_regex,[
484#include <sys/types.h>493#include <sys/types.h>
485#include <regex.h>494#include <regex.h>
486static char *pattern, *string;495static char *pattern, *string;
487main()496int main(void)
488{497{
489 int rc;498 int rc;
490 regex_t re;499 regex_t re;
@@ -511,7 +520,8 @@ AC_DEFUN([OL_C_UPPER_LOWER],
511[AC_CACHE_CHECK([if toupper() requires islower()],ol_cv_c_upper_lower,[520[AC_CACHE_CHECK([if toupper() requires islower()],ol_cv_c_upper_lower,[
512 AC_RUN_IFELSE([AC_LANG_SOURCE([[521 AC_RUN_IFELSE([AC_LANG_SOURCE([[
513#include <ctype.h>522#include <ctype.h>
514main()523#include <stdlib.h>
524int main(void)
515{525{
516 if ('C' == toupper('C'))526 if ('C' == toupper('C'))
517 exit(0);527 exit(0);
@@ -569,7 +579,7 @@ AC_DEFUN([OL_NONPOSIX_STRERROR_R],
569 ]])],[ol_cv_nonposix_strerror_r=yes],[ol_cv_nonposix_strerror_r=no])579 ]])],[ol_cv_nonposix_strerror_r=yes],[ol_cv_nonposix_strerror_r=no])
570 else580 else
571 AC_RUN_IFELSE([AC_LANG_SOURCE([[581 AC_RUN_IFELSE([AC_LANG_SOURCE([[
572 main() {582 int main(void) {
573 char buf[100];583 char buf[100];
574 buf[0] = 0;584 buf[0] = 0;
575 strerror_r( 1, buf, sizeof buf );585 strerror_r( 1, buf, sizeof buf );
diff --git a/build/version.var b/build/version.var
index 19cfaea..5bcd71b 100644
--- a/build/version.var
+++ b/build/version.var
@@ -15,9 +15,9 @@
15ol_package=OpenLDAP15ol_package=OpenLDAP
16ol_major=216ol_major=2
17ol_minor=517ol_minor=5
18ol_patch=1418ol_patch=15
19ol_api_inc=2051419ol_api_inc=20515
20ol_api_current=120ol_api_current=1
21ol_api_revision=921ol_api_revision=10
22ol_api_age=122ol_api_age=1
23ol_release_date="2023/02/08"23ol_release_date="2023/07/10"
diff --git a/clients/tools/ldapdelete.c b/clients/tools/ldapdelete.c
index 6024a33..e572e43 100644
--- a/clients/tools/ldapdelete.c
+++ b/clients/tools/ldapdelete.c
@@ -386,7 +386,9 @@ more:;
386 break;386 break;
387 default:387 default:
388 tool_perror( "ldap_search", srch_rc, NULL, NULL, NULL, NULL );388 tool_perror( "ldap_search", srch_rc, NULL, NULL, NULL, NULL );
389 return( srch_rc );389 rc = srch_rc;
390 srch_rc = 0;
391 goto leave;
390 }392 }
391393
392 entries = ldap_count_entries( ld, res );394 entries = ldap_count_entries( ld, res );
@@ -402,15 +404,14 @@ more:;
402 if( dn == NULL ) {404 if( dn == NULL ) {
403 ldap_get_option( ld, LDAP_OPT_RESULT_CODE, &rc );405 ldap_get_option( ld, LDAP_OPT_RESULT_CODE, &rc );
404 tool_perror( "ldap_prune", rc, NULL, NULL, NULL, NULL );406 tool_perror( "ldap_prune", rc, NULL, NULL, NULL, NULL );
405 ber_memfree( dn );407 goto leave;
406 return rc;
407 }408 }
408409
409 rc = deletechildren( ld, dn, 0 );410 rc = deletechildren( ld, dn, 0 );
410 if ( rc != LDAP_SUCCESS ) {411 if ( rc != LDAP_SUCCESS ) {
411 tool_perror( "ldap_prune", rc, NULL, NULL, NULL, NULL );412 tool_perror( "ldap_prune", rc, NULL, NULL, NULL, NULL );
412 ber_memfree( dn );413 ber_memfree( dn );
413 return rc;414 goto leave;
414 }415 }
415416
416 if ( verbose ) {417 if ( verbose ) {
@@ -421,7 +422,7 @@ more:;
421 if ( rc != LDAP_SUCCESS ) {422 if ( rc != LDAP_SUCCESS ) {
422 tool_perror( "ldap_delete", rc, NULL, NULL, NULL, NULL );423 tool_perror( "ldap_delete", rc, NULL, NULL, NULL, NULL );
423 ber_memfree( dn );424 ber_memfree( dn );
424 return rc;425 goto leave;
425426
426 }427 }
427 428
@@ -433,6 +434,7 @@ more:;
433 }434 }
434 }435 }
435436
437leave:
436 ldap_msgfree( res );438 ldap_msgfree( res );
437439
438 if ( srch_rc == LDAP_SIZELIMIT_EXCEEDED ) {440 if ( srch_rc == LDAP_SIZELIMIT_EXCEEDED ) {
diff --git a/configure b/configure
index b718883..ae23534 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
1#! /bin/sh1#! /bin/sh
2# From configure.ac Id: 3943f6265060065483db582e5c7bef14fe934d80 .2# From configure.ac Id: a4836a8a0218326643db20d8131fc717d1fc3edf .
3# Guess values for system-dependent variables and create Makefiles.3# Guess values for system-dependent variables and create Makefiles.
4# Generated by GNU Autoconf 2.69.4# Generated by GNU Autoconf 2.69.
5#5#
@@ -812,7 +812,6 @@ infodir
812docdir812docdir
813oldincludedir813oldincludedir
814includedir814includedir
815runstatedir
816localstatedir815localstatedir
817sharedstatedir816sharedstatedir
818sysconfdir817sysconfdir
@@ -973,7 +972,6 @@ datadir='${datarootdir}'
973sysconfdir='${prefix}/etc'972sysconfdir='${prefix}/etc'
974sharedstatedir='${prefix}/com'973sharedstatedir='${prefix}/com'
975localstatedir='${prefix}/var'974localstatedir='${prefix}/var'
976runstatedir='${localstatedir}/run'
977includedir='${prefix}/include'975includedir='${prefix}/include'
978oldincludedir='/usr/include'976oldincludedir='/usr/include'
979docdir='${datarootdir}/doc/${PACKAGE}'977docdir='${datarootdir}/doc/${PACKAGE}'
@@ -1226,15 +1224,6 @@ do
1226 | -silent | --silent | --silen | --sile | --sil)1224 | -silent | --silent | --silen | --sile | --sil)
1227 silent=yes ;;1225 silent=yes ;;
12281226
1229 -runstatedir | --runstatedir | --runstatedi | --runstated \
1230 | --runstate | --runstat | --runsta | --runst | --runs \
1231 | --run | --ru | --r)
1232 ac_prev=runstatedir ;;
1233 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1234 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1235 | --run=* | --ru=* | --r=*)
1236 runstatedir=$ac_optarg ;;
1237
1238 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)1227 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1239 ac_prev=sbindir ;;1228 ac_prev=sbindir ;;
1240 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \1229 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1372,7 +1361,7 @@ fi
1372for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \1361for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1373 datadir sysconfdir sharedstatedir localstatedir includedir \1362 datadir sysconfdir sharedstatedir localstatedir includedir \
1374 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \1363 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1375 libdir localedir mandir runstatedir1364 libdir localedir mandir
1376do1365do
1377 eval ac_val=\$$ac_var1366 eval ac_val=\$$ac_var
1378 # Remove trailing slashes.1367 # Remove trailing slashes.
@@ -1525,7 +1514,6 @@ Fine tuning of the installation directories:
1525 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]1514 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1526 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]1515 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1527 --localstatedir=DIR modifiable single-machine data [PREFIX/var]1516 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1528 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
1529 --libdir=DIR object code libraries [EPREFIX/lib]1517 --libdir=DIR object code libraries [EPREFIX/lib]
1530 --includedir=DIR C header files [PREFIX/include]1518 --includedir=DIR C header files [PREFIX/include]
1531 --oldincludedir=DIR C header files for non-gcc [/usr/include]1519 --oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -15303,6 +15291,7 @@ else
15303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext15291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15304/* end confdefs.h. */15292/* end confdefs.h. */
15305#include <ctype.h>15293#include <ctype.h>
15294#include <stdlib.h>
15306#ifndef HAVE_EBCDIC15295#ifndef HAVE_EBCDIC
15307# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')15296# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15308# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))15297# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
@@ -16271,6 +16260,10 @@ $as_echo "no" >&6; }
16271else16260else
16272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext16261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16273/* end confdefs.h. */16262/* end confdefs.h. */
16263#include <stdlib.h>
16264#ifdef HAVE_SYS_POLL_H
16265#include <sys/epoll.h>
16266#endif
16274int main(int argc, char **argv)16267int main(int argc, char **argv)
16275{16268{
16276 int epfd = epoll_create(256);16269 int epfd = epoll_create(256);
@@ -16451,7 +16444,7 @@ else
16451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext16444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16452/* end confdefs.h. */16445/* end confdefs.h. */
1645316446
16454 main() {16447 int main(void) {
16455 char buf[100];16448 char buf[100];
16456 buf[0] = 0;16449 buf[0] = 0;
16457 strerror_r( 1, buf, sizeof buf );16450 strerror_r( 1, buf, sizeof buf );
@@ -16651,7 +16644,7 @@ else
16651#include <sys/types.h>16644#include <sys/types.h>
16652#include <regex.h>16645#include <regex.h>
16653static char *pattern, *string;16646static char *pattern, *string;
16654main()16647int main(void)
16655{16648{
16656 int rc;16649 int rc;
16657 regex_t re;16650 regex_t re;
@@ -17447,9 +17440,9 @@ See \`config.log' for more details" "$LINENO" 5; }
17447fi17440fi
17448rm -f conftest.err conftest.i conftest.$ac_ext17441rm -f conftest.err conftest.i conftest.$ac_ext
1744917442
17450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_export_keying_material_early in -lssl" >&517443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_set_ciphersuites in -lssl" >&5
17451$as_echo_n "checking for SSL_export_keying_material_early in -lssl... " >&6; }17444$as_echo_n "checking for SSL_CTX_set_ciphersuites in -lssl... " >&6; }
17452if ${ac_cv_lib_ssl_SSL_export_keying_material_early+:} false; then :17445if ${ac_cv_lib_ssl_SSL_CTX_set_ciphersuites+:} false; then :
17453 $as_echo_n "(cached) " >&617446 $as_echo_n "(cached) " >&6
17454else17447else
17455 ac_check_lib_save_LIBS=$LIBS17448 ac_check_lib_save_LIBS=$LIBS
@@ -17463,27 +17456,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17463#ifdef __cplusplus17456#ifdef __cplusplus
17464extern "C"17457extern "C"
17465#endif17458#endif
17466char SSL_export_keying_material_early ();17459char SSL_CTX_set_ciphersuites ();
17467int17460int
17468main ()17461main ()
17469{17462{
17470return SSL_export_keying_material_early ();17463return SSL_CTX_set_ciphersuites ();
17471 ;17464 ;
17472 return 0;17465 return 0;
17473}17466}
17474_ACEOF17467_ACEOF
17475if ac_fn_c_try_link "$LINENO"; then :17468if ac_fn_c_try_link "$LINENO"; then :
17476 ac_cv_lib_ssl_SSL_export_keying_material_early=yes17469 ac_cv_lib_ssl_SSL_CTX_set_ciphersuites=yes
17477else17470else
17478 ac_cv_lib_ssl_SSL_export_keying_material_early=no17471 ac_cv_lib_ssl_SSL_CTX_set_ciphersuites=no
17479fi17472fi
17480rm -f core conftest.err conftest.$ac_objext \17473rm -f core conftest.err conftest.$ac_objext \
17481 conftest$ac_exeext conftest.$ac_ext17474 conftest$ac_exeext conftest.$ac_ext
17482LIBS=$ac_check_lib_save_LIBS17475LIBS=$ac_check_lib_save_LIBS
17483fi17476fi
17484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_export_keying_material_early" >&517477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_CTX_set_ciphersuites" >&5
17485$as_echo "$ac_cv_lib_ssl_SSL_export_keying_material_early" >&6; }17478$as_echo "$ac_cv_lib_ssl_SSL_CTX_set_ciphersuites" >&6; }
17486if test "x$ac_cv_lib_ssl_SSL_export_keying_material_early" = xyes; then :17479if test "x$ac_cv_lib_ssl_SSL_CTX_set_ciphersuites" = xyes; then :
17487 have_openssl=yes17480 have_openssl=yes
17488else17481else
17489 have_openssl=no17482 have_openssl=no
@@ -17865,8 +17858,12 @@ else
17865#define NULL (void*)017858#define NULL (void*)0
17866#endif17859#endif
1786717860
17861#ifdef __STDC__
17862static void *task(void *p)
17863#else
17868static void *task(p)17864static void *task(p)
17869 void *p;17865 void *p;
17866#endif
17870{17867{
17871 return (void *) (p == NULL);17868 return (void *) (p == NULL);
17872}17869}
@@ -17945,16 +17942,24 @@ else
17945#define NULL (void*)017942#define NULL (void*)0
17946#endif17943#endif
1794717944
17945#ifdef __STDC__
17946static void *task(void *p)
17947#else
17948static void *task(p)17948static void *task(p)
17949 void *p;17949 void *p;
17950#endif
17950{17951{
17951 return (void *) (p == NULL);17952 return (void *) (p == NULL);
17952}17953}
1795317954
1795417955
17956#ifdef __STDC__
17957int main(int argc, char **argv)
17958#else
17955int main(argc, argv)17959int main(argc, argv)
17956 int argc;17960 int argc;
17957 char **argv;17961 char **argv;
17962#endif
17958{17963{
1795917964
17960 /* pthread test function */17965 /* pthread test function */
@@ -18050,8 +18055,12 @@ else
18050#define NULL (void*)018055#define NULL (void*)0
18051#endif18056#endif
1805218057
18058#ifdef __STDC__
18059static void *task(void *p)
18060#else
18053static void *task(p)18061static void *task(p)
18054 void *p;18062 void *p;
18063#endif
18055{18064{
18056 return (void *) (p == NULL);18065 return (void *) (p == NULL);
18057}18066}
@@ -18130,16 +18139,24 @@ else
18130#define NULL (void*)018139#define NULL (void*)0
18131#endif18140#endif
1813218141
18142#ifdef __STDC__
18143static void *task(void *p)
18144#else
18133static void *task(p)18145static void *task(p)
18134 void *p;18146 void *p;
18147#endif
18135{18148{
18136 return (void *) (p == NULL);18149 return (void *) (p == NULL);
18137}18150}
1813818151
1813918152
18153#ifdef __STDC__
18154int main(int argc, char **argv)
18155#else
18140int main(argc, argv)18156int main(argc, argv)
18141 int argc;18157 int argc;
18142 char **argv;18158 char **argv;
18159#endif
18143{18160{
1814418161
18145 /* pthread test function */18162 /* pthread test function */
@@ -18240,8 +18257,12 @@ else
18240#define NULL (void*)018257#define NULL (void*)0
18241#endif18258#endif
1824218259
18260#ifdef __STDC__
18261static void *task(void *p)
18262#else
18243static void *task(p)18263static void *task(p)
18244 void *p;18264 void *p;
18265#endif
18245{18266{
18246 return (void *) (p == NULL);18267 return (void *) (p == NULL);
18247}18268}
@@ -18320,16 +18341,24 @@ else
18320#define NULL (void*)018341#define NULL (void*)0
18321#endif18342#endif
1832218343
18344#ifdef __STDC__
18345static void *task(void *p)
18346#else
18323static void *task(p)18347static void *task(p)
18324 void *p;18348 void *p;
18349#endif
18325{18350{
18326 return (void *) (p == NULL);18351 return (void *) (p == NULL);
18327}18352}
1832818353
1832918354
18355#ifdef __STDC__
18356int main(int argc, char **argv)
18357#else
18330int main(argc, argv)18358int main(argc, argv)
18331 int argc;18359 int argc;
18332 char **argv;18360 char **argv;
18361#endif
18333{18362{
1833418363
18335 /* pthread test function */18364 /* pthread test function */
@@ -18430,8 +18459,12 @@ else
18430#define NULL (void*)018459#define NULL (void*)0
18431#endif18460#endif
1843218461
18462#ifdef __STDC__
18463static void *task(void *p)
18464#else
18433static void *task(p)18465static void *task(p)
18434 void *p;18466 void *p;
18467#endif
18435{18468{
18436 return (void *) (p == NULL);18469 return (void *) (p == NULL);
18437}18470}
@@ -18510,16 +18543,24 @@ else
18510#define NULL (void*)018543#define NULL (void*)0
18511#endif18544#endif
1851218545
18546#ifdef __STDC__
18547static void *task(void *p)
18548#else
18513static void *task(p)18549static void *task(p)
18514 void *p;18550 void *p;
18551#endif
18515{18552{
18516 return (void *) (p == NULL);18553 return (void *) (p == NULL);
18517}18554}
1851818555
1851918556
18557#ifdef __STDC__
18558int main(int argc, char **argv)
18559#else
18520int main(argc, argv)18560int main(argc, argv)
18521 int argc;18561 int argc;
18522 char **argv;18562 char **argv;
18563#endif
18523{18564{
1852418565
18525 /* pthread test function */18566 /* pthread test function */
@@ -18620,8 +18661,12 @@ else
18620#define NULL (void*)018661#define NULL (void*)0
18621#endif18662#endif
1862218663
18664#ifdef __STDC__
18665static void *task(void *p)
18666#else
18623static void *task(p)18667static void *task(p)
18624 void *p;18668 void *p;
18669#endif
18625{18670{
18626 return (void *) (p == NULL);18671 return (void *) (p == NULL);
18627}18672}
@@ -18700,16 +18745,24 @@ else
18700#define NULL (void*)018745#define NULL (void*)0
18701#endif18746#endif
1870218747
18748#ifdef __STDC__
18749static void *task(void *p)
18750#else
18703static void *task(p)18751static void *task(p)
18704 void *p;18752 void *p;
18753#endif
18705{18754{
18706 return (void *) (p == NULL);18755 return (void *) (p == NULL);
18707}18756}
1870818757
1870918758
18759#ifdef __STDC__
18760int main(int argc, char **argv)
18761#else
18710int main(argc, argv)18762int main(argc, argv)
18711 int argc;18763 int argc;
18712 char **argv;18764 char **argv;
18765#endif
18713{18766{
1871418767
18715 /* pthread test function */18768 /* pthread test function */
@@ -18810,8 +18863,12 @@ else
18810#define NULL (void*)018863#define NULL (void*)0
18811#endif18864#endif
1881218865
18866#ifdef __STDC__
18867static void *task(void *p)
18868#else
18813static void *task(p)18869static void *task(p)
18814 void *p;18870 void *p;
18871#endif
18815{18872{
18816 return (void *) (p == NULL);18873 return (void *) (p == NULL);
18817}18874}
@@ -18890,16 +18947,24 @@ else
18890#define NULL (void*)018947#define NULL (void*)0
18891#endif18948#endif
1889218949
18950#ifdef __STDC__
18951static void *task(void *p)
18952#else
18893static void *task(p)18953static void *task(p)
18894 void *p;18954 void *p;
18955#endif
18895{18956{
18896 return (void *) (p == NULL);18957 return (void *) (p == NULL);
18897}18958}
1889818959
1889918960
18961#ifdef __STDC__
18962int main(int argc, char **argv)
18963#else
18900int main(argc, argv)18964int main(argc, argv)
18901 int argc;18965 int argc;
18902 char **argv;18966 char **argv;
18967#endif
18903{18968{
1890418969
18905 /* pthread test function */18970 /* pthread test function */
@@ -19001,8 +19066,12 @@ else
19001#define NULL (void*)019066#define NULL (void*)0
19002#endif19067#endif
1900319068
19069#ifdef __STDC__
19070static void *task(void *p)
19071#else
19004static void *task(p)19072static void *task(p)
19005 void *p;19073 void *p;
19074#endif
19006{19075{
19007 return (void *) (p == NULL);19076 return (void *) (p == NULL);
19008}19077}
@@ -19081,16 +19150,24 @@ else
19081#define NULL (void*)019150#define NULL (void*)0
19082#endif19151#endif
1908319152
19153#ifdef __STDC__
19154static void *task(void *p)
19155#else
19084static void *task(p)19156static void *task(p)
19085 void *p;19157 void *p;
19158#endif
19086{19159{
19087 return (void *) (p == NULL);19160 return (void *) (p == NULL);
19088}19161}
1908919162
1909019163
19164#ifdef __STDC__
19165int main(int argc, char **argv)
19166#else
19091int main(argc, argv)19167int main(argc, argv)
19092 int argc;19168 int argc;
19093 char **argv;19169 char **argv;
19170#endif
19094{19171{
1909519172
19096 /* pthread test function */19173 /* pthread test function */
@@ -19191,8 +19268,12 @@ else
19191#define NULL (void*)019268#define NULL (void*)0
19192#endif19269#endif
1919319270
19271#ifdef __STDC__
19272static void *task(void *p)
19273#else
19194static void *task(p)19274static void *task(p)
19195 void *p;19275 void *p;
19276#endif
19196{19277{
19197 return (void *) (p == NULL);19278 return (void *) (p == NULL);
19198}19279}
@@ -19271,16 +19352,24 @@ else
19271#define NULL (void*)019352#define NULL (void*)0
19272#endif19353#endif
1927319354
19355#ifdef __STDC__
19356static void *task(void *p)
19357#else
19274static void *task(p)19358static void *task(p)
19275 void *p;19359 void *p;
19360#endif
19276{19361{
19277 return (void *) (p == NULL);19362 return (void *) (p == NULL);
19278}19363}
1927919364
1928019365
19366#ifdef __STDC__
19367int main(int argc, char **argv)
19368#else
19281int main(argc, argv)19369int main(argc, argv)
19282 int argc;19370 int argc;
19283 char **argv;19371 char **argv;
19372#endif
19284{19373{
1928519374
19286 /* pthread test function */19375 /* pthread test function */
@@ -19382,8 +19471,12 @@ else
19382#define NULL (void*)019471#define NULL (void*)0
19383#endif19472#endif
1938419473
19474#ifdef __STDC__
19475static void *task(void *p)
19476#else
19385static void *task(p)19477static void *task(p)
19386 void *p;19478 void *p;
19479#endif
19387{19480{
19388 return (void *) (p == NULL);19481 return (void *) (p == NULL);
19389}19482}
@@ -19462,16 +19555,24 @@ else
19462#define NULL (void*)019555#define NULL (void*)0
19463#endif19556#endif
1946419557
19558#ifdef __STDC__
19559static void *task(void *p)
19560#else
19465static void *task(p)19561static void *task(p)
19466 void *p;19562 void *p;
19563#endif
19467{19564{
19468 return (void *) (p == NULL);19565 return (void *) (p == NULL);
19469}19566}
1947019567
1947119568
19569#ifdef __STDC__
19570int main(int argc, char **argv)
19571#else
19472int main(argc, argv)19572int main(argc, argv)
19473 int argc;19573 int argc;
19474 char **argv;19574 char **argv;
19575#endif
19475{19576{
1947619577
19477 /* pthread test function */19578 /* pthread test function */
@@ -19573,8 +19674,12 @@ else
19573#define NULL (void*)019674#define NULL (void*)0
19574#endif19675#endif
1957519676
19677#ifdef __STDC__
19678static void *task(void *p)
19679#else
19576static void *task(p)19680static void *task(p)
19577 void *p;19681 void *p;
19682#endif
19578{19683{
19579 return (void *) (p == NULL);19684 return (void *) (p == NULL);
19580}19685}
@@ -19653,16 +19758,24 @@ else
19653#define NULL (void*)019758#define NULL (void*)0
19654#endif19759#endif
1965519760
19761#ifdef __STDC__
19762static void *task(void *p)
19763#else
19656static void *task(p)19764static void *task(p)
19657 void *p;19765 void *p;
19766#endif
19658{19767{
19659 return (void *) (p == NULL);19768 return (void *) (p == NULL);
19660}19769}
1966119770
1966219771
19772#ifdef __STDC__
19773int main(int argc, char **argv)
19774#else
19663int main(argc, argv)19775int main(argc, argv)
19664 int argc;19776 int argc;
19665 char **argv;19777 char **argv;
19778#endif
19666{19779{
1966719780
19668 /* pthread test function */19781 /* pthread test function */
@@ -19763,8 +19876,12 @@ else
19763#define NULL (void*)019876#define NULL (void*)0
19764#endif19877#endif
1976519878
19879#ifdef __STDC__
19880static void *task(void *p)
19881#else
19766static void *task(p)19882static void *task(p)
19767 void *p;19883 void *p;
19884#endif
19768{19885{
19769 return (void *) (p == NULL);19886 return (void *) (p == NULL);
19770}19887}
@@ -19843,16 +19960,24 @@ else
19843#define NULL (void*)019960#define NULL (void*)0
19844#endif19961#endif
1984519962
19963#ifdef __STDC__
19964static void *task(void *p)
19965#else
19846static void *task(p)19966static void *task(p)
19847 void *p;19967 void *p;
19968#endif
19848{19969{
19849 return (void *) (p == NULL);19970 return (void *) (p == NULL);
19850}19971}
1985119972
1985219973
19974#ifdef __STDC__
19975int main(int argc, char **argv)
19976#else
19853int main(argc, argv)19977int main(argc, argv)
19854 int argc;19978 int argc;
19855 char **argv;19979 char **argv;
19980#endif
19856{19981{
1985719982
19858 /* pthread test function */19983 /* pthread test function */
@@ -19954,8 +20079,12 @@ else
19954#define NULL (void*)020079#define NULL (void*)0
19955#endif20080#endif
1995620081
20082#ifdef __STDC__
20083static void *task(void *p)
20084#else
19957static void *task(p)20085static void *task(p)
19958 void *p;20086 void *p;
20087#endif
19959{20088{
19960 return (void *) (p == NULL);20089 return (void *) (p == NULL);
19961}20090}
@@ -20034,16 +20163,24 @@ else
20034#define NULL (void*)020163#define NULL (void*)0
20035#endif20164#endif
2003620165
20166#ifdef __STDC__
20167static void *task(void *p)
20168#else
20037static void *task(p)20169static void *task(p)
20038 void *p;20170 void *p;
20171#endif
20039{20172{
20040 return (void *) (p == NULL);20173 return (void *) (p == NULL);
20041}20174}
2004220175
2004320176
20177#ifdef __STDC__
20178int main(int argc, char **argv)
20179#else
20044int main(argc, argv)20180int main(argc, argv)
20045 int argc;20181 int argc;
20046 char **argv;20182 char **argv;
20183#endif
20047{20184{
2004820185
20049 /* pthread test function */20186 /* pthread test function */
@@ -20145,8 +20282,12 @@ else
20145#define NULL (void*)020282#define NULL (void*)0
20146#endif20283#endif
2014720284
20285#ifdef __STDC__
20286static void *task(void *p)
20287#else
20148static void *task(p)20288static void *task(p)
20149 void *p;20289 void *p;
20290#endif
20150{20291{
20151 return (void *) (p == NULL);20292 return (void *) (p == NULL);
20152}20293}
@@ -20225,16 +20366,24 @@ else
20225#define NULL (void*)020366#define NULL (void*)0
20226#endif20367#endif
2022720368
20369#ifdef __STDC__
20370static void *task(void *p)
20371#else
20228static void *task(p)20372static void *task(p)
20229 void *p;20373 void *p;
20374#endif
20230{20375{
20231 return (void *) (p == NULL);20376 return (void *) (p == NULL);
20232}20377}
2023320378
2023420379
20380#ifdef __STDC__
20381int main(int argc, char **argv)
20382#else
20235int main(argc, argv)20383int main(argc, argv)
20236 int argc;20384 int argc;
20237 char **argv;20385 char **argv;
20386#endif
20238{20387{
2023920388
20240 /* pthread test function */20389 /* pthread test function */
@@ -20335,8 +20484,12 @@ else
20335#define NULL (void*)020484#define NULL (void*)0
20336#endif20485#endif
2033720486
20487#ifdef __STDC__
20488static void *task(void *p)
20489#else
20338static void *task(p)20490static void *task(p)
20339 void *p;20491 void *p;
20492#endif
20340{20493{
20341 return (void *) (p == NULL);20494 return (void *) (p == NULL);
20342}20495}
@@ -20415,16 +20568,24 @@ else
20415#define NULL (void*)020568#define NULL (void*)0
20416#endif20569#endif
2041720570
20571#ifdef __STDC__
20572static void *task(void *p)
20573#else
20418static void *task(p)20574static void *task(p)
20419 void *p;20575 void *p;
20576#endif
20420{20577{
20421 return (void *) (p == NULL);20578 return (void *) (p == NULL);
20422}20579}
2042320580
2042420581
20582#ifdef __STDC__
20583int main(int argc, char **argv)
20584#else
20425int main(argc, argv)20585int main(argc, argv)
20426 int argc;20586 int argc;
20427 char **argv;20587 char **argv;
20588#endif
20428{20589{
2042920590
20430 /* pthread test function */20591 /* pthread test function */
@@ -20525,8 +20686,12 @@ else
20525#define NULL (void*)020686#define NULL (void*)0
20526#endif20687#endif
2052720688
20689#ifdef __STDC__
20690static void *task(void *p)
20691#else
20528static void *task(p)20692static void *task(p)
20529 void *p;20693 void *p;
20694#endif
20530{20695{
20531 return (void *) (p == NULL);20696 return (void *) (p == NULL);
20532}20697}
@@ -20605,16 +20770,24 @@ else
20605#define NULL (void*)020770#define NULL (void*)0
20606#endif20771#endif
2060720772
20773#ifdef __STDC__
20774static void *task(void *p)
20775#else
20608static void *task(p)20776static void *task(p)
20609 void *p;20777 void *p;
20778#endif
20610{20779{
20611 return (void *) (p == NULL);20780 return (void *) (p == NULL);
20612}20781}
2061320782
2061420783
20784#ifdef __STDC__
20785int main(int argc, char **argv)
20786#else
20615int main(argc, argv)20787int main(argc, argv)
20616 int argc;20788 int argc;
20617 char **argv;20789 char **argv;
20790#endif
20618{20791{
2061920792
20620 /* pthread test function */20793 /* pthread test function */
@@ -20716,8 +20889,12 @@ else
20716#define NULL (void*)020889#define NULL (void*)0
20717#endif20890#endif
2071820891
20892#ifdef __STDC__
20893static void *task(void *p)
20894#else
20719static void *task(p)20895static void *task(p)
20720 void *p;20896 void *p;
20897#endif
20721{20898{
20722 return (void *) (p == NULL);20899 return (void *) (p == NULL);
20723}20900}
@@ -20796,16 +20973,24 @@ else
20796#define NULL (void*)020973#define NULL (void*)0
20797#endif20974#endif
2079820975
20976#ifdef __STDC__
20977static void *task(void *p)
20978#else
20799static void *task(p)20979static void *task(p)
20800 void *p;20980 void *p;
20981#endif
20801{20982{
20802 return (void *) (p == NULL);20983 return (void *) (p == NULL);
20803}20984}
2080420985
2080520986
20987#ifdef __STDC__
20988int main(int argc, char **argv)
20989#else
20806int main(argc, argv)20990int main(argc, argv)
20807 int argc;20991 int argc;
20808 char **argv;20992 char **argv;
20993#endif
20809{20994{
2081020995
20811 /* pthread test function */20996 /* pthread test function */
@@ -21017,14 +21202,12 @@ else
21017/* end confdefs.h. */21202/* end confdefs.h. */
2101821203
21019#include <pthread.h>21204#include <pthread.h>
21020#ifndef NULL21205pthread_t thread;
21021#define NULL (void*)0
21022#endif
2102321206
21024int21207int
21025main ()21208main ()
21026{21209{
21027pthread_detach(NULL);21210pthread_detach(thread);
21028 ;21211 ;
21029 return 0;21212 return 0;
21030}21213}
@@ -21138,16 +21321,24 @@ else
21138#define NULL (void*)021321#define NULL (void*)0
21139#endif21322#endif
2114021323
21324#ifdef __STDC__
21325static void *task(void *p)
21326#else
21141static void *task(p)21327static void *task(p)
21142 void *p;21328 void *p;
21329#endif
21143{21330{
21144 return (void *) (p == NULL);21331 return (void *) (p == NULL);
21145}21332}
2114621333
2114721334
21335#ifdef __STDC__
21336int main(int argc, char **argv)
21337#else
21148int main(argc, argv)21338int main(argc, argv)
21149 int argc;21339 int argc;
21150 char **argv;21340 char **argv;
21341#endif
21151{21342{
2115221343
21153 /* pthread test function */21344 /* pthread test function */
@@ -21237,6 +21428,9 @@ else
21237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext21428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21238/* end confdefs.h. */21429/* end confdefs.h. */
2123921430
21431#define _XOPEN_SOURCE 500 /* For pthread_setconcurrency() on glibc */
21432#include <stdlib.h>
21433#include <stdio.h>
21240#include <sys/types.h>21434#include <sys/types.h>
21241#include <sys/time.h>21435#include <sys/time.h>
21242#include <unistd.h>21436#include <unistd.h>
@@ -21247,8 +21441,12 @@ else
2124721441
21248static int fildes[2];21442static int fildes[2];
2124921443
21444#ifdef __STDC__
21445static void *task(void *p)
21446#else
21250static void *task(p)21447static void *task(p)
21251 void *p;21448 void *p;
21449#endif
21252{21450{
21253 int i;21451 int i;
21254 struct timeval tv;21452 struct timeval tv;
@@ -21272,9 +21470,13 @@ static void *task(p)
21272 exit(0); /* if we exit here, the select blocked the whole process */21470 exit(0); /* if we exit here, the select blocked the whole process */
21273}21471}
2127421472
21473#ifdef __STDC__
21474int main(int argc, char **argv)
21475#else
21275int main(argc, argv)21476int main(argc, argv)
21276 int argc;21477 int argc;
21277 char **argv;21478 char **argv;
21479#endif
21278{21480{
21279 pthread_t t;21481 pthread_t t;
2128021482
@@ -22566,8 +22768,8 @@ $as_echo "no" >&6; }
22566fi22768fi
2256722769
22568pkg_failed=no22770pkg_failed=no
22569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WT" >&522771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wiredtiger" >&5
22570$as_echo_n "checking for WT... " >&6; }22772$as_echo_n "checking for wiredtiger... " >&6; }
2257122773
22572if test -n "$WT_CFLAGS"; then22774if test -n "$WT_CFLAGS"; then
22573 pkg_cv_WT_CFLAGS="$WT_CFLAGS"22775 pkg_cv_WT_CFLAGS="$WT_CFLAGS"
@@ -22607,7 +22809,7 @@ fi
2260722809
2260822810
22609if test $pkg_failed = yes; then22811if test $pkg_failed = yes; then
22610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&522812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22611$as_echo "no" >&6; }22813$as_echo "no" >&6; }
2261222814
22613if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then22815if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -22634,7 +22836,7 @@ Alternatively, you may set the environment variables WT_CFLAGS
22634and WT_LIBS to avoid the need to call pkg-config.22836and WT_LIBS to avoid the need to call pkg-config.
22635See the pkg-config man page for more details." "$LINENO" 522837See the pkg-config man page for more details." "$LINENO" 5
22636elif test $pkg_failed = untried; then22838elif test $pkg_failed = untried; then
22637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&522839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22638$as_echo "no" >&6; }22840$as_echo "no" >&6; }
22639 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&522841 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
22640$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}22842$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -23734,7 +23936,8 @@ else
23734/* end confdefs.h. */23936/* end confdefs.h. */
2373523937
23736#include <ctype.h>23938#include <ctype.h>
23737main()23939#include <stdlib.h>
23940int main(void)
23738{23941{
23739 if ('C' == toupper('C'))23942 if ('C' == toupper('C'))
23740 exit(0);23943 exit(0);
@@ -25785,7 +25988,7 @@ $as_echo "#define HAVE_LIBSODIUM 1" >>confdefs.h
2578525988
25786 BUILD_PW_ARGON2=$ol_enable_argon225989 BUILD_PW_ARGON2=$ol_enable_argon2
25787 if test "$ol_enable_argon2" = "yes" ; then25990 if test "$ol_enable_argon2" = "yes" ; then
25788 SLAPD_DYNAMIC_PWMODS="$SLAPD_DYNAMIC_PWDMODS argon2.la"25991 SLAPD_DYNAMIC_PWMODS="$SLAPD_DYNAMIC_PWMODS argon2.la"
25789 fi25992 fi
2579025993
25791cat >>confdefs.h <<_ACEOF25994cat >>confdefs.h <<_ACEOF
diff --git a/configure.ac b/configure.ac
index c8dfa2a..6ddfee5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,7 +25,7 @@ dnl ================================================================
25dnl Configure.in for OpenLDAP25dnl Configure.in for OpenLDAP
26AC_COPYRIGHT([[Copyright 1998-2022 The OpenLDAP Foundation. All rights reserved.26AC_COPYRIGHT([[Copyright 1998-2022 The OpenLDAP Foundation. All rights reserved.
27Restrictions apply, see COPYRIGHT and LICENSE files.]])27Restrictions apply, see COPYRIGHT and LICENSE files.]])
28AC_REVISION([$Id: 3943f6265060065483db582e5c7bef14fe934d80 $])28AC_REVISION([$Id: a4836a8a0218326643db20d8131fc717d1fc3edf $])
29AC_INIT([OpenLDAP],,[https://bugs.openldap.org],,[https://www.openldap.org])29AC_INIT([OpenLDAP],,[https://bugs.openldap.org],,[https://www.openldap.org])
30AC_CONFIG_SRCDIR(build/version.sh)dnl30AC_CONFIG_SRCDIR(build/version.sh)dnl
31dnl ----------------------------------------------------------------31dnl ----------------------------------------------------------------
@@ -1009,7 +1009,11 @@ dnl ----------------------------------------------------------------
1009AC_CHECK_HEADERS( sys/epoll.h )1009AC_CHECK_HEADERS( sys/epoll.h )
1010if test "${ac_cv_header_sys_epoll_h}" = yes; then1010if test "${ac_cv_header_sys_epoll_h}" = yes; then
1011 AC_MSG_CHECKING(for epoll system call)1011 AC_MSG_CHECKING(for epoll system call)
1012 AC_RUN_IFELSE([AC_LANG_SOURCE([[int main(int argc, char **argv)1012 AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>
1013#ifdef HAVE_SYS_POLL_H
1014#include <sys/epoll.h>
1015#endif
1016int main(int argc, char **argv)
1013{1017{
1014 int epfd = epoll_create(256);1018 int epfd = epoll_create(256);
1015 exit (epfd == -1 ? 1 : 0);1019 exit (epfd == -1 ? 1 : 0);
@@ -1232,7 +1236,7 @@ if test $ol_with_tls = openssl || test $ol_with_tls = auto ; then
1232[#endif]])],1236[#endif]])],
1233 , [AC_MSG_FAILURE([OpenSSL 1.1.1 or newer required])])1237 , [AC_MSG_FAILURE([OpenSSL 1.1.1 or newer required])])
12341238
1235 AC_CHECK_LIB(ssl, SSL_export_keying_material_early,1239 AC_CHECK_LIB(ssl, SSL_CTX_set_ciphersuites,
1236 [have_openssl=yes], [have_openssl=no],1240 [have_openssl=yes], [have_openssl=no],
1237 [-lcrypto])1241 [-lcrypto])
12381242
@@ -1362,10 +1366,10 @@ case $ol_with_threads in auto | yes | posix)
1362 dnl pthread_create() in -lpthread (many)1366 dnl pthread_create() in -lpthread (many)
1363 dnl pthread_create() in -lc_r (FreeBSD)1367 dnl pthread_create() in -lc_r (FreeBSD)
1364 dnl1368 dnl
1365 dnl Check pthread (draft4) flags (depreciated)1369 dnl Check pthread (draft4) flags (deprecated)
1366 dnl pthread_create() with -threads (OSF/1)1370 dnl pthread_create() with -threads (OSF/1)
1367 dnl1371 dnl
1368 dnl Check pthread (draft4) libraries (depreciated)1372 dnl Check pthread (draft4) libraries (deprecated)
1369 dnl pthread_mutex_unlock() in -lpthreads -lmach -lexc -lc_r (OSF/1)1373 dnl pthread_mutex_unlock() in -lpthreads -lmach -lexc -lc_r (OSF/1)
1370 dnl pthread_mutex_lock() in -lpthreads -lmach -lexc (OSF/1)1374 dnl pthread_mutex_lock() in -lpthreads -lmach -lexc (OSF/1)
1371 dnl pthread_mutex_trylock() in -lpthreads -lexc (OSF/1)1375 dnl pthread_mutex_trylock() in -lpthreads -lexc (OSF/1)
@@ -1386,7 +1390,7 @@ case $ol_with_threads in auto | yes | posix)
1386 ol_link_threads=posix1390 ol_link_threads=posix
1387 ol_link_pthreads=""1391 ol_link_pthreads=""
1388 fi1392 fi
1389 1393
1390dnl OL_PTHREAD_TRY([-mt], [ol_cv_pthread_mt])1394dnl OL_PTHREAD_TRY([-mt], [ol_cv_pthread_mt])
1391 OL_PTHREAD_TRY([-kthread], [ol_cv_pthread_kthread])1395 OL_PTHREAD_TRY([-kthread], [ol_cv_pthread_kthread])
1392 OL_PTHREAD_TRY([-pthread], [ol_cv_pthread_pthread])1396 OL_PTHREAD_TRY([-pthread], [ol_cv_pthread_pthread])
@@ -1473,10 +1477,8 @@ pthread_rwlock_t rwlock;
1473 dnl save the flags1477 dnl save the flags
1474 AC_LINK_IFELSE([AC_LANG_PROGRAM([[1478 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
1475#include <pthread.h>1479#include <pthread.h>
1476#ifndef NULL1480pthread_t thread;
1477#define NULL (void*)01481]], [[pthread_detach(thread);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no])
1478#endif
1479]], [[pthread_detach(NULL);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no])
1480 ])1482 ])
14811483
1482 if test $ol_cv_func_pthread_detach = no ; then1484 if test $ol_cv_func_pthread_detach = no ; then
@@ -1531,6 +1533,9 @@ dnl esac
1531 AC_CACHE_CHECK([if select yields when using pthreads],1533 AC_CACHE_CHECK([if select yields when using pthreads],
1532 ol_cv_pthread_select_yields,[1534 ol_cv_pthread_select_yields,[
1533 AC_RUN_IFELSE([AC_LANG_SOURCE([[1535 AC_RUN_IFELSE([AC_LANG_SOURCE([[
1536#define _XOPEN_SOURCE 500 /* For pthread_setconcurrency() on glibc */
1537#include <stdlib.h>
1538#include <stdio.h>
1534#include <sys/types.h>1539#include <sys/types.h>
1535#include <sys/time.h>1540#include <sys/time.h>
1536#include <unistd.h>1541#include <unistd.h>
@@ -1541,8 +1546,12 @@ dnl esac
15411546
1542static int fildes[2];1547static int fildes[2];
15431548
1549#ifdef __STDC__
1550static void *task(void *p)
1551#else
1544static void *task(p)1552static void *task(p)
1545 void *p;1553 void *p;
1554#endif
1546{1555{
1547 int i;1556 int i;
1548 struct timeval tv;1557 struct timeval tv;
@@ -1566,9 +1575,13 @@ static void *task(p)
1566 exit(0); /* if we exit here, the select blocked the whole process */1575 exit(0); /* if we exit here, the select blocked the whole process */
1567}1576}
15681577
1578#ifdef __STDC__
1579int main(int argc, char **argv)
1580#else
1569int main(argc, argv)1581int main(argc, argv)
1570 int argc;1582 int argc;
1571 char **argv;1583 char **argv;
1584#endif
1572{1585{
1573 pthread_t t;1586 pthread_t t;
15741587
@@ -3093,7 +3106,7 @@ if test "$ol_enable_argon2" = "yes" ; then
30933106
3094 BUILD_PW_ARGON2=$ol_enable_argon23107 BUILD_PW_ARGON2=$ol_enable_argon2
3095 if test "$ol_enable_argon2" = "yes" ; then3108 if test "$ol_enable_argon2" = "yes" ; then
3096 SLAPD_DYNAMIC_PWMODS="$SLAPD_DYNAMIC_PWDMODS argon2.la"3109 SLAPD_DYNAMIC_PWMODS="$SLAPD_DYNAMIC_PWMODS argon2.la"
3097 fi3110 fi
3098 AC_DEFINE_UNQUOTED(SLAPD_PWMOD_PW_ARGON2,$SLAPD_MOD_DYNAMIC,[define for Argon2 Password hashing module])3111 AC_DEFINE_UNQUOTED(SLAPD_PWMOD_PW_ARGON2,$SLAPD_MOD_DYNAMIC,[define for Argon2 Password hashing module])
3099fi3112fi
diff --git a/contrib/ldaptcl/tclAppInit.c b/contrib/ldaptcl/tclAppInit.c
index f84e182..d50a724 100644
--- a/contrib/ldaptcl/tclAppInit.c
+++ b/contrib/ldaptcl/tclAppInit.c
@@ -45,9 +45,7 @@ EXTERN int Tcltest_Init _ANSI_ARGS_((Tcl_Interp *interp));
45 */45 */
4646
47int47int
48main(argc, argv)48main(int argc, char **argv)
49 int argc; /* Number of command-line arguments. */
50 char **argv; /* Values of command-line arguments. */
51{49{
52#ifdef USE_TCLX50#ifdef USE_TCLX
53 TclX_Main(argc, argv, Tcl_AppInit);51 TclX_Main(argc, argv, Tcl_AppInit);
diff --git a/contrib/ldaptcl/tkAppInit.c b/contrib/ldaptcl/tkAppInit.c
index 68fd956..6934523 100644
--- a/contrib/ldaptcl/tkAppInit.c
+++ b/contrib/ldaptcl/tkAppInit.c
@@ -37,16 +37,9 @@ int (*tclDummyMathPtr)() = matherr;
37 * This is the main program for the application.37 * This is the main program for the application.
38 *-----------------------------------------------------------------------------38 *-----------------------------------------------------------------------------
39 */39 */
40#ifdef __cplusplus
41int40int
42main (int argc,41main (int argc,
43 char **argv)42 char **argv)
44#else
45int
46main (argc, argv)
47 int argc;
48 char **argv;
49#endif
50{43{
51#ifdef USE_TCLX44#ifdef USE_TCLX
52 TkX_Main(argc, argv, Tcl_AppInit);45 TkX_Main(argc, argv, Tcl_AppInit);
@@ -68,14 +61,8 @@ main (argc, argv)
68 * interp->result if an error occurs.61 * interp->result if an error occurs.
69 *-----------------------------------------------------------------------------62 *-----------------------------------------------------------------------------
70 */63 */
71#ifdef __cplusplus
72int64int
73Tcl_AppInit (Tcl_Interp *interp)65Tcl_AppInit (Tcl_Interp *interp)
74#else
75int
76Tcl_AppInit (interp)
77 Tcl_Interp *interp;
78#endif
79{66{
80 if (Tcl_Init (interp) == TCL_ERROR) {67 if (Tcl_Init (interp) == TCL_ERROR) {
81 return TCL_ERROR;68 return TCL_ERROR;
diff --git a/contrib/slapd-modules/datamorph/tests/run b/contrib/slapd-modules/datamorph/tests/run
index 6a38431..239bff7 100755
--- a/contrib/slapd-modules/datamorph/tests/run
+++ b/contrib/slapd-modules/datamorph/tests/run
@@ -12,218 +12,6 @@
12## A copy of this license is available in the file LICENSE in the12## A copy of this license is available in the file LICENSE in the
13## top-level directory of the distribution or, alternatively, at13## top-level directory of the distribution or, alternatively, at
14## <http://www.OpenLDAP.org/license.html>.14## <http://www.OpenLDAP.org/license.html>.
15##
16## ACKNOWLEDGEMENTS:
17## This module was written in 2016 by Ondřej Kuzník for Symas Corp.
18
19USAGE="$0 [-b <backend>] [-c] [-k] [-l #] [-p] [-s {ro|rp}] [-u] [-w] <script>"
20
21TOPSRCDIR="${SRCDIR-$LDAP_SRC}"
22SRCDIR="${TOPSRCDIR}/tests"
23eval `grep EGREP_CMD= ${LDAP_BUILD}/tests/run`
24eval `$EGREP_CMD -e '^LN_S=' ${LDAP_BUILD}/tests/run`
25
26export SRCDIR TOPSRCDIR LN_S EGREP_CMD
27
28. "${SRCDIR}/scripts/defines.sh"
29
30BACKEND=
31CLEAN=no
32WAIT=0
33KILLSERVERS=yes
34PRESERVE=${PRESERVE-no}
35SYNCMODE=${SYNCMODE-rp}
36USERDATA=no
37LOOP=1
38COUNTER=1
39
40while test $# -gt 0 ; do
41 case "$1" in
42 -b | -backend)
43 BACKEND="$2"
44 shift; shift ;;
45
46 -c | -clean)
47 CLEAN=yes
48 shift ;;
49
50 -k | -kill)
51 KILLSERVERS=no
52 shift ;;
53 -l | -loop)
54 NUM="`echo $2 | sed 's/[0-9]//g'`"
55 if [ -z "$NUM" ]; then
56 LOOP=$2
57 else
58 echo "Loop variable not an int: $2"
59 echo "$USAGE"; exit 1
60 fi
61 shift ;
62 shift ;;
63
64 -p | -preserve)
65 PRESERVE=yes
66 shift ;;
67
68 -s | -syncmode)
69 case "$2" in
70 ro | rp)
71 SYNCMODE="$2"
72 ;;
73 *)
74 echo "unknown sync mode $2"
75 echo "$USAGE"; exit 1
76 ;;
77 esac
78 shift; shift ;;
79
80 -u | -userdata)
81 USERDATA=yes
82 shift ;;
83
84 -w | -wait)
85 WAIT=1
86 shift ;;
87
88 -)
89 shift
90 break ;;
91
92 -*)
93 echo "$USAGE"; exit 1
94 ;;
95
96 *)
97 break ;;
98 esac
99done
100
101eval `$EGREP_CMD -e '^AC' ${LDAP_BUILD}/tests/run`
102export `$EGREP_CMD -e '^AC' ${LDAP_BUILD}/tests/run | sed 's/=.*//'`
103
104if test -z "$BACKEND" ; then
105 for b in mdb ; do
106 if eval "test \"\$AC_$b\" != no" ; then
107 BACKEND=$b
108 break
109 fi
110 done
111 if test -z "$BACKEND" ; then
112 echo "No suitable default database backend configured" >&2
113 exit 1
114 fi
115fi
116
117BACKENDTYPE=`eval 'echo $AC_'$BACKEND`
118if test "x$BACKENDTYPE" = "x" ; then
119 BACKENDTYPE="unknown"
120fi
121
122# Backend features. indexdb: indexing and unchecked limit.
123# maindb: main storage backend. Currently index,limits,mode,paged results.
124INDEXDB=noindexdb MAINDB=nomaindb
125case $BACKEND in
126 mdb) INDEXDB=indexdb MAINDB=maindb ;;
127 ndb) INDEXDB=indexdb ;;
128esac
129
130export BACKEND BACKENDTYPE INDEXDB MAINDB \
131 WAIT KILLSERVERS PRESERVE SYNCMODE USERDATA \
132 SRCDIR
133
134if test $# = 0 ; then
135 echo "$USAGE"; exit 1
136fi
137
138# need defines.sh for the definitions of the directories
139. $SRCDIR/scripts/defines.sh
140
141SCRIPTDIR="${TOPDIR}/tests/scripts"
142
143export SCRIPTDIR
144
145SCRIPTNAME="$1"
146shift
147
148if test -x "${SCRIPTDIR}/${SCRIPTNAME}" ; then
149 SCRIPT="${SCRIPTDIR}/${SCRIPTNAME}"
150elif test -x "`echo ${SCRIPTDIR}/test*-${SCRIPTNAME}`"; then
151 SCRIPT="`echo ${SCRIPTDIR}/test*-${SCRIPTNAME}`"
152elif test -x "`echo ${SCRIPTDIR}/${SCRIPTNAME}-*`"; then
153 SCRIPT="`echo ${SCRIPTDIR}/${SCRIPTNAME}-*`"
154else
155 echo "run: ${SCRIPTNAME} not found (or not executable)"
156 exit 1;
157fi
158
159if test ! -r ${DATADIR}/test.ldif ; then
160 ${LN_S} ${SRCDIR}/data ${DATADIR}
161fi
162if test ! -r ${SCHEMADIR}/core.schema ; then
163 ${LN_S} ${TOPSRCDIR}/servers/slapd/schema ${SCHEMADIR}
164fi
165if test ! -r ./data; then
166 ${LN_S} ${TOPDIR}/tests/data ./
167fi
168
169if test -d ${TESTDIR} ; then
170 if test $PRESERVE = no ; then
171 echo "Cleaning up test run directory leftover from previous run."
172 /bin/rm -rf ${TESTDIR}
173 elif test $PRESERVE = yes ; then
174 echo "Cleaning up only database directories leftover from previous run."
175 /bin/rm -rf ${TESTDIR}/db.*
176 fi
177fi
178if test $BACKEND = ndb ; then
179 mysql --user root <<EOF
180 drop database if exists db_1;
181 drop database if exists db_2;
182 drop database if exists db_3;
183 drop database if exists db_4;
184 drop database if exists db_5;
185 drop database if exists db_6;
186EOF
187fi
188mkdir -p ${TESTDIR}
189
190if test $USERDATA = yes ; then
191 if test ! -d userdata ; then
192 echo "User data directory (userdata) does not exist."
193 exit 1
194 fi
195 cp -R userdata/* ${TESTDIR}
196fi
197
198# disable LDAP initialization
199LDAPNOINIT=true; export LDAPNOINIT
200
201echo "Running ${SCRIPT} for ${BACKEND}..."
202while [ $COUNTER -le $LOOP ]; do
203 if [ $LOOP -gt 1 ]; then
204 echo "Running $COUNTER of $LOOP iterations"
205 fi
206 $SCRIPT $*
207 RC=$?
20815
209 if test $CLEAN = yes ; then16TOPSRCDIR="$SRCDIR" OBJDIR="${LDAP_BUILD}" SRCDIR="${SRCDIR}/tests" DEFSDIR="${SRCDIR}/scripts" SCRIPTDIR="${TOPDIR}/tests/scripts" "${LDAP_BUILD}/tests/run" $*
210 echo "Cleaning up test run directory from this run."
211 /bin/rm -rf ${TESTDIR}
212 echo "Cleaning up symlinks."
213 /bin/rm -f ${DATADIR} ${SCHEMADIR}
214 fi
21517
216 if [ $RC -ne 0 ]; then
217 if [ $LOOP -gt 1 ]; then
218 echo "Failed after $COUNTER of $LOOP iterations"
219 fi
220 exit $RC
221 else
222 COUNTER=`expr $COUNTER + 1`
223 if [ $COUNTER -le $LOOP ]; then
224 echo "Cleaning up test run directory from this run."
225 /bin/rm -rf ${TESTDIR}
226 fi
227 fi
228done
229exit $RC
diff --git a/contrib/slapd-modules/emptyds/tests/run b/contrib/slapd-modules/emptyds/tests/run
index e28820c..239bff7 100755
--- a/contrib/slapd-modules/emptyds/tests/run
+++ b/contrib/slapd-modules/emptyds/tests/run
@@ -12,207 +12,6 @@
12## A copy of this license is available in the file LICENSE in the12## A copy of this license is available in the file LICENSE in the
13## top-level directory of the distribution or, alternatively, at13## top-level directory of the distribution or, alternatively, at
14## <http://www.OpenLDAP.org/license.html>.14## <http://www.OpenLDAP.org/license.html>.
15##
16## ACKNOWLEDGEMENTS:
17## This module was written in 2016 by Ondřej Kuzník for Symas Corp.
18
19USAGE="$0 [-b <backend>] [-c] [-k] [-l #] [-p] [-s {ro|rp}] [-u] [-w] <script>"
20
21TOPSRCDIR="${SRCDIR-$LDAP_SRC}"
22SRCDIR="${TOPSRCDIR}/tests"
23eval `grep EGREP_CMD= ${LDAP_BUILD}/tests/run`
24eval `$EGREP_CMD -e '^LN_S=' ${LDAP_BUILD}/tests/run`
25
26export SRCDIR TOPSRCDIR LN_S EGREP_CMD
27
28. "${SRCDIR}/scripts/defines.sh"
29
30BACKEND=
31CLEAN=no
32WAIT=0
33KILLSERVERS=yes
34PRESERVE=${PRESERVE-no}
35SYNCMODE=${SYNCMODE-rp}
36USERDATA=no
37LOOP=1
38COUNTER=1
39
40while test $# -gt 0 ; do
41 case "$1" in
42 -b | -backend)
43 BACKEND="$2"
44 shift; shift ;;
45
46 -c | -clean)
47 CLEAN=yes
48 shift ;;
49
50 -k | -kill)
51 KILLSERVERS=no
52 shift ;;
53 -l | -loop)
54 NUM="`echo $2 | sed 's/[0-9]//g'`"
55 if [ -z "$NUM" ]; then
56 LOOP=$2
57 else
58 echo "Loop variable not an int: $2"
59 echo "$USAGE"; exit 1
60 fi
61 shift ;
62 shift ;;
63
64 -p | -preserve)
65 PRESERVE=yes
66 shift ;;
67
68 -s | -syncmode)
69 case "$2" in
70 ro | rp)
71 SYNCMODE="$2"
72 ;;
73 *)
74 echo "unknown sync mode $2"
75 echo "$USAGE"; exit 1
76 ;;
77 esac
78 shift; shift ;;
79
80 -u | -userdata)
81 USERDATA=yes
82 shift ;;
83
84 -w | -wait)
85 WAIT=1
86 shift ;;
87
88 -)
89 shift
90 break ;;
91
92 -*)
93 echo "$USAGE"; exit 1
94 ;;
95
96 *)
97 break ;;
98 esac
99done
100
101eval `$EGREP_CMD -e '^AC' ${LDAP_BUILD}/tests/run`
102export `$EGREP_CMD -e '^AC' ${LDAP_BUILD}/tests/run | sed 's/=.*//'`
103
104if test -z "$BACKEND" ; then
105 for b in mdb ; do
106 if eval "test \"\$AC_$b\" != no" ; then
107 BACKEND=$b
108 break
109 fi
110 done
111 if test -z "$BACKEND" ; then
112 echo "No suitable default database backend configured" >&2
113 exit 1
114 fi
115fi
116
117BACKENDTYPE=`eval 'echo $AC_'$BACKEND`
118if test "x$BACKENDTYPE" = "x" ; then
119 BACKENDTYPE="unknown"
120fi
121
122# Backend features. indexdb: indexing and unchecked limit.
123# maindb: main storage backend. Currently index,limits,mode,paged results.
124INDEXDB=noindexdb MAINDB=nomaindb
125case $BACKEND in
126 mdb) INDEXDB=indexdb MAINDB=maindb ;;
127esac
128
129export BACKEND BACKENDTYPE INDEXDB MAINDB \
130 WAIT KILLSERVERS PRESERVE SYNCMODE USERDATA \
131 SRCDIR
132
133if test $# = 0 ; then
134 echo "$USAGE"; exit 1
135fi
136
137# need defines.sh for the definitions of the directories
138. $SRCDIR/scripts/defines.sh
139
140SCRIPTDIR="${TOPDIR}/tests/scripts"
141
142export SCRIPTDIR
143
144SCRIPTNAME="$1"
145shift
146
147if test -x "${SCRIPTDIR}/${SCRIPTNAME}" ; then
148 SCRIPT="${SCRIPTDIR}/${SCRIPTNAME}"
149elif test -x "`echo ${SCRIPTDIR}/test*-${SCRIPTNAME}`"; then
150 SCRIPT="`echo ${SCRIPTDIR}/test*-${SCRIPTNAME}`"
151elif test -x "`echo ${SCRIPTDIR}/${SCRIPTNAME}-*`"; then
152 SCRIPT="`echo ${SCRIPTDIR}/${SCRIPTNAME}-*`"
153else
154 echo "run: ${SCRIPTNAME} not found (or not executable)"
155 exit 1;
156fi
157
158if test ! -r ${DATADIR}/test.ldif ; then
159 ${LN_S} ${SRCDIR}/data ${DATADIR}
160fi
161if test ! -r ${SCHEMADIR}/core.schema ; then
162 ${LN_S} ${TOPSRCDIR}/servers/slapd/schema ${SCHEMADIR}
163fi
164if test ! -r ./data; then
165 ${LN_S} ${TOPDIR}/tests/data ./
166fi
167
168if test -d ${TESTDIR} ; then
169 if test $PRESERVE = no ; then
170 echo "Cleaning up test run directory leftover from previous run."
171 /bin/rm -rf ${TESTDIR}
172 elif test $PRESERVE = yes ; then
173 echo "Cleaning up only database directories leftover from previous run."
174 /bin/rm -rf ${TESTDIR}/db.*
175 fi
176fi
177mkdir -p ${TESTDIR}
178
179if test $USERDATA = yes ; then
180 if test ! -d userdata ; then
181 echo "User data directory (userdata) does not exist."
182 exit 1
183 fi
184 cp -R userdata/* ${TESTDIR}
185fi
186
187# disable LDAP initialization
188LDAPNOINIT=true; export LDAPNOINIT
189
190echo "Running ${SCRIPT} for ${BACKEND}..."
191while [ $COUNTER -le $LOOP ]; do
192 if [ $LOOP -gt 1 ]; then
193 echo "Running $COUNTER of $LOOP iterations"
194 fi
195 $SCRIPT $*
196 RC=$?
19715
198 if test $CLEAN = yes ; then16TOPSRCDIR="$SRCDIR" OBJDIR="${LDAP_BUILD}" SRCDIR="${SRCDIR}/tests" DEFSDIR="${SRCDIR}/scripts" SCRIPTDIR="${TOPDIR}/tests/scripts" "${LDAP_BUILD}/tests/run" $*
199 echo "Cleaning up test run directory from this run."
200 /bin/rm -rf ${TESTDIR}
201 echo "Cleaning up symlinks."
202 /bin/rm -f ${DATADIR} ${SCHEMADIR}
203 fi
20417
205 if [ $RC -ne 0 ]; then
206 if [ $LOOP -gt 1 ]; then
207 echo "Failed after $COUNTER of $LOOP iterations"
208 fi
209 exit $RC
210 else
211 COUNTER=`expr $COUNTER + 1`
212 if [ $COUNTER -le $LOOP ]; then
213 echo "Cleaning up test run directory from this run."
214 /bin/rm -rf ${TESTDIR}
215 fi
216 fi
217done
218exit $RC
diff --git a/contrib/slapd-modules/variant/slapo-variant.5 b/contrib/slapd-modules/variant/slapo-variant.5
index a480744..f46eb69 100644
--- a/contrib/slapd-modules/variant/slapo-variant.5
+++ b/contrib/slapd-modules/variant/slapo-variant.5
@@ -341,14 +341,14 @@ olcVariantEntry: dc=example,dc=com
341341
342# share the Headquarters' address as the company address342# share the Headquarters' address as the company address
343dn: olcVariantVariantAttribute=postaladdress,name={0}example,olcOverlay={x}variant,$DATABASE343dn: olcVariantVariantAttribute=postaladdress,name={0}example,olcOverlay={x}variant,$DATABASE
344objectClass: olcVariantVariantAttribute344objectClass: olcVariantAttribute
345olcVariantVariantAttribute: postaladdress345olcVariantVariantAttribute: postaladdress
346olcVariantAlternativeAttribute: postaladdress346olcVariantAlternativeAttribute: postaladdress
347olcVariantAlternativeEntry: ou=Headquarters,dc=example,dc=com347olcVariantAlternativeEntry: ou=Headquarters,dc=example,dc=com
348348
349# populate telephonenumber from CEO's home phone349# populate telephonenumber from CEO's home phone
350dn: name=Take phone from CEO entry,name={0}example,olcOverlay={x}variant,$DATABASE350dn: name=Take phone from CEO entry,name={0}example,olcOverlay={x}variant,$DATABASE
351objectClass: olcVariantVariantAttribute351objectClass: olcVariantAttribute
352olcVariantVariantAttribute: telephonenumber352olcVariantVariantAttribute: telephonenumber
353olcVariantAlternativeAttribute: homephone353olcVariantAlternativeAttribute: homephone
354olcVariantAlternativeEntry: cn=John Doe,ou=People,dc=example,dc=com354olcVariantAlternativeEntry: cn=John Doe,ou=People,dc=example,dc=com
diff --git a/contrib/slapd-modules/variant/tests/data/test001-04a-same-regex.ldif b/contrib/slapd-modules/variant/tests/data/test001-04a-same-regex.ldif
355new file mode 100644355new file mode 100644
index 0000000..071df0f
--- /dev/null
+++ b/contrib/slapd-modules/variant/tests/data/test001-04a-same-regex.ldif
@@ -0,0 +1,4 @@
1dn: name={3}regex,olcOverlay={0}variant,olcDatabase={1}mdb,cn=config
2changetype: modify
3replace: olcVariantEntryRegex
4olcVariantEntryRegex: (.*),(ou=.*technology.*)(,)dc=example,dc=com
diff --git a/contrib/slapd-modules/variant/tests/data/test001-04b-same-regex.ldif b/contrib/slapd-modules/variant/tests/data/test001-04b-same-regex.ldif
0new file mode 1006445new file mode 100644
index 0000000..5fa1d3b
--- /dev/null
+++ b/contrib/slapd-modules/variant/tests/data/test001-04b-same-regex.ldif
@@ -0,0 +1,4 @@
1dn: name=regex,olcOverlay={0}variant,olcDatabase={1}@BACKEND@,cn=config
2changetype: add
3objectclass: olcVariantRegex
4olcVariantEntryRegex: .*
diff --git a/contrib/slapd-modules/variant/tests/run b/contrib/slapd-modules/variant/tests/run
index 6a38431..239bff7 100755
--- a/contrib/slapd-modules/variant/tests/run
+++ b/contrib/slapd-modules/variant/tests/run
@@ -12,218 +12,6 @@
12## A copy of this license is available in the file LICENSE in the12## A copy of this license is available in the file LICENSE in the
13## top-level directory of the distribution or, alternatively, at13## top-level directory of the distribution or, alternatively, at
14## <http://www.OpenLDAP.org/license.html>.14## <http://www.OpenLDAP.org/license.html>.
15##
16## ACKNOWLEDGEMENTS:
17## This module was written in 2016 by Ondřej Kuzník for Symas Corp.
18
19USAGE="$0 [-b <backend>] [-c] [-k] [-l #] [-p] [-s {ro|rp}] [-u] [-w] <script>"
20
21TOPSRCDIR="${SRCDIR-$LDAP_SRC}"
22SRCDIR="${TOPSRCDIR}/tests"
23eval `grep EGREP_CMD= ${LDAP_BUILD}/tests/run`
24eval `$EGREP_CMD -e '^LN_S=' ${LDAP_BUILD}/tests/run`
25
26export SRCDIR TOPSRCDIR LN_S EGREP_CMD
27
28. "${SRCDIR}/scripts/defines.sh"
29
30BACKEND=
31CLEAN=no
32WAIT=0
33KILLSERVERS=yes
34PRESERVE=${PRESERVE-no}
35SYNCMODE=${SYNCMODE-rp}
36USERDATA=no
37LOOP=1
38COUNTER=1
39
40while test $# -gt 0 ; do
41 case "$1" in
42 -b | -backend)
43 BACKEND="$2"
44 shift; shift ;;
45
46 -c | -clean)
47 CLEAN=yes
48 shift ;;
49
50 -k | -kill)
51 KILLSERVERS=no
52 shift ;;
53 -l | -loop)
54 NUM="`echo $2 | sed 's/[0-9]//g'`"
55 if [ -z "$NUM" ]; then
56 LOOP=$2
57 else
58 echo "Loop variable not an int: $2"
59 echo "$USAGE"; exit 1
60 fi
61 shift ;
62 shift ;;
63
64 -p | -preserve)
65 PRESERVE=yes
66 shift ;;
67
68 -s | -syncmode)
69 case "$2" in
70 ro | rp)
71 SYNCMODE="$2"
72 ;;
73 *)
74 echo "unknown sync mode $2"
75 echo "$USAGE"; exit 1
76 ;;
77 esac
78 shift; shift ;;
79
80 -u | -userdata)
81 USERDATA=yes
82 shift ;;
83
84 -w | -wait)
85 WAIT=1
86 shift ;;
87
88 -)
89 shift
90 break ;;
91
92 -*)
93 echo "$USAGE"; exit 1
94 ;;
95
96 *)
97 break ;;
98 esac
99done
100
101eval `$EGREP_CMD -e '^AC' ${LDAP_BUILD}/tests/run`
102export `$EGREP_CMD -e '^AC' ${LDAP_BUILD}/tests/run | sed 's/=.*//'`
103
104if test -z "$BACKEND" ; then
105 for b in mdb ; do
106 if eval "test \"\$AC_$b\" != no" ; then
107 BACKEND=$b
108 break
109 fi
110 done
111 if test -z "$BACKEND" ; then
112 echo "No suitable default database backend configured" >&2
113 exit 1
114 fi
115fi
116
117BACKENDTYPE=`eval 'echo $AC_'$BACKEND`
118if test "x$BACKENDTYPE" = "x" ; then
119 BACKENDTYPE="unknown"
120fi
121
122# Backend features. indexdb: indexing and unchecked limit.
123# maindb: main storage backend. Currently index,limits,mode,paged results.
124INDEXDB=noindexdb MAINDB=nomaindb
125case $BACKEND in
126 mdb) INDEXDB=indexdb MAINDB=maindb ;;
127 ndb) INDEXDB=indexdb ;;
128esac
129
130export BACKEND BACKENDTYPE INDEXDB MAINDB \
131 WAIT KILLSERVERS PRESERVE SYNCMODE USERDATA \
132 SRCDIR
133
134if test $# = 0 ; then
135 echo "$USAGE"; exit 1
136fi
137
138# need defines.sh for the definitions of the directories
139. $SRCDIR/scripts/defines.sh
140
141SCRIPTDIR="${TOPDIR}/tests/scripts"
142
143export SCRIPTDIR
144
145SCRIPTNAME="$1"
146shift
147
148if test -x "${SCRIPTDIR}/${SCRIPTNAME}" ; then
149 SCRIPT="${SCRIPTDIR}/${SCRIPTNAME}"
150elif test -x "`echo ${SCRIPTDIR}/test*-${SCRIPTNAME}`"; then
151 SCRIPT="`echo ${SCRIPTDIR}/test*-${SCRIPTNAME}`"
152elif test -x "`echo ${SCRIPTDIR}/${SCRIPTNAME}-*`"; then
153 SCRIPT="`echo ${SCRIPTDIR}/${SCRIPTNAME}-*`"
154else
155 echo "run: ${SCRIPTNAME} not found (or not executable)"
156 exit 1;
157fi
158
159if test ! -r ${DATADIR}/test.ldif ; then
160 ${LN_S} ${SRCDIR}/data ${DATADIR}
161fi
162if test ! -r ${SCHEMADIR}/core.schema ; then
163 ${LN_S} ${TOPSRCDIR}/servers/slapd/schema ${SCHEMADIR}
164fi
165if test ! -r ./data; then
166 ${LN_S} ${TOPDIR}/tests/data ./
167fi
168
169if test -d ${TESTDIR} ; then
170 if test $PRESERVE = no ; then
171 echo "Cleaning up test run directory leftover from previous run."
172 /bin/rm -rf ${TESTDIR}
173 elif test $PRESERVE = yes ; then
174 echo "Cleaning up only database directories leftover from previous run."
175 /bin/rm -rf ${TESTDIR}/db.*
176 fi
177fi
178if test $BACKEND = ndb ; then
179 mysql --user root <<EOF
180 drop database if exists db_1;
181 drop database if exists db_2;
182 drop database if exists db_3;
183 drop database if exists db_4;
184 drop database if exists db_5;
185 drop database if exists db_6;
186EOF
187fi
188mkdir -p ${TESTDIR}
189
190if test $USERDATA = yes ; then
191 if test ! -d userdata ; then
192 echo "User data directory (userdata) does not exist."
193 exit 1
194 fi
195 cp -R userdata/* ${TESTDIR}
196fi
197
198# disable LDAP initialization
199LDAPNOINIT=true; export LDAPNOINIT
200
201echo "Running ${SCRIPT} for ${BACKEND}..."
202while [ $COUNTER -le $LOOP ]; do
203 if [ $LOOP -gt 1 ]; then
204 echo "Running $COUNTER of $LOOP iterations"
205 fi
206 $SCRIPT $*
207 RC=$?
20815
209 if test $CLEAN = yes ; then16TOPSRCDIR="$SRCDIR" OBJDIR="${LDAP_BUILD}" SRCDIR="${SRCDIR}/tests" DEFSDIR="${SRCDIR}/scripts" SCRIPTDIR="${TOPDIR}/tests/scripts" "${LDAP_BUILD}/tests/run" $*
210 echo "Cleaning up test run directory from this run."
211 /bin/rm -rf ${TESTDIR}
212 echo "Cleaning up symlinks."
213 /bin/rm -f ${DATADIR} ${SCHEMADIR}
214 fi
21517
216 if [ $RC -ne 0 ]; then
217 if [ $LOOP -gt 1 ]; then
218 echo "Failed after $COUNTER of $LOOP iterations"
219 fi
220 exit $RC
221 else
222 COUNTER=`expr $COUNTER + 1`
223 if [ $COUNTER -le $LOOP ]; then
224 echo "Cleaning up test run directory from this run."
225 /bin/rm -rf ${TESTDIR}
226 fi
227 fi
228done
229exit $RC
diff --git a/contrib/slapd-modules/variant/variant.c b/contrib/slapd-modules/variant/variant.c
index edf4832..cc1c693 100644
--- a/contrib/slapd-modules/variant/variant.c
+++ b/contrib/slapd-modules/variant/variant.c
@@ -282,9 +282,7 @@ variant_op_add( Operation *op, SlapReply *rs )
282 variantEntry_info *vei;282 variantEntry_info *vei;
283 int rc;283 int rc;
284284
285 /* Replication always uses the rootdn */285 if ( ov->passReplication && be_shadow_update( op ) ) {
286 if ( ov->passReplication && SLAPD_SYNC_IS_SYNCCONN(op->o_connid) &&
287 be_isroot( op ) ) {
288 return SLAP_CB_CONTINUE;286 return SLAP_CB_CONTINUE;
289 }287 }
290288
@@ -431,9 +429,7 @@ variant_op_mod( Operation *op, SlapReply *rs )
431 regmatch_t pmatch[10];429 regmatch_t pmatch[10];
432 int rc, nmatch = sizeof(pmatch) / sizeof(regmatch_t);430 int rc, nmatch = sizeof(pmatch) / sizeof(regmatch_t);
433431
434 /* Replication always uses the rootdn */432 if ( ov->passReplication && be_shadow_update( op ) ) {
435 if ( ov->passReplication && SLAPD_SYNC_IS_SYNCCONN(op->o_connid) &&
436 be_isroot( op ) ) {
437 return SLAP_CB_CONTINUE;433 return SLAP_CB_CONTINUE;
438 }434 }
439435
@@ -868,6 +864,9 @@ variant_set_dn( ConfigArgs *ca )
868864
869 dnMatch( &diff, 0, NULL, NULL, &vei->dn, &vei2->dn );865 dnMatch( &diff, 0, NULL, NULL, &vei->dn, &vei2->dn );
870 if ( !diff ) {866 if ( !diff ) {
867 snprintf( ca->cr_msg, sizeof(ca->cr_msg),
868 "duplicate variant dn: %s", ca->value_ndn.bv_val );
869 Debug( LDAP_DEBUG_ANY, "%s: %s\n", ca->log, ca->cr_msg );
871 ca->reply.err = LDAP_CONSTRAINT_VIOLATION;870 ca->reply.err = LDAP_CONSTRAINT_VIOLATION;
872 return ca->reply.err;871 return ca->reply.err;
873 }872 }
@@ -889,7 +888,11 @@ variant_set_regex( ConfigArgs *ca )
889 } else if ( ca->op == LDAP_MOD_DELETE ) {888 } else if ( ca->op == LDAP_MOD_DELETE ) {
890 ber_memfree( vei->dn.bv_val );889 ber_memfree( vei->dn.bv_val );
891 BER_BVZERO( &vei->dn );890 BER_BVZERO( &vei->dn );
892 regfree( vei->regex );891 if ( vei->regex ) {
892 regfree( vei->regex );
893 ch_free( vei->regex );
894 vei->regex = NULL;
895 }
893 return LDAP_SUCCESS;896 return LDAP_SUCCESS;
894 }897 }
895898
@@ -910,8 +913,9 @@ variant_set_regex( ConfigArgs *ca )
910 if ( vei == vei2 ) continue;913 if ( vei == vei2 ) continue;
911914
912 if ( !ber_bvcmp( &ca->value_bv, &vei2->dn ) ) {915 if ( !ber_bvcmp( &ca->value_bv, &vei2->dn ) ) {
913 ch_free( vei );916 snprintf( ca->cr_msg, sizeof(ca->cr_msg),
914 ca->ca_private = NULL;917 "duplicate variant regex: %s", ca->value_dn.bv_val );
918 Debug( LDAP_DEBUG_ANY, "%s: %s\n", ca->log, ca->cr_msg );
915 ca->reply.err = LDAP_CONSTRAINT_VIOLATION;919 ca->reply.err = LDAP_CONSTRAINT_VIOLATION;
916 return ca->reply.err;920 return ca->reply.err;
917 }921 }
@@ -920,6 +924,10 @@ variant_set_regex( ConfigArgs *ca )
920 vei->regex = ch_calloc( 1, sizeof(regex_t) );924 vei->regex = ch_calloc( 1, sizeof(regex_t) );
921 if ( regcomp( vei->regex, vei->dn.bv_val, REG_EXTENDED ) ) {925 if ( regcomp( vei->regex, vei->dn.bv_val, REG_EXTENDED ) ) {
922 ch_free( vei->regex );926 ch_free( vei->regex );
927 vei->regex = NULL;
928 snprintf( ca->cr_msg, sizeof(ca->cr_msg),
929 "cannot process regex: %s", vei->dn.bv_val );
930 Debug( LDAP_DEBUG_ANY, "%s: %s\n", ca->log, ca->cr_msg );
923 ca->reply.err = LDAP_CONSTRAINT_VIOLATION;931 ca->reply.err = LDAP_CONSTRAINT_VIOLATION;
924 return ca->reply.err;932 return ca->reply.err;
925 }933 }
@@ -969,9 +977,10 @@ variant_set_alt_pattern( ConfigArgs *ca )
969 if ( ( ( *p >= '0' ) && ( *p <= '9' ) ) || ( *p == '$' ) ) {977 if ( ( ( *p >= '0' ) && ( *p <= '9' ) ) || ( *p == '$' ) ) {
970 p += 1;978 p += 1;
971 } else {979 } else {
972 Debug( LDAP_DEBUG_ANY, "variant_set_alt_pattern: "980 snprintf( ca->cr_msg, sizeof(ca->cr_msg),
973 "invalid replacement pattern supplied '%s'\n",981 "invalid replacement pattern supplied '%s'",
974 ca->value_bv.bv_val );982 ca->value_bv.bv_val );
983 Debug( LDAP_DEBUG_ANY, "%s: %s\n", ca->log, ca->cr_msg );
975 ca->reply.err = LDAP_CONSTRAINT_VIOLATION;984 ca->reply.err = LDAP_CONSTRAINT_VIOLATION;
976 return ca->reply.err;985 return ca->reply.err;
977 }986 }
@@ -1017,6 +1026,9 @@ variant_set_attribute( ConfigArgs *ca )
1017 rc = slap_str2ad( s, ad, &text );1026 rc = slap_str2ad( s, ad, &text );
1018 ber_memfree( ca->value_string );1027 ber_memfree( ca->value_string );
1019 if ( rc ) {1028 if ( rc ) {
1029 snprintf( ca->cr_msg, sizeof(ca->cr_msg),
1030 "attribute %s invalid: %s", s, text );
1031 Debug( LDAP_DEBUG_ANY, "%s: %s\n", ca->log, ca->cr_msg );
1020 return rc;1032 return rc;
1021 }1033 }
10221034
@@ -1024,6 +1036,10 @@ variant_set_attribute( ConfigArgs *ca )
1024 if ( vai->attr && vai->alternative &&1036 if ( vai->attr && vai->alternative &&
1025 vai->attr->ad_type->sat_syntax !=1037 vai->attr->ad_type->sat_syntax !=
1026 vai->alternative->ad_type->sat_syntax ) {1038 vai->alternative->ad_type->sat_syntax ) {
1039 snprintf( ca->cr_msg, sizeof(ca->cr_msg),
1040 "attribute '%s' syntax doesn't match alternative attribute '%s'",
1041 vai->attr->ad_cname.bv_val, vai->alternative->ad_cname.bv_val );
1042 Debug( LDAP_DEBUG_ANY, "%s: %s\n", ca->log, ca->cr_msg );
1027 ca->reply.err = LDAP_CONSTRAINT_VIOLATION;1043 ca->reply.err = LDAP_CONSTRAINT_VIOLATION;
1028 return ca->reply.err;1044 return ca->reply.err;
1029 }1045 }
@@ -1033,6 +1049,9 @@ variant_set_attribute( ConfigArgs *ca )
1033 LDAP_SLIST_FOREACH( vai2, &vai->variant->attributes, next ) {1049 LDAP_SLIST_FOREACH( vai2, &vai->variant->attributes, next ) {
1034 if ( vai == vai2 ) continue;1050 if ( vai == vai2 ) continue;
1035 if ( vai->attr == vai2->attr ) {1051 if ( vai->attr == vai2->attr ) {
1052 snprintf( ca->cr_msg, sizeof(ca->cr_msg),
1053 "duplicate attribute '%s'", vai->attr->ad_cname.bv_val );
1054 Debug( LDAP_DEBUG_ANY, "%s: %s\n", ca->log, ca->cr_msg );
1036 ca->reply.err = LDAP_CONSTRAINT_VIOLATION;1055 ca->reply.err = LDAP_CONSTRAINT_VIOLATION;
1037 return ca->reply.err;1056 return ca->reply.err;
1038 }1057 }
diff --git a/debian/changelog b/debian/changelog
index 786cdf7..61b5af5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
1openldap (2.5.15+dfsg-0ubuntu0.22.04.1) jammy; urgency=medium
2
3 * New upstream version (LP: #2027079).
4 - Several fixes, including to asynchronous connections to the OpenLDAP
5 server.
6
7 -- Sergio Durigan Junior <sergio.durigan@canonical.com> Tue, 11 Jul 2023 15:26:41 -0400
8
1openldap (2.5.14+dfsg-0ubuntu0.22.04.2) jammy; urgency=medium9openldap (2.5.14+dfsg-0ubuntu0.22.04.2) jammy; urgency=medium
210
3 * Build the passwd/sha2 contrib module with -fno-strict-aliasing to11 * Build the passwd/sha2 contrib module with -fno-strict-aliasing to
diff --git a/doc/guide/admin/aspell.en.pws b/doc/guide/admin/aspell.en.pws
index 63d3f0e..67bd346 100644
--- a/doc/guide/admin/aspell.en.pws
+++ b/doc/guide/admin/aspell.en.pws
@@ -680,7 +680,6 @@ affectsMultipleDSAs
680Preprocessor680Preprocessor
681lastName681lastName
682lldap682lldap
683cachesize
684slapauth683slapauth
685attributeType684attributeType
686attributetype685attributetype
diff --git a/doc/guide/admin/guide.html b/doc/guide/admin/guide.html
index b1467fc..5fb51d0 100644
--- a/doc/guide/admin/guide.html
+++ b/doc/guide/admin/guide.html
@@ -23,7 +23,7 @@
23<DIV CLASS="title">23<DIV CLASS="title">
24<H1 CLASS="doc-title">OpenLDAP Software 2.5 Administrator's Guide</H1>24<H1 CLASS="doc-title">OpenLDAP Software 2.5 Administrator's Guide</H1>
25<ADDRESS CLASS="doc-author">The OpenLDAP Project &lt;<A HREF="https://www.openldap.org/">https://www.openldap.org/</A>&gt;</ADDRESS>25<ADDRESS CLASS="doc-author">The OpenLDAP Project &lt;<A HREF="https://www.openldap.org/">https://www.openldap.org/</A>&gt;</ADDRESS>
26<ADDRESS CLASS="doc-modified">8 February 2023</ADDRESS>26<ADDRESS CLASS="doc-modified">10 July 2023</ADDRESS>
27<BR CLEAR="All">27<BR CLEAR="All">
28</DIV>28</DIV>
29<DIV CLASS="contents">29<DIV CLASS="contents">
@@ -5732,8 +5732,8 @@ Members of a group
5732 pcacheTemplate (&amp;(sn=)(givenName=)) 0 36005732 pcacheTemplate (&amp;(sn=)(givenName=)) 0 3600
5733 pcacheTemplate (&amp;(departmentNumber=)(secretary=*)) 0 36005733 pcacheTemplate (&amp;(departmentNumber=)(secretary=*)) 0 3600
57345734
5735 cachesize 20
5736 directory ./testrun/db.2.a5735 directory ./testrun/db.2.a
5736 maxsize 1073741824
5737 index objectClass eq5737 index objectClass eq
5738 index cn,sn,uid,mail pres,eq,sub5738 index cn,sn,uid,mail pres,eq,sub
5739</PRE>5739</PRE>
@@ -5763,7 +5763,7 @@ Members of a group
5763 objectClass: olcPcacheDatabase5763 objectClass: olcPcacheDatabase
5764 olcDatabase: {0}mdb5764 olcDatabase: {0}mdb
5765 olcDbDirectory: ./testrun/db.2.a5765 olcDbDirectory: ./testrun/db.2.a
5766 olcDbCacheSize: 205766 olcDbMaxSize: 1073741824
5767 olcDbIndex: objectClass eq5767 olcDbIndex: objectClass eq
5768 olcDbIndex: cn,sn,uid,mail pres,eq,sub5768 olcDbIndex: cn,sn,uid,mail pres,eq,sub
5769</PRE>5769</PRE>
diff --git a/doc/guide/admin/overlays.sdf b/doc/guide/admin/overlays.sdf
index 20e4b93..47cb7b8 100644
--- a/doc/guide/admin/overlays.sdf
+++ b/doc/guide/admin/overlays.sdf
@@ -783,8 +783,8 @@ at server {{EX:ldap.example.com}}.
783> pcacheTemplate (&(sn=)(givenName=)) 0 3600783> pcacheTemplate (&(sn=)(givenName=)) 0 3600
784> pcacheTemplate (&(departmentNumber=)(secretary=*)) 0 3600784> pcacheTemplate (&(departmentNumber=)(secretary=*)) 0 3600
785>785>
786> cachesize 20
787> directory ./testrun/db.2.a786> directory ./testrun/db.2.a
787> maxsize 1073741824
788> index objectClass eq788> index objectClass eq
789> index cn,sn,uid,mail pres,eq,sub789> index cn,sn,uid,mail pres,eq,sub
790790
@@ -817,7 +817,7 @@ at server {{EX:ldap.example.com}}.
817> objectClass: olcPcacheDatabase817> objectClass: olcPcacheDatabase
818> olcDatabase: {0}mdb818> olcDatabase: {0}mdb
819> olcDbDirectory: ./testrun/db.2.a819> olcDbDirectory: ./testrun/db.2.a
820> olcDbCacheSize: 20820> olcDbMaxSize: 1073741824
821> olcDbIndex: objectClass eq821> olcDbIndex: objectClass eq
822> olcDbIndex: cn,sn,uid,mail pres,eq,sub822> olcDbIndex: cn,sn,uid,mail pres,eq,sub
823823
diff --git a/doc/man/man5/lloadd.conf.5 b/doc/man/man5/lloadd.conf.5
index 53f50ba..49c72b9 100644
--- a/doc/man/man5/lloadd.conf.5
+++ b/doc/man/man5/lloadd.conf.5
@@ -824,7 +824,7 @@ The original ETCDIR/lloadd.conf is another example.
824.SH LIMITATIONS824.SH LIMITATIONS
825Support for proxying SASL Binds is limited to the825Support for proxying SASL Binds is limited to the
826.B EXTERNAL826.B EXTERNAL
827mechanism (and only to extract the DN of a client TLS cerificate if used during827mechanism (and only to extract the DN of a client TLS certificate if used during
828the last renegotiation) and mechanisms that rely neither on connection metadata828the last renegotiation) and mechanisms that rely neither on connection metadata
829(as Kerberos does) nor establish a SASL integrity/confidentialiy layer (again,829(as Kerberos does) nor establish a SASL integrity/confidentialiy layer (again,
830some Kerberos mechanisms,830some Kerberos mechanisms,
diff --git a/doc/man/man5/slapd-ldap.5 b/doc/man/man5/slapd-ldap.5
index ffcbe81..a3c46e9 100644
--- a/doc/man/man5/slapd-ldap.5
+++ b/doc/man/man5/slapd-ldap.5
@@ -402,6 +402,7 @@ which defaults to "allow".
402The identity associated to this directive is also used for privileged402The identity associated to this directive is also used for privileged
403operations whenever \fBidassert\-bind\fP is defined and \fBacl\-bind\fP403operations whenever \fBidassert\-bind\fP is defined and \fBacl\-bind\fP
404is not. See \fBacl\-bind\fP for details.404is not. See \fBacl\-bind\fP for details.
405.RE
405406
406.TP407.TP
407.B idassert-passthru <authz-regexp>408.B idassert-passthru <authz-regexp>
diff --git a/doc/man/man5/slapo-pcache.5 b/doc/man/man5/slapo-pcache.5
index 1425897..3cfd7f2 100644
--- a/doc/man/man5/slapo-pcache.5
+++ b/doc/man/man5/slapo-pcache.5
@@ -208,7 +208,7 @@ shown here:
208.RS208.RS
209.nf209.nf
210directory /var/tmp/cache210directory /var/tmp/cache
211cachesize 100211maxsize 1073741824
212.fi212.fi
213.RE213.RE
214.LP214.LP
diff --git a/libraries/libldap/init.c b/libraries/libldap/init.c
index a2409d7..3a81790 100644
--- a/libraries/libldap/init.c
+++ b/libraries/libldap/init.c
@@ -96,9 +96,9 @@ static const struct ol_attribute {
96 {0, ATTR_OPTION, "URI", NULL, LDAP_OPT_URI}, /* replaces HOST/PORT */96 {0, ATTR_OPTION, "URI", NULL, LDAP_OPT_URI}, /* replaces HOST/PORT */
97 {0, ATTR_OPTION, "SOCKET_BIND_ADDRESSES", NULL, LDAP_OPT_SOCKET_BIND_ADDRESSES},97 {0, ATTR_OPTION, "SOCKET_BIND_ADDRESSES", NULL, LDAP_OPT_SOCKET_BIND_ADDRESSES},
98 {0, ATTR_BOOL, "REFERRALS", NULL, LDAP_BOOL_REFERRALS},98 {0, ATTR_BOOL, "REFERRALS", NULL, LDAP_BOOL_REFERRALS},
99 {0, ATTR_INT, "KEEPALIVE_IDLE", NULL, LDAP_OPT_X_KEEPALIVE_IDLE},99 {0, ATTR_OPT_INT, "KEEPALIVE_IDLE", NULL, LDAP_OPT_X_KEEPALIVE_IDLE},
100 {0, ATTR_INT, "KEEPALIVE_PROBES", NULL, LDAP_OPT_X_KEEPALIVE_PROBES},100 {0, ATTR_OPT_INT, "KEEPALIVE_PROBES", NULL, LDAP_OPT_X_KEEPALIVE_PROBES},
101 {0, ATTR_INT, "KEEPALIVE_INTERVAL", NULL, LDAP_OPT_X_KEEPALIVE_INTERVAL},101 {0, ATTR_OPT_INT, "KEEPALIVE_INTERVAL", NULL, LDAP_OPT_X_KEEPALIVE_INTERVAL},
102102
103#if 0103#if 0
104 /* This should only be allowed via ldap_set_option(3) */104 /* This should only be allowed via ldap_set_option(3) */
diff --git a/libraries/libldap/open.c b/libraries/libldap/open.c
index afef818..bfdbb25 100644
--- a/libraries/libldap/open.c
+++ b/libraries/libldap/open.c
@@ -501,6 +501,11 @@ ldap_int_open_connection(
501 if( proto == LDAP_PROTO_UDP ) return 0;501 if( proto == LDAP_PROTO_UDP ) return 0;
502#endif502#endif
503503
504 if ( async && rc == -2) {
505 /* Need to let the connect complete asynchronously before we continue */
506 return -2;
507 }
508
504#ifdef HAVE_TLS509#ifdef HAVE_TLS
505 if ((rc == 0 || rc == -2) && ( ld->ld_options.ldo_tls_mode == LDAP_OPT_X_TLS_HARD ||510 if ((rc == 0 || rc == -2) && ( ld->ld_options.ldo_tls_mode == LDAP_OPT_X_TLS_HARD ||
506 strcmp( srv->lud_scheme, "ldaps" ) == 0 ))511 strcmp( srv->lud_scheme, "ldaps" ) == 0 ))
@@ -585,9 +590,9 @@ ldap_open_internal_connection( LDAP **ldp, ber_socket_t *fdp )
585 /* Attach the passed socket as the *LDAP's connection */590 /* Attach the passed socket as the *LDAP's connection */
586 c = ldap_new_connection( ld, NULL, 1, 0, NULL, 0, 0 );591 c = ldap_new_connection( ld, NULL, 1, 0, NULL, 0, 0 );
587 if( c == NULL ) {592 if( c == NULL ) {
593 LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex );
588 ldap_unbind_ext( ld, NULL, NULL );594 ldap_unbind_ext( ld, NULL, NULL );
589 *ldp = NULL;595 *ldp = NULL;
590 LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex );
591 return( LDAP_NO_MEMORY );596 return( LDAP_NO_MEMORY );
592 }597 }
593 ber_sockbuf_ctrl( c->lconn_sb, LBER_SB_OPT_SET_FD, fdp );598 ber_sockbuf_ctrl( c->lconn_sb, LBER_SB_OPT_SET_FD, fdp );
diff --git a/libraries/libldap/tls_o.c b/libraries/libldap/tls_o.c
index 834d986..d6405bc 100644
--- a/libraries/libldap/tls_o.c
+++ b/libraries/libldap/tls_o.c
@@ -52,6 +52,10 @@
52#define ASN1_STRING_data(x) ASN1_STRING_get0_data(x)52#define ASN1_STRING_data(x) ASN1_STRING_get0_data(x)
53#endif53#endif
5454
55#if OPENSSL_VERSION_MAJOR >= 3
56#define ERR_get_error_line( a, b ) ERR_get_error_all( a, b, NULL, NULL, NULL )
57#define SSL_get_peer_certificate( s ) SSL_get1_peer_certificate( s )
58#endif
55typedef SSL_CTX tlso_ctx;59typedef SSL_CTX tlso_ctx;
56typedef SSL tlso_session;60typedef SSL tlso_session;
5761
@@ -329,7 +333,7 @@ tlso_ctx_cipher13( tlso_ctx *ctx, char *suites )
329 if ( !strncmp( ver, "TLSv", 4 ) && strncmp( ver+4, "1.3", 3 ) >= 0 ) {333 if ( !strncmp( ver, "TLSv", 4 ) && strncmp( ver+4, "1.3", 3 ) >= 0 ) {
330 if ( tls13_suites[0] )334 if ( tls13_suites[0] )
331 ts = tlso_stecpy( ts, ":", te );335 ts = tlso_stecpy( ts, ":", te );
332 ts = tlso_stecpy( ts, sname, te );336 ts = tlso_stecpy( ts, nptr, te );
333 }337 }
334 }338 }
335 }339 }
@@ -523,7 +527,13 @@ tlso_ctx_init( struct ldapoptions *lo, struct ldaptls *lt, int is_server )
523 }527 }
524528
525 if ( is_server && lo->ldo_tls_dhfile ) {529 if ( is_server && lo->ldo_tls_dhfile ) {
530#if OPENSSL_VERSION_MAJOR >= 3
531 EVP_PKEY *dh;
532#define bio_params( bio, dh ) dh = PEM_read_bio_Parameters( bio, &dh )
533#else
526 DH *dh;534 DH *dh;
535#define bio_params( bio, dh ) dh = PEM_read_bio_DHparams( bio, NULL, NULL, NULL )
536#endif
527 BIO *bio;537 BIO *bio;
528538
529 if (( bio=BIO_new_file( lt->lt_dhfile,"r" )) == NULL ) {539 if (( bio=BIO_new_file( lt->lt_dhfile,"r" )) == NULL ) {
@@ -533,7 +543,7 @@ tlso_ctx_init( struct ldapoptions *lo, struct ldaptls *lt, int is_server )
533 tlso_report_error();543 tlso_report_error();
534 return -1;544 return -1;
535 }545 }
536 if (!( dh=PEM_read_bio_DHparams( bio, NULL, NULL, NULL ))) {546 if (!( bio_params( bio, dh ))) {
537 Debug1( LDAP_DEBUG_ANY,547 Debug1( LDAP_DEBUG_ANY,
538 "TLS: could not read DH parameters file `%s'.\n",548 "TLS: could not read DH parameters file `%s'.\n",
539 lo->ldo_tls_dhfile );549 lo->ldo_tls_dhfile );
@@ -542,9 +552,13 @@ tlso_ctx_init( struct ldapoptions *lo, struct ldaptls *lt, int is_server )
542 return -1;552 return -1;
543 }553 }
544 BIO_free( bio );554 BIO_free( bio );
555#if OPENSSL_VERSION_MAJOR >= 3
556 SSL_CTX_set0_tmp_dh_pkey( ctx, dh );
557#else
545 SSL_CTX_set_tmp_dh( ctx, dh );558 SSL_CTX_set_tmp_dh( ctx, dh );
546 SSL_CTX_set_options( ctx, SSL_OP_SINGLE_DH_USE );559 SSL_CTX_set_options( ctx, SSL_OP_SINGLE_DH_USE );
547 DH_free( dh );560 DH_free( dh );
561#endif
548 }562 }
549563
550 if ( lo->ldo_tls_ecname ) {564 if ( lo->ldo_tls_ecname ) {
diff --git a/libraries/liblmdb/CHANGES b/libraries/liblmdb/CHANGES
index 6ff5d5f..76dd591 100644
--- a/libraries/liblmdb/CHANGES
+++ b/libraries/liblmdb/CHANGES
@@ -1,5 +1,8 @@
1LMDB 0.9 Change Log1LMDB 0.9 Change Log
22
3LMDB 0.9.31 Release (2023/07/10)
4 ITS#8447 - Fix cursor_put(MDB_CURRENT) on DUPSORT DB with different sized data
5
3LMDB 0.9.30 Release (2023/02/08)6LMDB 0.9.30 Release (2023/02/08)
4 ITS#9806 - LMDB page_split: key threshold depends on page size7 ITS#9806 - LMDB page_split: key threshold depends on page size
5 ITS#9916 - avoid gcc optimization bug on sparc64 linux8 ITS#9916 - avoid gcc optimization bug on sparc64 linux
diff --git a/libraries/liblmdb/lmdb.h b/libraries/liblmdb/lmdb.h
index 5f5d80a..ff03c22 100644
--- a/libraries/liblmdb/lmdb.h
+++ b/libraries/liblmdb/lmdb.h
@@ -200,7 +200,7 @@ typedef int mdb_filehandle_t;
200/** Library minor version */200/** Library minor version */
201#define MDB_VERSION_MINOR 9201#define MDB_VERSION_MINOR 9
202/** Library patch version */202/** Library patch version */
203#define MDB_VERSION_PATCH 30203#define MDB_VERSION_PATCH 31
204204
205/** Combine args a,b,c into a single integer for easy version comparisons */205/** Combine args a,b,c into a single integer for easy version comparisons */
206#define MDB_VERINT(a,b,c) (((a) << 24) | ((b) << 16) | (c))206#define MDB_VERINT(a,b,c) (((a) << 24) | ((b) << 16) | (c))
@@ -210,7 +210,7 @@ typedef int mdb_filehandle_t;
210 MDB_VERINT(MDB_VERSION_MAJOR,MDB_VERSION_MINOR,MDB_VERSION_PATCH)210 MDB_VERINT(MDB_VERSION_MAJOR,MDB_VERSION_MINOR,MDB_VERSION_PATCH)
211211
212/** The release date of this library version */212/** The release date of this library version */
213#define MDB_VERSION_DATE "February 8, 2023"213#define MDB_VERSION_DATE "July 10, 2023"
214214
215/** A stringifier for the version info */215/** A stringifier for the version info */
216#define MDB_VERSTR(a,b,c,d) "LMDB " #a "." #b "." #c ": (" d ")"216#define MDB_VERSTR(a,b,c,d) "LMDB " #a "." #b "." #c ": (" d ")"
diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c
index 9315171..deb6779 100644
--- a/libraries/liblmdb/mdb.c
+++ b/libraries/liblmdb/mdb.c
@@ -6963,11 +6963,14 @@ current:
6963 else if (!(mc->mc_flags & C_SUB))6963 else if (!(mc->mc_flags & C_SUB))
6964 memcpy(olddata.mv_data, data->mv_data, data->mv_size);6964 memcpy(olddata.mv_data, data->mv_data, data->mv_size);
6965 else {6965 else {
6966 if (key->mv_size != NODEKSZ(leaf))
6967 goto new_ksize;
6966 memcpy(NODEKEY(leaf), key->mv_data, key->mv_size);6968 memcpy(NODEKEY(leaf), key->mv_data, key->mv_size);
6967 goto fix_parent;6969 goto fix_parent;
6968 }6970 }
6969 return MDB_SUCCESS;6971 return MDB_SUCCESS;
6970 }6972 }
6973new_ksize:
6971 mdb_node_del(mc, 0);6974 mdb_node_del(mc, 0);
6972 }6975 }
69736976
diff --git a/libraries/librewrite/ldapmap.c b/libraries/librewrite/ldapmap.c
index 7d0252b..e62cd3a 100644
--- a/libraries/librewrite/ldapmap.c
+++ b/libraries/librewrite/ldapmap.c
@@ -343,6 +343,7 @@ do_bind:;
343 NULL, NULL, NULL );343 NULL, NULL, NULL );
344 if ( rc == LDAP_SERVER_DOWN && first_try ) {344 if ( rc == LDAP_SERVER_DOWN && first_try ) {
345 first_try = 0;345 first_try = 0;
346 ldap_unbind_ext( ld, NULL, NULL );
346 if ( ldap_initialize( &ld, data->lm_url ) != LDAP_SUCCESS ) {347 if ( ldap_initialize( &ld, data->lm_url ) != LDAP_SUCCESS ) {
347 rc = REWRITE_ERR;348 rc = REWRITE_ERR;
348 goto rc_return;349 goto rc_return;
@@ -360,11 +361,14 @@ do_bind:;
360 data->lm_attrs, 0, NULL, NULL, NULL, 1, &res );361 data->lm_attrs, 0, NULL, NULL, NULL, 1, &res );
361 if ( rc == LDAP_SERVER_DOWN && first_try ) {362 if ( rc == LDAP_SERVER_DOWN && first_try ) {
362 first_try = 0;363 first_try = 0;
363 if ( ldap_initialize( &ld, data->lm_url ) != LDAP_SUCCESS ) {364 ldap_unbind_ext( ld, NULL, NULL );
365 if ( ldap_initialize( &ld, data->lm_url ) != LDAP_SUCCESS ) {
364 rc = REWRITE_ERR;366 rc = REWRITE_ERR;
365 goto rc_return;367 goto rc_return;
366 }368 }
367 set_version = 1;369 set_version = 1;
370 ldap_msgfree( res );
371 res = NULL;
368 goto do_bind;372 goto do_bind;
369373
370 } else if ( rc != LDAP_SUCCESS ) {374 } else if ( rc != LDAP_SUCCESS ) {
@@ -373,7 +377,6 @@ do_bind:;
373 }377 }
374378
375 if ( ldap_count_entries( ld, res ) != 1 ) {379 if ( ldap_count_entries( ld, res ) != 1 ) {
376 ldap_msgfree( res );
377 rc = REWRITE_ERR;380 rc = REWRITE_ERR;
378 goto rc_return;381 goto rc_return;
379 }382 }
@@ -408,14 +411,14 @@ do_bind:;
408 }411 }
409 }412 }
410 413
411 ldap_msgfree( res );
412
413 if ( val->bv_val == NULL ) {414 if ( val->bv_val == NULL ) {
414 rc = REWRITE_ERR;415 rc = REWRITE_ERR;
415 goto rc_return;416 goto rc_return;
416 }417 }
417418
418rc_return:;419rc_return:;
420 ldap_msgfree( res );
421
419 if ( data->lm_when == MAP_LDAP_EVERYTIME ) {422 if ( data->lm_when == MAP_LDAP_EVERYTIME ) {
420 if ( ld != NULL ) {423 if ( ld != NULL ) {
421 ldap_unbind_ext( ld, NULL, NULL );424 ldap_unbind_ext( ld, NULL, NULL );
diff --git a/servers/slapd/at.c b/servers/slapd/at.c
index 99efba6..353a641 100644
--- a/servers/slapd/at.c
+++ b/servers/slapd/at.c
@@ -952,11 +952,15 @@ error_return:;
952 }952 }
953953
954 if ( oidm ) {954 if ( oidm ) {
955 if ( *err == at->at_oid )
956 *err = oidm;
955 SLAP_FREE( at->at_oid );957 SLAP_FREE( at->at_oid );
956 at->at_oid = oidm;958 at->at_oid = oidm;
957 }959 }
958960
959 if ( soidm ) {961 if ( soidm ) {
962 if ( *err == at->at_syntax_oid )
963 *err = soidm;
960 SLAP_FREE( at->at_syntax_oid );964 SLAP_FREE( at->at_syntax_oid );
961 at->at_syntax_oid = soidm;965 at->at_syntax_oid = soidm;
962 }966 }
diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c
index 52fe6ad..15d4a6a 100644
--- a/servers/slapd/bconfig.c
+++ b/servers/slapd/bconfig.c
@@ -5953,12 +5953,21 @@ config_back_add( Operation *op, SlapReply *rs )
5953 }5953 }
5954 }5954 }
59555955
5956 /*
5957 * ITS#10045 Pre-check for abandon but be willing to handle that the
5958 * operation might be abandoned while waiting for the server to pause.
5959 */
5956 if ( op->o_abandon ) {5960 if ( op->o_abandon ) {
5957 rs->sr_err = SLAPD_ABANDON;5961 rs->sr_err = SLAPD_ABANDON;
5962 dopause = 0;
5958 goto out;5963 goto out;
5959 }5964 }
5960 if ( slap_pause_server() < 0 )5965 if ( slap_pause_server() < 0 )
5961 dopause = 0;5966 dopause = 0;
5967 if ( op->o_abandon ) {
5968 rs->sr_err = SLAPD_ABANDON;
5969 goto out;
5970 }
59625971
5963 ldap_pvt_thread_rdwr_wlock( &cfb->cb_rwlock );5972 ldap_pvt_thread_rdwr_wlock( &cfb->cb_rwlock );
59645973
@@ -6011,10 +6020,11 @@ config_back_add( Operation *op, SlapReply *rs )
60116020
6012out2:;6021out2:;
6013 ldap_pvt_thread_rdwr_wunlock( &cfb->cb_rwlock );6022 ldap_pvt_thread_rdwr_wunlock( &cfb->cb_rwlock );
6023
6024out:;
6014 if ( dopause )6025 if ( dopause )
6015 slap_unpause_server();6026 slap_unpause_server();
60166027
6017out:;
6018 { int repl = op->o_dont_replicate;6028 { int repl = op->o_dont_replicate;
6019 if ( rs->sr_err == LDAP_COMPARE_TRUE ) {6029 if ( rs->sr_err == LDAP_COMPARE_TRUE ) {
6020 rs->sr_text = NULL; /* Set after config_add_internal */6030 rs->sr_text = NULL; /* Set after config_add_internal */
@@ -6490,12 +6500,21 @@ config_back_modify( Operation *op, SlapReply *rs )
6490 slap_mods_opattrs( op, &op->orm_modlist, 1 );6500 slap_mods_opattrs( op, &op->orm_modlist, 1 );
64916501
6492 if ( do_pause ) {6502 if ( do_pause ) {
6503 /*
6504 * ITS#10045 Pre-check for abandon but be willing to handle that the
6505 * operation might be abandoned while waiting for the server to pause.
6506 */
6493 if ( op->o_abandon ) {6507 if ( op->o_abandon ) {
6494 rs->sr_err = SLAPD_ABANDON;6508 rs->sr_err = SLAPD_ABANDON;
6509 do_pause = 0;
6495 goto out;6510 goto out;
6496 }6511 }
6497 if ( slap_pause_server() < 0 )6512 if ( slap_pause_server() < 0 )
6498 do_pause = 0;6513 do_pause = 0;
6514 if ( op->o_abandon ) {
6515 rs->sr_err = SLAPD_ABANDON;
6516 goto out;
6517 }
6499 }6518 }
6500 ldap_pvt_thread_rdwr_wlock( &cfb->cb_rwlock );6519 ldap_pvt_thread_rdwr_wlock( &cfb->cb_rwlock );
65016520
@@ -6530,9 +6549,9 @@ config_back_modify( Operation *op, SlapReply *rs )
6530 }6549 }
65316550
6532 ldap_pvt_thread_rdwr_wunlock( &cfb->cb_rwlock );6551 ldap_pvt_thread_rdwr_wunlock( &cfb->cb_rwlock );
6552out:
6533 if ( do_pause )6553 if ( do_pause )
6534 slap_unpause_server();6554 slap_unpause_server();
6535out:
6536 send_ldap_result( op, rs );6555 send_ldap_result( op, rs );
6537 slap_graduate_commit_csn( op );6556 slap_graduate_commit_csn( op );
6538 return rs->sr_err;6557 return rs->sr_err;
@@ -6662,12 +6681,21 @@ config_back_modrdn( Operation *op, SlapReply *rs )
6662 goto out;6681 goto out;
6663 }6682 }
66646683
6684 /*
6685 * ITS#10045 Pre-check for abandon but be willing to handle that the
6686 * operation might be abandoned while waiting for the server to pause.
6687 */
6665 if ( op->o_abandon ) {6688 if ( op->o_abandon ) {
6666 rs->sr_err = SLAPD_ABANDON;6689 rs->sr_err = SLAPD_ABANDON;
6690 dopause = 0;
6667 goto out;6691 goto out;
6668 }6692 }
6669 if ( slap_pause_server() < 0 )6693 if ( slap_pause_server() < 0 )
6670 dopause = 0;6694 dopause = 0;
6695 if ( op->o_abandon ) {
6696 rs->sr_err = SLAPD_ABANDON;
6697 goto out;
6698 }
66716699
6672 ldap_pvt_thread_rdwr_wlock( &cfb->cb_rwlock );6700 ldap_pvt_thread_rdwr_wlock( &cfb->cb_rwlock );
66736701
@@ -6737,9 +6765,9 @@ config_back_modrdn( Operation *op, SlapReply *rs )
67376765
6738 ldap_pvt_thread_rdwr_wunlock( &cfb->cb_rwlock );6766 ldap_pvt_thread_rdwr_wunlock( &cfb->cb_rwlock );
67396767
6768out:
6740 if ( dopause )6769 if ( dopause )
6741 slap_unpause_server();6770 slap_unpause_server();
6742out:
6743 send_ldap_result( op, rs );6771 send_ldap_result( op, rs );
6744 return rs->sr_err;6772 return rs->sr_err;
6745}6773}
@@ -6774,6 +6802,11 @@ config_back_delete( Operation *op, SlapReply *rs )
67746802
6775 ldap_pvt_thread_rdwr_wlock( &cfb->cb_rwlock );6803 ldap_pvt_thread_rdwr_wlock( &cfb->cb_rwlock );
67766804
6805 if ( op->o_abandon ) {
6806 rs->sr_err = SLAPD_ABANDON;
6807 goto out2;
6808 }
6809
6777 if ( ce->ce_type == Cft_Overlay ){6810 if ( ce->ce_type == Cft_Overlay ){
6778 overlay_remove( ce->ce_be, (slap_overinst *)ce->ce_bi, op );6811 overlay_remove( ce->ce_be, (slap_overinst *)ce->ce_bi, op );
6779 } else if ( ce->ce_type == Cft_Misc ) {6812 } else if ( ce->ce_type == Cft_Misc ) {
diff --git a/servers/slapd/overlays/constraint.c b/servers/slapd/overlays/constraint.c
index 1feff7a..c691f0b 100644
--- a/servers/slapd/overlays/constraint.c
+++ b/servers/slapd/overlays/constraint.c
@@ -816,7 +816,7 @@ constraint_add( Operation *op, SlapReply *rs )
816 int rc = 0;816 int rc = 0;
817 char *msg = NULL;817 char *msg = NULL;
818818
819 if (get_relax(op) || SLAPD_SYNC_IS_SYNCCONN( op->o_connid )) {819 if ( get_relax(op) || be_shadow_update( op ) ) {
820 return SLAP_CB_CONTINUE;820 return SLAP_CB_CONTINUE;
821 }821 }
822822
@@ -958,7 +958,7 @@ constraint_update( Operation *op, SlapReply *rs )
958 char *msg = NULL;958 char *msg = NULL;
959 int is_v;959 int is_v;
960960
961 if (get_relax(op) || SLAPD_SYNC_IS_SYNCCONN( op->o_connid )) {961 if ( get_relax(op) || be_shadow_update( op ) ) {
962 return SLAP_CB_CONTINUE;962 return SLAP_CB_CONTINUE;
963 }963 }
964964
diff --git a/servers/slapd/overlays/dynlist.c b/servers/slapd/overlays/dynlist.c
index 89425c7..10cacf9 100644
--- a/servers/slapd/overlays/dynlist.c
+++ b/servers/slapd/overlays/dynlist.c
@@ -99,6 +99,83 @@ ad_infilter( AttributeDescription *ad, Filter *f )
99 return 0;99 return 0;
100}100}
101101
102static Filter *
103transform_filter( Operation *op, dynlist_info_t *dli, int not, Filter *orig )
104{
105 Filter *f;
106 dynlist_map_t *dlm;
107
108 /* Tilt the filter towards TRUE if it could match through this dli */
109 int result = not ? LDAP_COMPARE_FALSE : LDAP_COMPARE_TRUE;
110
111 if ( orig ) {
112 f = orig;
113 } else {
114 f = orig = filter_dup( op->ors_filter, op->o_tmpmemctx );
115 }
116
117 switch( f->f_choice & SLAPD_FILTER_MASK ) {
118 case LDAP_FILTER_EQUALITY:
119 case LDAP_FILTER_GE:
120 case LDAP_FILTER_LE:
121 case LDAP_FILTER_APPROX:
122 for ( dlm = dli->dli_dlm; dlm; dlm = dlm->dlm_next ) {
123 AttributeDescription *ad = dlm->dlm_mapped_ad ? dlm->dlm_mapped_ad : dlm->dlm_member_ad;
124 if ( f->f_av_desc == ad ) {
125 filter_free_x( op, f, 0 );
126 f->f_choice = SLAPD_FILTER_COMPUTED;
127 f->f_result = result;
128 break;
129 }
130 }
131 break;
132 case LDAP_FILTER_PRESENT:
133 for ( dlm = dli->dli_dlm; dlm; dlm = dlm->dlm_next ) {
134 AttributeDescription *ad = dlm->dlm_mapped_ad ? dlm->dlm_mapped_ad : dlm->dlm_member_ad;
135 if ( f->f_sub_desc == ad ) {
136 filter_free_x( op, f, 0 );
137 f->f_choice = SLAPD_FILTER_COMPUTED;
138 f->f_result = result;
139 break;
140 }
141 }
142 break;
143 case LDAP_FILTER_SUBSTRINGS:
144 for ( dlm = dli->dli_dlm; dlm; dlm = dlm->dlm_next ) {
145 AttributeDescription *ad = dlm->dlm_mapped_ad ? dlm->dlm_mapped_ad : dlm->dlm_member_ad;
146 if ( f->f_desc == ad ) {
147 filter_free_x( op, f, 0 );
148 f->f_choice = SLAPD_FILTER_COMPUTED;
149 f->f_result = result;
150 break;
151 }
152 }
153 break;
154 case LDAP_FILTER_EXT:
155 for ( dlm = dli->dli_dlm; dlm; dlm = dlm->dlm_next ) {
156 AttributeDescription *ad = dlm->dlm_mapped_ad ? dlm->dlm_mapped_ad : dlm->dlm_member_ad;
157 if ( f->f_mr_desc == ad ) {
158 filter_free_x( op, f, 0 );
159 f->f_choice = SLAPD_FILTER_COMPUTED;
160 f->f_result = result;
161 break;
162 }
163 }
164 break;
165 case LDAP_FILTER_AND:
166 case LDAP_FILTER_OR:
167 for ( f = f->f_list; f; f = f->f_next )
168 transform_filter( op, dli, not, f );
169 break;
170 case LDAP_FILTER_NOT:
171 transform_filter( op, dli, !not, f->f_list );
172 case SLAPD_FILTER_COMPUTED:
173 break;
174 }
175
176 return orig;
177}
178
102typedef struct dynlist_filterinst_t {179typedef struct dynlist_filterinst_t {
103 AttributeAssertion *df_a;180 AttributeAssertion *df_a;
104 Entry *df_e;181 Entry *df_e;
@@ -1790,7 +1867,7 @@ dynlist_search( Operation *op, SlapReply *rs )
1790 dynlist_info_t *dli;1867 dynlist_info_t *dli;
1791 Operation o = *op;1868 Operation o = *op;
1792 dynlist_map_t *dlm;1869 dynlist_map_t *dlm;
1793 Filter f[3];1870 Filter f[4];
1794 AttributeAssertion ava[2];1871 AttributeAssertion ava[2];
1795 AttributeName an[2] = {0};1872 AttributeName an[2] = {0};
17961873
@@ -1908,27 +1985,45 @@ dynlist_search( Operation *op, SlapReply *rs )
1908 }1985 }
19091986
1910 if ( tmpwant ) {1987 if ( tmpwant ) {
1988 Filter *f_new = NULL;
1989
1990 if ( tmpwant == WANT_MEMBER ) {
1991 /*
1992 * If we only need to list groups, not their members, keep the
1993 * filter, assuming any references to mapped attributes make it
1994 * succeed.
1995 *
1996 * A nested groups search will indicate that it needs both.
1997 */
1998 f_new = transform_filter( op, dli, 0, NULL );
1999 }
19112000
1912 if ( static_oc ) {2001 if ( static_oc ) {
1913 f[0].f_choice = LDAP_FILTER_OR;2002 f[0].f_choice = LDAP_FILTER_AND;
1914 f[0].f_list = &f[1];2003 f[0].f_list = &f[1];
1915 f[0].f_next = NULL;2004 f[0].f_next = NULL;
1916 f[1].f_choice = LDAP_FILTER_EQUALITY;2005 f[1].f_choice = LDAP_FILTER_OR;
1917 f[1].f_next = &f[2];2006 f[1].f_list = &f[2];
1918 f[1].f_ava = &ava[0];2007 f[1].f_next = f_new;
1919 f[1].f_av_desc = slap_schema.si_ad_objectClass;
1920 f[1].f_av_value = dli->dli_oc->soc_cname;
1921 f[2].f_choice = LDAP_FILTER_EQUALITY;2008 f[2].f_choice = LDAP_FILTER_EQUALITY;
1922 f[2].f_ava = &ava[1];2009 f[2].f_next = &f[3];
2010 f[2].f_ava = &ava[0];
1923 f[2].f_av_desc = slap_schema.si_ad_objectClass;2011 f[2].f_av_desc = slap_schema.si_ad_objectClass;
1924 f[2].f_av_value = static_oc->soc_cname;2012 f[2].f_av_value = dli->dli_oc->soc_cname;
1925 f[2].f_next = NULL;2013 f[3].f_choice = LDAP_FILTER_EQUALITY;
2014 f[3].f_ava = &ava[1];
2015 f[3].f_av_desc = slap_schema.si_ad_objectClass;
2016 f[3].f_av_value = static_oc->soc_cname;
2017 f[3].f_next = NULL;
1926 } else {2018 } else {
1927 f[0].f_choice = LDAP_FILTER_EQUALITY;2019 f[0].f_choice = LDAP_FILTER_AND;
1928 f[0].f_ava = ava;2020 f[0].f_list = &f[1];
1929 f[0].f_av_desc = slap_schema.si_ad_objectClass;
1930 f[0].f_av_value = dli->dli_oc->soc_cname;
1931 f[0].f_next = NULL;2021 f[0].f_next = NULL;
2022 f[1].f_choice = LDAP_FILTER_EQUALITY;
2023 f[1].f_ava = ava;
2024 f[1].f_av_desc = slap_schema.si_ad_objectClass;
2025 f[1].f_av_value = dli->dli_oc->soc_cname;
2026 f[1].f_next = f_new;
1932 }2027 }
19332028
1934 if ( o.o_callback != sc ) {2029 if ( o.o_callback != sc ) {
@@ -1963,6 +2058,7 @@ dynlist_search( Operation *op, SlapReply *rs )
1963 }2058 }
1964 o.o_tmpfree( o.ors_filterstr.bv_val, o.o_tmpmemctx );2059 o.o_tmpfree( o.ors_filterstr.bv_val, o.o_tmpmemctx );
1965 o.ors_filterstr.bv_val = NULL;2060 o.ors_filterstr.bv_val = NULL;
2061 filter_free_x( &o, f_new, 1 );
1966 if ( found != ds->ds_found && nested )2062 if ( found != ds->ds_found && nested )
1967 dynlist_nestlink( op, ds );2063 dynlist_nestlink( op, ds );
1968 }2064 }
diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c
index 726eaeb..2b947e4 100644
--- a/servers/slapd/overlays/pcache.c
+++ b/servers/slapd/overlays/pcache.c
@@ -3841,8 +3841,8 @@ pc_cfadd( Operation *op, SlapReply *rs, Entry *p, ConfigArgs *ca )
38413841
3842 /* We can only create this entry if the database is table-driven3842 /* We can only create this entry if the database is table-driven
3843 */3843 */
3844 if ( cm->db.bd_info->bi_cf_ocs )3844 if ( cm->db.be_cf_ocs )
3845 config_build_entry( op, rs, pe, ca, &bv, cm->db.bd_info->bi_cf_ocs,3845 config_build_entry( op, rs, pe, ca, &bv, cm->db.be_cf_ocs,
3846 &pcocs[1] );3846 &pcocs[1] );
38473847
3848 return 0;3848 return 0;
diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c
index a3f2e70..48b9942 100644
--- a/servers/slapd/overlays/ppolicy.c
+++ b/servers/slapd/overlays/ppolicy.c
@@ -1617,7 +1617,8 @@ ppolicy_bind_response( Operation *op, SlapReply *rs )
1617 } else if ( ppb->pp.pwdMinDelay ) {1617 } else if ( ppb->pp.pwdMinDelay ) {
1618 int waittime = ppb->pp.pwdMinDelay << fc;1618 int waittime = ppb->pp.pwdMinDelay << fc;
1619 time_t wait_end;1619 time_t wait_end;
1620 struct berval lockout_stamp;1620 char lockout_stamp_buf[ LDAP_LUTIL_GENTIME_BUFSIZE ];
1621 struct berval lockout_stamp = BER_BVC(lockout_stamp_buf);
16211622
1622 if ( waittime > ppb->pp.pwdMaxDelay ) {1623 if ( waittime > ppb->pp.pwdMaxDelay ) {
1623 waittime = ppb->pp.pwdMaxDelay;1624 waittime = ppb->pp.pwdMaxDelay;
@@ -2223,7 +2224,7 @@ ppolicy_add(
2223 return rs->sr_err;2224 return rs->sr_err;
22242225
2225 /* If this is a replica, assume the provider checked everything */2226 /* If this is a replica, assume the provider checked everything */
2226 if ( SLAPD_SYNC_IS_SYNCCONN( op->o_connid ) )2227 if ( be_shadow_update( op ) )
2227 return SLAP_CB_CONTINUE;2228 return SLAP_CB_CONTINUE;
22282229
2229 ppolicy_get( op, op->ora_e, &pp );2230 ppolicy_get( op, op->ora_e, &pp );
@@ -2390,7 +2391,7 @@ ppolicy_modify( Operation *op, SlapReply *rs )
2390 /* If this is a replica, we may need to tweak some of the2391 /* If this is a replica, we may need to tweak some of the
2391 * provider's modifications. Otherwise, just pass it through.2392 * provider's modifications. Otherwise, just pass it through.
2392 */2393 */
2393 if ( SLAPD_SYNC_IS_SYNCCONN( op->o_connid ) ) {2394 if ( be_shadow_update( op ) ) {
2394 Modifications **prev;2395 Modifications **prev;
2395 Attribute *a_grace, *a_lock, *a_fail, *a_success;2396 Attribute *a_grace, *a_lock, *a_fail, *a_success;
23962397
diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c
index 1ff507c..5504c97 100644
--- a/servers/slapd/overlays/syncprov.c
+++ b/servers/slapd/overlays/syncprov.c
@@ -869,6 +869,11 @@ static void free_resinfo( syncres *sr )
869869
870#define FS_UNLINK 1870#define FS_UNLINK 1
871#define FS_LOCK 2871#define FS_LOCK 2
872#define FS_DEFER 4
873
874#define FSR_NOTFREE 0
875#define FSR_DIDFREE 1
876#define FSR_CANFREE 2
872877
873static int878static int
874syncprov_free_syncop( syncops *so, int flags )879syncprov_free_syncop( syncops *so, int flags )
@@ -879,12 +884,19 @@ syncprov_free_syncop( syncops *so, int flags )
879 if ( flags & FS_LOCK )884 if ( flags & FS_LOCK )
880 ldap_pvt_thread_mutex_lock( &so->s_mutex );885 ldap_pvt_thread_mutex_lock( &so->s_mutex );
881 /* already being freed, or still in use */886 /* already being freed, or still in use */
882 if ( !so->s_inuse || --so->s_inuse > 0 ) {887 if ( !so->s_inuse || so->s_inuse > 1 ) {
883 if ( flags & FS_LOCK )888 if ( flags & FS_LOCK )
884 ldap_pvt_thread_mutex_unlock( &so->s_mutex );889 ldap_pvt_thread_mutex_unlock( &so->s_mutex );
885 return 0;890 if ( !( flags & FS_DEFER ) && so->s_inuse )
891 so->s_inuse--;
892 return FSR_NOTFREE;
886 }893 }
887 ldap_pvt_thread_mutex_unlock( &so->s_mutex );894 ldap_pvt_thread_mutex_unlock( &so->s_mutex );
895
896 /* caller wants to cleanup other stuff before actual free */
897 if ( flags & FS_DEFER )
898 return FSR_CANFREE;
899
888 if (( flags & FS_UNLINK ) && so->s_si ) {900 if (( flags & FS_UNLINK ) && so->s_si ) {
889 syncops **sop;901 syncops **sop;
890 ldap_pvt_thread_mutex_lock( &so->s_si->si_ops_mutex );902 ldap_pvt_thread_mutex_lock( &so->s_si->si_ops_mutex );
@@ -912,7 +924,7 @@ syncprov_free_syncop( syncops *so, int flags )
912 }924 }
913 ldap_pvt_thread_mutex_destroy( &so->s_mutex );925 ldap_pvt_thread_mutex_destroy( &so->s_mutex );
914 ch_free( so );926 ch_free( so );
915 return 1;927 return FSR_DIDFREE;
916}928}
917929
918/* Send a persistent search response */930/* Send a persistent search response */
@@ -1027,6 +1039,9 @@ syncprov_qplay( Operation *op, syncops *so )
1027 } else {1039 } else {
1028 rc = syncprov_sendresp( op, sr->s_info, so, sr->s_mode );1040 rc = syncprov_sendresp( op, sr->s_info, so, sr->s_mode );
1029 }1041 }
1042 } else {
1043 /* set rc so we don't do a new qstart */
1044 rc = 1;
1030 }1045 }
10311046
1032 free_resinfo( sr );1047 free_resinfo( sr );
@@ -1053,6 +1068,9 @@ syncprov_qplay( Operation *op, syncops *so )
1053 return rc;1068 return rc;
1054}1069}
10551070
1071static int
1072syncprov_drop_psearch( syncops *so, int lock );
1073
1056/* task for playing back queued responses */1074/* task for playing back queued responses */
1057static void *1075static void *
1058syncprov_qtask( void *ctx, void *arg )1076syncprov_qtask( void *ctx, void *arg )
@@ -1061,7 +1079,7 @@ syncprov_qtask( void *ctx, void *arg )
1061 OperationBuffer opbuf;1079 OperationBuffer opbuf;
1062 Operation *op;1080 Operation *op;
1063 BackendDB be;1081 BackendDB be;
1064 int rc;1082 int rc, flag, frc;
10651083
1066 op = &opbuf.ob_op;1084 op = &opbuf.ob_op;
1067 *op = *so->s_op;1085 *op = *so->s_op;
@@ -1090,14 +1108,24 @@ syncprov_qtask( void *ctx, void *arg )
1090 if ( !rc && !so->s_res )1108 if ( !rc && !so->s_res )
1091 rc = 1;1109 rc = 1;
10921110
1111 flag = FS_UNLINK;
1112 if ( rc && op->o_abandon )
1113 flag = FS_DEFER;
1114
1093 /* decrement use count... */1115 /* decrement use count... */
1094 if ( !syncprov_free_syncop( so, FS_UNLINK )) {1116 frc = syncprov_free_syncop( so, flag );
1117 if ( frc == FSR_NOTFREE ) {
1095 if ( rc )1118 if ( rc )
1096 /* if we didn't unlink, and task is no longer queued, clear flag */1119 /* if we didn't unlink, and task is no longer queued, clear flag */
1097 so->s_flags ^= PS_TASK_QUEUED;1120 so->s_flags ^= PS_TASK_QUEUED;
1098 ldap_pvt_thread_mutex_unlock( &so->s_mutex );1121 ldap_pvt_thread_mutex_unlock( &so->s_mutex );
1099 }1122 }
11001123
1124 /* if we got abandoned while processing, cleanup now */
1125 if ( frc == FSR_CANFREE ) {
1126 syncprov_drop_psearch( so, 1 );
1127 }
1128
1101 return NULL;1129 return NULL;
1102}1130}
11031131
@@ -1272,7 +1300,9 @@ syncprov_op_abandon( Operation *op, SlapReply *rs )
1272 return SLAP_CB_CONTINUE;1300 return SLAP_CB_CONTINUE;
1273 }1301 }
1274 }1302 }
1275 syncprov_drop_psearch( so, 0 );1303 /* if task is active, it must drop itself */
1304 if ( !( so->s_flags & PS_TASK_QUEUED ))
1305 syncprov_drop_psearch( so, 0 );
1276 }1306 }
1277 return SLAP_CB_CONTINUE;1307 return SLAP_CB_CONTINUE;
1278}1308}
diff --git a/servers/slapd/overlays/translucent.c b/servers/slapd/overlays/translucent.c
index 2d31bb0..09b12dc 100644
--- a/servers/slapd/overlays/translucent.c
+++ b/servers/slapd/overlays/translucent.c
@@ -176,9 +176,9 @@ translucent_cfadd( Operation *op, SlapReply *rs, Entry *e, ConfigArgs *ca )
176176
177 /* We can only create this entry if the database is table-driven177 /* We can only create this entry if the database is table-driven
178 */178 */
179 if ( ov->db.bd_info->bi_cf_ocs )179 if ( ov->db.be_cf_ocs )
180 config_build_entry( op, rs, cei, ca, &bv,180 config_build_entry( op, rs, cei, ca, &bv,
181 ov->db.bd_info->bi_cf_ocs,181 ov->db.be_cf_ocs,
182 &translucentocs[1] );182 &translucentocs[1] );
183183
184 return 0;184 return 0;
diff --git a/servers/slapd/overlays/unique.c b/servers/slapd/overlays/unique.c
index 7a7c8fb..7ff128a 100644
--- a/servers/slapd/overlays/unique.c
+++ b/servers/slapd/overlays/unique.c
@@ -1073,7 +1073,7 @@ unique_add(
1073 Debug(LDAP_DEBUG_TRACE, "==> unique_add <%s>\n",1073 Debug(LDAP_DEBUG_TRACE, "==> unique_add <%s>\n",
1074 op->o_req_dn.bv_val );1074 op->o_req_dn.bv_val );
10751075
1076 if ( SLAPD_SYNC_IS_SYNCCONN( op->o_connid ) || (1076 if ( be_shadow_update( op ) || (
1077 get_relax(op) > SLAP_CONTROL_IGNORED1077 get_relax(op) > SLAP_CONTROL_IGNORED
1078 && access_allowed( op, op->ora_e,1078 && access_allowed( op, op->ora_e,
1079 slap_schema.si_ad_entry, NULL,1079 slap_schema.si_ad_entry, NULL,
@@ -1225,7 +1225,7 @@ unique_modify(
1225 return rc;1225 return rc;
1226 }1226 }
12271227
1228 if ( SLAPD_SYNC_IS_SYNCCONN( op->o_connid ) ) {1228 if ( be_shadow_update( op ) ) {
1229 return rc;1229 return rc;
1230 }1230 }
1231 if ( get_relax(op) > SLAP_CONTROL_IGNORED1231 if ( get_relax(op) > SLAP_CONTROL_IGNORED
@@ -1365,7 +1365,7 @@ unique_modrdn(
1365 Debug(LDAP_DEBUG_TRACE, "==> unique_modrdn <%s> <%s>\n",1365 Debug(LDAP_DEBUG_TRACE, "==> unique_modrdn <%s> <%s>\n",
1366 op->o_req_dn.bv_val, op->orr_newrdn.bv_val );1366 op->o_req_dn.bv_val, op->orr_newrdn.bv_val );
13671367
1368 if ( SLAPD_SYNC_IS_SYNCCONN( op->o_connid ) ) {1368 if ( be_shadow_update( op ) ) {
1369 return rc;1369 return rc;
1370 }1370 }
1371 if ( get_relax(op) > SLAP_CONTROL_IGNORED1371 if ( get_relax(op) > SLAP_CONTROL_IGNORED
diff --git a/servers/slapd/passwd.c b/servers/slapd/passwd.c
index eef5b09..b6b1ddb 100644
--- a/servers/slapd/passwd.c
+++ b/servers/slapd/passwd.c
@@ -291,6 +291,8 @@ old_good:
291 } else {291 } else {
292 slap_callback **sc;292 slap_callback **sc;
293293
294 cb.sc_next = op->o_callback;
295
294 op->o_tag = LDAP_REQ_MODIFY;296 op->o_tag = LDAP_REQ_MODIFY;
295 op->o_callback = &cb;297 op->o_callback = &cb;
296 op->orm_modlist = qpw->rs_mods;298 op->orm_modlist = qpw->rs_mods;
diff --git a/servers/slapd/pwmods/README.argon2 b/servers/slapd/pwmods/README.argon2
index 595c50d..33c562b 100644
--- a/servers/slapd/pwmods/README.argon2
+++ b/servers/slapd/pwmods/README.argon2
@@ -15,28 +15,16 @@ Both hash the password "secret", the first using the salt "saltsalt", the second
15Building15Building
16--------16--------
1717
181) Customize the OPENLDAP variable in Makefile to point to the OpenLDAP18This module is now part of regular OpenLDAP build process and enabled if
19source root.19libsodium or libargon2 library and the corresponding development headers are
2020present. You can also choose the library to build against if you prefer by
21For initial testing you might also want to edit DEFS to define21passing --enable-argon2=<libsodium|libargon2> to your configure invocation.
22SLAPD_ARGON2_DEBUG, which enables logging to stderr (don't leave this on
23in production, as it prints passwords in cleartext).
24
252) Run 'make' to produce argon2.so
26
273) Copy argon2.so somewhere permanent.
28
294) Edit your slapd.conf (eg. /etc/ldap/slapd.conf), and add:
30
31moduleload ...path/to/argon2.so
32
335) Restart slapd.
34
3522
36Configuring23Configuring
37-----------24-----------
3825
39The {ARGON2} password scheme should now be recognised.26Load the argon2 module (e.g. with olcModuleLoad or moduleload) and the
27{ARGON2} password scheme should now be recognised.
4028
41You can also tell OpenLDAP to use one of this scheme when processing LDAP29You can also tell OpenLDAP to use one of this scheme when processing LDAP
42Password Modify Extended Operations, thanks to the password-hash option in30Password Modify Extended Operations, thanks to the password-hash option in
diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c
index 5fceb63..3b02a3b 100644
--- a/servers/slapd/syncrepl.c
+++ b/servers/slapd/syncrepl.c
@@ -604,8 +604,10 @@ ldap_sync_search(
604 lattrs[2] = NULL;604 lattrs[2] = NULL;
605 rc = ldap_search_ext_s( si->si_ld, "", LDAP_SCOPE_BASE, generic_filterstr.bv_val, lattrs, 0,605 rc = ldap_search_ext_s( si->si_ld, "", LDAP_SCOPE_BASE, generic_filterstr.bv_val, lattrs, 0,
606 NULL, NULL, NULL, si->si_slimit, &res );606 NULL, NULL, NULL, si->si_slimit, &res );
607 if ( rc )607 if ( rc ) {
608 ldap_msgfree( res );
608 return rc;609 return rc;
610 }
609 msg = ldap_first_message( si->si_ld, res );611 msg = ldap_first_message( si->si_ld, res );
610 if ( msg && ldap_msgtype( msg ) == LDAP_RES_SEARCH_ENTRY ) {612 if ( msg && ldap_msgtype( msg ) == LDAP_RES_SEARCH_ENTRY ) {
611 BerElement *ber = NULL;613 BerElement *ber = NULL;
diff --git a/servers/slapd/syslog.c b/servers/slapd/syslog.c
index 47ea1c6..50f3053 100644
--- a/servers/slapd/syslog.c
+++ b/servers/slapd/syslog.c
@@ -209,7 +209,7 @@ openlog(const char *ident, int logstat, int logfac)
209}209}
210210
211void211void
212closelog()212closelog(void)
213{213{
214 (void)close(LogFile);214 (void)close(LogFile);
215 LogFile = -1;215 LogFile = -1;
diff --git a/tests/progs/slapd-mtread.c b/tests/progs/slapd-mtread.c
index 587d3cf..bf6014a 100644
--- a/tests/progs/slapd-mtread.c
+++ b/tests/progs/slapd-mtread.c
@@ -528,6 +528,7 @@ do_random( LDAP *ld,
528 if ( rc ) {528 if ( rc ) {
529 tester_ldap_error( ld, "ldap_search_ext_s", NULL );529 tester_ldap_error( ld, "ldap_search_ext_s", NULL );
530 }530 }
531 ldap_msgfree( res );
531 break;532 break;
532 }533 }
533534
@@ -566,6 +567,7 @@ do_random( LDAP *ld,
566567
567 default:568 default:
568 tester_ldap_error( ld, "ldap_search_ext_s", NULL );569 tester_ldap_error( ld, "ldap_search_ext_s", NULL );
570 ldap_msgfree( res );
569 break;571 break;
570 }572 }
571573
diff --git a/tests/progs/slapd-search.c b/tests/progs/slapd-search.c
index 13a2818..f849199 100644
--- a/tests/progs/slapd-search.c
+++ b/tests/progs/slapd-search.c
@@ -214,6 +214,7 @@ do_random( struct tester_conn_args *config,
214 if ( rc ) {214 if ( rc ) {
215 tester_ldap_error( ld, "ldap_search_ext_s", NULL );215 tester_ldap_error( ld, "ldap_search_ext_s", NULL );
216 }216 }
217 ldap_msgfree( res );
217 break;218 break;
218 }219 }
219220
@@ -270,6 +271,7 @@ do_random( struct tester_conn_args *config,
270271
271 default:272 default:
272 tester_ldap_error( ld, "ldap_search_ext_s", NULL );273 tester_ldap_error( ld, "ldap_search_ext_s", NULL );
274 ldap_msgfree( res );
273 break;275 break;
274 }276 }
275277
diff --git a/tests/progs/slapd-watcher.c b/tests/progs/slapd-watcher.c
index 0fed11f..3c315d7 100644
--- a/tests/progs/slapd-watcher.c
+++ b/tests/progs/slapd-watcher.c
@@ -537,7 +537,6 @@ setup_server( struct tester_conn_args *config, server *sv, int first )
537 }537 }
538 }538 }
539 }539 }
540 ldap_msgfree( res );
541 break;540 break;
542541
543 default:542 default:
@@ -545,6 +544,7 @@ setup_server( struct tester_conn_args *config, server *sv, int first )
545 if ( first )544 if ( first )
546 exit( EXIT_FAILURE );545 exit( EXIT_FAILURE );
547 }546 }
547 ldap_msgfree( res );
548 }548 }
549 }549 }
550550
diff --git a/tests/scripts/lloadd/test001-backend-issues b/tests/scripts/lloadd/test001-backend-issues
index 9b0b0b2..b7f99fc 100755
--- a/tests/scripts/lloadd/test001-backend-issues
+++ b/tests/scripts/lloadd/test001-backend-issues
@@ -55,6 +55,7 @@ $SLAPADD -f $CONF3 -l $LDIFORDERED
55RC=$?55RC=$?
56if test $RC != 0 ; then56if test $RC != 0 ; then
57 echo "slapadd failed ($RC)!"57 echo "slapadd failed ($RC)!"
58 test $KILLSERVERS != no && kill -HUP $KILLPIDS
58 exit $RC59 exit $RC
59fi60fi
6061
diff --git a/tests/scripts/lloadd/test002-load b/tests/scripts/lloadd/test002-load
index 942f6bc..2de04d6 100755
--- a/tests/scripts/lloadd/test002-load
+++ b/tests/scripts/lloadd/test002-load
@@ -74,6 +74,7 @@ $SLAPADD -f $CONF3 -l $LDIFORDERED
74RC=$?74RC=$?
75if test $RC != 0 ; then75if test $RC != 0 ; then
76 echo "slapadd failed ($RC)!"76 echo "slapadd failed ($RC)!"
77 test $KILLSERVERS != no && kill -HUP $KILLPIDS
77 exit $RC78 exit $RC
78fi79fi
7980
diff --git a/tests/scripts/lloadd/test003-cnconfig b/tests/scripts/lloadd/test003-cnconfig
index edf5801..b578b96 100755
--- a/tests/scripts/lloadd/test003-cnconfig
+++ b/tests/scripts/lloadd/test003-cnconfig
@@ -75,6 +75,7 @@ $SLAPADD -f $CONF3 -l $LDIFORDERED
75RC=$?75RC=$?
76if test $RC != 0 ; then76if test $RC != 0 ; then
77 echo "slapadd failed ($RC)!"77 echo "slapadd failed ($RC)!"
78 test $KILLSERVERS != no && kill -HUP $KILLPIDS
78 exit $RC79 exit $RC
79fi80fi
8081
diff --git a/tests/scripts/lloadd/test004-monitor b/tests/scripts/lloadd/test004-monitor
index d1db7c1..5fe9276 100755
--- a/tests/scripts/lloadd/test004-monitor
+++ b/tests/scripts/lloadd/test004-monitor
@@ -87,6 +87,7 @@ $SLAPADD -f $CONF3 -l $LDIFORDERED
87RC=$?87RC=$?
88if test $RC != 0 ; then88if test $RC != 0 ; then
89 echo "slapadd failed ($RC)!"89 echo "slapadd failed ($RC)!"
90 test $KILLSERVERS != no && kill -HUP $KILLPIDS
90 exit $RC91 exit $RC
91fi92fi
9293
diff --git a/tests/scripts/test049-sync-config b/tests/scripts/test049-sync-config
index 88a57b9..b05e041 100755
--- a/tests/scripts/test049-sync-config
+++ b/tests/scripts/test049-sync-config
@@ -61,6 +61,12 @@ esac
61echo "Starting provider slapd on TCP/IP port $PORT1..."61echo "Starting provider slapd on TCP/IP port $PORT1..."
62. $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF62. $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF
63$SLAPADD -F $CFPRO -n 0 -l $CONFLDIF63$SLAPADD -F $CFPRO -n 0 -l $CONFLDIF
64RC=$?
65if test $RC != 0 ; then
66 echo "slapadd failed ($RC)!"
67 exit $RC
68fi
69
64cd $PRODIR70cd $PRODIR
65$SLAPD -F ./slapd.d -h $URI1 -d $LVL > $LOG1 2>&1 &71$SLAPD -F ./slapd.d -h $URI1 -d $LVL > $LOG1 2>&1 &
66PID=$!72PID=$!
@@ -134,6 +140,13 @@ fi
134140
135echo "Starting consumer slapd on TCP/IP port $PORT2..."141echo "Starting consumer slapd on TCP/IP port $PORT2..."
136$SLAPADD -F $CFCON -n 0 -l $CONFLDIF142$SLAPADD -F $CFCON -n 0 -l $CONFLDIF
143RC=$?
144if test $RC != 0 ; then
145 echo "slapadd failed ($RC)!"
146 test $KILLSERVERS != no && kill -HUP $KILLPIDS
147 exit $RC
148fi
149
137cd $CONDIR150cd $CONDIR
138$SLAPD -F ./slapd.d -h $URI2 -d $LVL > $LOG2 2>&1 &151$SLAPD -F ./slapd.d -h $URI2 -d $LVL > $LOG2 2>&1 &
139CONSUMERPID=$!152CONSUMERPID=$!
diff --git a/tests/scripts/test050-syncrepl-multiprovider b/tests/scripts/test050-syncrepl-multiprovider
index d32ae66..065c86a 100755
--- a/tests/scripts/test050-syncrepl-multiprovider
+++ b/tests/scripts/test050-syncrepl-multiprovider
@@ -79,6 +79,11 @@ objectClass: olcDatabaseConfig
79olcDatabase: {0}config79olcDatabase: {0}config
80olcRootPW:< file://$CONFIGPWF80olcRootPW:< file://$CONFIGPWF
81EOF81EOF
82RC=$?
83if test $RC != 0 ; then
84 echo "slapadd failed ($RC)!"
85 exit $RC
86fi
8287
83n=`expr $n + 1`88n=`expr $n + 1`
84done89done
diff --git a/tests/scripts/test053-syncprov-glue b/tests/scripts/test053-syncprov-glue
index a75a318..3caa0d4 100755
--- a/tests/scripts/test053-syncprov-glue
+++ b/tests/scripts/test053-syncprov-glue
@@ -74,6 +74,11 @@ olcDatabase: {0}config
74olcRootPW:< file://$CONFIGPWF74olcRootPW:< file://$CONFIGPWF
7575
76EOF76EOF
77RC=$?
78if test $RC != 0 ; then
79 echo "slapadd failed ($RC)!"
80 exit $RC
81fi
7782
78echo "Initializing provider2 configurations..."83echo "Initializing provider2 configurations..."
79$SLAPADD -F $CFPRO2 -n 0 <<EOF84$SLAPADD -F $CFPRO2 -n 0 <<EOF
@@ -87,6 +92,11 @@ olcDatabase: {0}config
87olcRootPW:< file://$CONFIGPWF92olcRootPW:< file://$CONFIGPWF
8893
89EOF94EOF
95RC=$?
96if test $RC != 0 ; then
97 echo "slapadd failed ($RC)!"
98 exit $RC
99fi
90100
91$SLAPADD -F $CFCONS -n 0 <<EOF101$SLAPADD -F $CFCONS -n 0 <<EOF
92dn: cn=config102dn: cn=config
@@ -98,6 +108,11 @@ objectClass: olcDatabaseConfig
98olcDatabase: {0}config108olcDatabase: {0}config
99olcRootPW:< file://$CONFIGPWF109olcRootPW:< file://$CONFIGPWF
100EOF110EOF
111RC=$?
112if test $RC != 0 ; then
113 echo "slapadd failed ($RC)!"
114 exit $RC
115fi
101116
102echo "Starting provider slapd on TCP/IP port $PORT1..."117echo "Starting provider slapd on TCP/IP port $PORT1..."
103cd $PRODDIR118cd $PRODDIR
diff --git a/tests/scripts/test058-syncrepl-asymmetric b/tests/scripts/test058-syncrepl-asymmetric
index 22015a7..f950761 100755
--- a/tests/scripts/test058-syncrepl-asymmetric
+++ b/tests/scripts/test058-syncrepl-asymmetric
@@ -175,6 +175,12 @@ olcDatabase: {0}config
175olcRootPW:< file://$CONFIGPWF175olcRootPW:< file://$CONFIGPWF
176176
177EOF177EOF
178 RC=$?
179 if test $RC != 0 ; then
180 echo "slapadd failed ($RC)!"
181 exit $RC
182 fi
183
178 ID=`expr $ID + 1`184 ID=`expr $ID + 1`
179done185done
180186
@@ -191,6 +197,12 @@ olcDatabase: {0}config
191olcRootPW:< file://$CONFIGPWF197olcRootPW:< file://$CONFIGPWF
192198
193EOF199EOF
200
201RC=$?
202if test $RC != 0 ; then
203 echo "slapadd failed ($RC)!"
204 exit $RC
205fi
194done206done
195207
196echo "Starting central provider slapd on TCP/IP port $PORT1..."208echo "Starting central provider slapd on TCP/IP port $PORT1..."
diff --git a/tests/scripts/test059-consumer-config b/tests/scripts/test059-consumer-config
index 56848db..30e87e4 100755
--- a/tests/scripts/test059-consumer-config
+++ b/tests/scripts/test059-consumer-config
@@ -57,6 +57,12 @@ esac
57echo "Starting provider slapd on TCP/IP port $PORT1..."57echo "Starting provider slapd on TCP/IP port $PORT1..."
58. $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF58. $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF
59$SLAPADD -F $CFPRO -n 0 -l $CONFLDIF59$SLAPADD -F $CFPRO -n 0 -l $CONFLDIF
60RC=$?
61if test $RC != 0 ; then
62 echo "slapadd failed ($RC)!"
63 exit $RC
64fi
65
60$SLAPD -F $CFPRO -h $URI1 -d $LVL > $LOG1 2>&1 &66$SLAPD -F $CFPRO -h $URI1 -d $LVL > $LOG1 2>&1 &
61PID=$!67PID=$!
62if test $WAIT != 0 ; then68if test $WAIT != 0 ; then
@@ -182,6 +188,13 @@ fi
182188
183echo "Starting consumer slapd on TCP/IP port $PORT2..."189echo "Starting consumer slapd on TCP/IP port $PORT2..."
184$SLAPADD -F $CFCON -n 0 -l $CONFLDIF190$SLAPADD -F $CFCON -n 0 -l $CONFLDIF
191RC=$?
192if test $RC != 0 ; then
193 echo "slapadd failed ($RC)!"
194 test $KILLSERVERS != no && kill -HUP $KILLPIDS
195 exit $RC
196fi
197
185$SLAPD -F $CFCON -h $URI2 -d $LVL > $LOG2 2>&1 &198$SLAPD -F $CFCON -h $URI2 -d $LVL > $LOG2 2>&1 &
186CONSUMERPID=$!199CONSUMERPID=$!
187if test $WAIT != 0 ; then200if test $WAIT != 0 ; then
diff --git a/tests/scripts/test061-syncreplication-initiation b/tests/scripts/test061-syncreplication-initiation
index a8ce51c..3e3b973 100755
--- a/tests/scripts/test061-syncreplication-initiation
+++ b/tests/scripts/test061-syncreplication-initiation
@@ -82,6 +82,12 @@ olcDatabase: {0}config
82olcRootPW:< file://$CONFIGPWF82olcRootPW:< file://$CONFIGPWF
8383
84EOF84EOF
85
86 RC=$?
87 if test $RC != 0 ; then
88 echo "slapadd failed ($RC)!"
89 exit $RC
90 fi
85done91done
8692
87echo "Starting provider slapd on $PROV_URI"93echo "Starting provider slapd on $PROV_URI"
diff --git a/tests/scripts/test062-config-delete b/tests/scripts/test062-config-delete
index dde8acd..afb87c4 100755
--- a/tests/scripts/test062-config-delete
+++ b/tests/scripts/test062-config-delete
@@ -39,6 +39,12 @@ $SLAPPASSWD -g -n >$CONFIGPWF
39echo "Starting slapd on TCP/IP port $PORT1... $PWD"39echo "Starting slapd on TCP/IP port $PORT1... $PWD"
40. $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF40. $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF
41$SLAPADD -F $CONFDIR -n 0 -l $CONFLDIF41$SLAPADD -F $CONFDIR -n 0 -l $CONFLDIF
42RC=$?
43if test $RC != 0 ; then
44 echo "slapadd failed ($RC)!"
45 exit $RC
46fi
47
42cd $TESTDIR48cd $TESTDIR
43$SLAPD -F ./slapd.d -h $URI1 -d $LVL > $LOG1 2>&1 &49$SLAPD -F ./slapd.d -h $URI1 -d $LVL > $LOG1 2>&1 &
44PID=$!50PID=$!
diff --git a/tests/scripts/test063-delta-multiprovider b/tests/scripts/test063-delta-multiprovider
index df4bdd1..8ce5906 100755
--- a/tests/scripts/test063-delta-multiprovider
+++ b/tests/scripts/test063-delta-multiprovider
@@ -214,6 +214,12 @@ olcDatabase: {3}monitor
214EOF214EOF
215215
216$SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1216$SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1
217RC=$?
218if test $RC != 0 ; then
219 echo "slapadd failed ($RC)!"
220 exit $RC
221fi
222
217PORT=`eval echo '$PORT'$n`223PORT=`eval echo '$PORT'$n`
218echo "Starting server $n on TCP/IP port $PORT..."224echo "Starting server $n on TCP/IP port $PORT..."
219cd ${XDIR}${n}225cd ${XDIR}${n}
diff --git a/tests/scripts/test064-constraint b/tests/scripts/test064-constraint
index c263cf9..5519123 100755
--- a/tests/scripts/test064-constraint
+++ b/tests/scripts/test064-constraint
@@ -120,6 +120,11 @@ olcConstraintAttribute: uid
120EOF120EOF
121121
122$SLAPADD -F $CONFDIR -n 0 -l $TESTDIR/config.ldif122$SLAPADD -F $CONFDIR -n 0 -l $TESTDIR/config.ldif
123RC=$?
124if test $RC != 0 ; then
125 echo "slapadd failed ($RC)!"
126 exit $RC
127fi
123128
124echo "Starting slapd on TCP/IP port $PORT1..."129echo "Starting slapd on TCP/IP port $PORT1..."
125$SLAPD -F $CONFDIR -h $URI1 -d $LVL > $LOG1 2>&1 &130$SLAPD -F $CONFDIR -h $URI1 -d $LVL > $LOG1 2>&1 &
diff --git a/tests/scripts/test066-autoca b/tests/scripts/test066-autoca
index fd23140..dd8b502 100755
--- a/tests/scripts/test066-autoca
+++ b/tests/scripts/test066-autoca
@@ -47,6 +47,12 @@ $SLAPPASSWD -g -n >$CONFIGPWF
47echo "Starting slapd on TCP/IP port $PORT1..."47echo "Starting slapd on TCP/IP port $PORT1..."
48. $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF48. $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF
49$SLAPADD -F $CFDIR -n 0 -l $CONFLDIF49$SLAPADD -F $CFDIR -n 0 -l $CONFLDIF
50RC=$?
51if test $RC != 0 ; then
52 echo "slapadd failed ($RC)!"
53 exit $RC
54fi
55
50$SLAPD -F $CFDIR -h $URIP1 -d $LVL > $LOG1 2>&1 &56$SLAPD -F $CFDIR -h $URIP1 -d $LVL > $LOG1 2>&1 &
51PID=$!57PID=$!
52if test $WAIT != 0 ; then58if test $WAIT != 0 ; then
diff --git a/tests/scripts/test069-delta-multiprovider-starttls b/tests/scripts/test069-delta-multiprovider-starttls
index 2f5a0d3..277c0a7 100755
--- a/tests/scripts/test069-delta-multiprovider-starttls
+++ b/tests/scripts/test069-delta-multiprovider-starttls
@@ -195,7 +195,14 @@ olcAccessLogOps: writes
195olcAccessLogSuccess: TRUE195olcAccessLogSuccess: TRUE
196196
197EOF197EOF
198
198$SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1199$SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1
200RC=$?
201if test $RC != 0 ; then
202 echo "slapadd failed ($RC)!"
203 exit $RC
204fi
205
199PORT=`eval echo '$PORT'$n`206PORT=`eval echo '$PORT'$n`
200echo "Starting server $n on TCP/IP port $PORT..."207echo "Starting server $n on TCP/IP port $PORT..."
201cd ${XDIR}${n}208cd ${XDIR}${n}
diff --git a/tests/scripts/test070-delta-multiprovider-ldaps b/tests/scripts/test070-delta-multiprovider-ldaps
index 18869d1..3fb96cc 100755
--- a/tests/scripts/test070-delta-multiprovider-ldaps
+++ b/tests/scripts/test070-delta-multiprovider-ldaps
@@ -195,6 +195,12 @@ olcAccessLogSuccess: TRUE
195195
196EOF196EOF
197$SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1197$SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1
198RC=$?
199if test $RC != 0 ; then
200 echo "slapadd failed ($RC)!"
201 exit $RC
202fi
203
198PORT=`eval echo '$PORT'$n`204PORT=`eval echo '$PORT'$n`
199echo "Starting server $n on TCP/IP port $PORT..."205echo "Starting server $n on TCP/IP port $PORT..."
200cd ${XDIR}${n}206cd ${XDIR}${n}
diff --git a/tests/scripts/test071-dirsync b/tests/scripts/test071-dirsync
index 9f5aede..455629b 100755
--- a/tests/scripts/test071-dirsync
+++ b/tests/scripts/test071-dirsync
@@ -88,6 +88,13 @@ objectclass: dcObject
88o: OpenLDAP Testing88o: OpenLDAP Testing
8989
90EOMODS90EOMODS
91RC=$?
92if test $RC != 0 ; then
93 echo "slapadd failed ($RC)!"
94 test $KILLSERVERS != no && kill -HUP $KILLPIDS
95 exit $RC
96fi
97
91$SLAPD -f $CONF2 -h $URI2 -d $LVL > $LOG2 2>&1 &98$SLAPD -f $CONF2 -h $URI2 -d $LVL > $LOG2 2>&1 &
92CONSUMERPID=$!99CONSUMERPID=$!
93if test $WAIT != 0 ; then100if test $WAIT != 0 ; then
diff --git a/tests/scripts/test076-authid-rewrite b/tests/scripts/test076-authid-rewrite
index 7799d88..383e4c3 100755
--- a/tests/scripts/test076-authid-rewrite
+++ b/tests/scripts/test076-authid-rewrite
@@ -31,6 +31,12 @@ $SLAPPASSWD -g -n >$CONFIGPWF
31echo "Starting slapd on TCP/IP port $PORT1... $PWD"31echo "Starting slapd on TCP/IP port $PORT1... $PWD"
32. $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF32. $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF
33$SLAPADD -F $CONFDIR -n 0 -l $CONFLDIF33$SLAPADD -F $CONFDIR -n 0 -l $CONFLDIF
34RC=$?
35if test $RC != 0 ; then
36 echo "slapadd failed ($RC)!"
37 exit $RC
38fi
39
34cd $TESTDIR40cd $TESTDIR
35$SLAPD -F ./slapd.d -h $URI1 -d $LVL > $LOG1 2>&1 &41$SLAPD -F ./slapd.d -h $URI1 -d $LVL > $LOG1 2>&1 &
36PID=$!42PID=$!
diff --git a/tests/scripts/test078-persistent-sessionlog b/tests/scripts/test078-persistent-sessionlog
index acb8fad..8f3d07f 100755
--- a/tests/scripts/test078-persistent-sessionlog
+++ b/tests/scripts/test078-persistent-sessionlog
@@ -185,6 +185,12 @@ olcAccessLogSuccess: TRUE
185185
186EOF186EOF
187$SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1187$SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1
188RC=$?
189if test $RC != 0 ; then
190 echo "slapadd failed ($RC)!"
191 exit $RC
192fi
193
188PORT=`eval echo '$PORT'$n`194PORT=`eval echo '$PORT'$n`
189echo "Starting server $n on TCP/IP port $PORT..."195echo "Starting server $n on TCP/IP port $PORT..."
190cd ${XDIR}${n}196cd ${XDIR}${n}
diff --git a/tests/scripts/test083-argon2 b/tests/scripts/test083-argon2
index 9700f1a..01803b3 100755
--- a/tests/scripts/test083-argon2
+++ b/tests/scripts/test083-argon2
@@ -97,6 +97,11 @@ EOF
97fi97fi
9898
99$SLAPADD -F $CONFDIR -n 0 -l $TESTDIR/config.ldif99$SLAPADD -F $CONFDIR -n 0 -l $TESTDIR/config.ldif
100RC=$?
101if test $RC != 0 ; then
102 echo "slapadd failed ($RC)!"
103 exit $RC
104fi
100105
101echo "Starting slapd on TCP/IP port $PORT1..."106echo "Starting slapd on TCP/IP port $PORT1..."
102$SLAPD -F $CONFDIR -h $URI1 -d $LVL > $LOG1 2>&1 &107$SLAPD -F $CONFDIR -h $URI1 -d $LVL > $LOG1 2>&1 &
diff --git a/tests/scripts/test086-delta-consumer-config b/tests/scripts/test086-delta-consumer-config
index b8f08cf..d89af3f 100755
--- a/tests/scripts/test086-delta-consumer-config
+++ b/tests/scripts/test086-delta-consumer-config
@@ -61,6 +61,12 @@ esac
61echo "Starting provider slapd on TCP/IP port $PORT1..."61echo "Starting provider slapd on TCP/IP port $PORT1..."
62. $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF62. $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF
63$SLAPADD -F $CFPRO -n 0 -l $CONFLDIF63$SLAPADD -F $CFPRO -n 0 -l $CONFLDIF
64RC=$?
65if test $RC != 0 ; then
66 echo "slapadd failed ($RC)!"
67 exit $RC
68fi
69
64$SLAPD -F $CFPRO -h $URI1 -d $LVL > $LOG1 2>&1 &70$SLAPD -F $CFPRO -h $URI1 -d $LVL > $LOG1 2>&1 &
65PID=$!71PID=$!
66if test $WAIT != 0 ; then72if test $WAIT != 0 ; then
@@ -324,6 +330,13 @@ fi
324330
325echo "Starting consumer slapd on TCP/IP port $PORT2..."331echo "Starting consumer slapd on TCP/IP port $PORT2..."
326$SLAPADD -F $CFCON -n 0 -l $CONFLDIF332$SLAPADD -F $CFCON -n 0 -l $CONFLDIF
333RC=$?
334if test $RC != 0 ; then
335 echo "slapadd failed ($RC)!"
336 test $KILLSERVERS != no && kill -HUP $KILLPIDS
337 exit $RC
338fi
339
327$SLAPD -F $CFCON -h $URI2 -d $LVL > $LOG2 2>&1 &340$SLAPD -F $CFCON -h $URI2 -d $LVL > $LOG2 2>&1 &
328CONSUMERPID=$!341CONSUMERPID=$!
329if test $WAIT != 0 ; then342if test $WAIT != 0 ; then

Subscribers

People subscribed via source and target branches