Merge ~sergiodj/ubuntu/+source/openldap:MRE-2.5.15-jammy into ubuntu/+source/openldap:ubuntu/jammy-devel
- Git
- lp:~sergiodj/ubuntu/+source/openldap
- MRE-2.5.15-jammy
- Merge into ubuntu/jammy-devel
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) |
||||
Related bugs: |
|
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 |
Commit message
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:/
PPA: https:/
I'll wait for the builds to be published before I trigger the dep8 tests for the reverse deps.
Sergio Durigan Junior (sergiodj) wrote : | # |
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.
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.
git-ubuntu bot (git-ubuntu-bot) wrote : | # |
Approvers: sergiodj, lvoytek
Uploaders: sergiodj, lvoytek
MP auto-approved
Andreas Hasenack (ahasenack) wrote : | # |
I don't think we link with openssl, at least in mantic (also checked in focal):
$ grep tls debian/
# --with-tls with TLS/SSL support auto|openssl|gnutls [auto]
--with-tls=gnutls
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/
> # --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_
Trying to upload package to ubuntu
Checking signature on .changes
gpg: /home/sergio/
Checking signature on .dsc
gpg: /home/sergio/
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_
Uploading openldap_
Uploading openldap_
Uploading openldap_
Uploading openldap_
Successfully uploaded packages.
--
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0 EB2F 106D A1C8 C3CB BF14
Preview Diff
1 | diff --git a/CHANGES b/CHANGES | |||
2 | index fe6949b..6256ae7 100644 | |||
3 | --- a/CHANGES | |||
4 | +++ b/CHANGES | |||
5 | @@ -1,5 +1,43 @@ | |||
6 | 1 | OpenLDAP 2.5 Change Log | 1 | OpenLDAP 2.5 Change Log |
7 | 2 | 2 | ||
8 | 3 | OpenLDAP 2.5.15 Release (2023/07/10) | ||
9 | 4 | Added libldap openssl3 support (ITS#9436, ITS#10030) | ||
10 | 5 | Fixed libldap handling of TCP KEEPALIVE options (ITS#10015) | ||
11 | 6 | Fixed libldap with async connections (ITS#10023) | ||
12 | 7 | Fixed libldap openssl TLSv1.3 cipher suite handling (ITS#10035) | ||
13 | 8 | Fixed slapd callback handling with overlays that do extended operations (ITS#9990) | ||
14 | 9 | Fixed slapd conversion of pcache configurations (ITS#10031) | ||
15 | 10 | Fixed slapd cn=config modification handling with abandon (ITS#10045) | ||
16 | 11 | Fixed slapo-constraint handling of push replication (ITS#9953) | ||
17 | 12 | Fixed slapo-dynlist filter evaluation efficiency (ITS#10041) | ||
18 | 13 | Fixed slapo-pcache handling of invalid schema (ITS#10032) | ||
19 | 14 | Fixed slapo-ppolicy handling of push replication (ITS#9953) | ||
20 | 15 | Fixed slapo-ppolicy handling of pwdMinDelay (ITS#10028) | ||
21 | 16 | Fixed slapo-syncprov abandon handling (ITS#10016) | ||
22 | 17 | Fixed slapo-translucent handling of invalid schema (ITS#10032) | ||
23 | 18 | Fixed slapo-unique handling of push replication (ITS#9953) | ||
24 | 19 | Fixed slapo-variant to improve regex handling (ITS#10048) | ||
25 | 20 | Build Environment | ||
26 | 21 | Fixed compatibility with stricter C99 compilers (ITS#10011) | ||
27 | 22 | Keep .pc files during make clean (ITS#9989) | ||
28 | 23 | Contrib | ||
29 | 24 | Fixed slapo-variant handling of push replication (ITS#9953) | ||
30 | 25 | Minor Cleanup | ||
31 | 26 | ITS#9855 | ||
32 | 27 | ITS#9995 | ||
33 | 28 | ITS#9996 | ||
34 | 29 | ITS#9997 | ||
35 | 30 | ITS#9998 | ||
36 | 31 | ITS#9999 | ||
37 | 32 | ITS#10000 | ||
38 | 33 | ITS#10003 | ||
39 | 34 | ITS#10004 | ||
40 | 35 | ITS#10033 | ||
41 | 36 | ITS#10037 | ||
42 | 37 | ITS#10039 | ||
43 | 38 | ITS#10046 | ||
44 | 39 | ITS#10063 | ||
45 | 40 | |||
46 | 3 | OpenLDAP 2.5.14 Release (2023/02/08) | 41 | OpenLDAP 2.5.14 Release (2023/02/08) |
47 | 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) |
48 | 5 | Fixed ldapsearch memory leak with paged results (ITS#9860) | 43 | Fixed ldapsearch memory leak with paged results (ITS#9860) |
49 | diff --git a/Makefile.in b/Makefile.in | |||
50 | index 5c6bec0..2b87aa6 100644 | |||
51 | --- a/Makefile.in | |||
52 | +++ b/Makefile.in | |||
53 | @@ -29,7 +29,7 @@ clean-local: FORCE | |||
54 | 29 | $(RM) -r autom4te.cache | 29 | $(RM) -r autom4te.cache |
55 | 30 | 30 | ||
56 | 31 | veryclean-local: FORCE | 31 | veryclean-local: FORCE |
58 | 32 | $(RM) config.status libtool stamp-h stamp-h.in | 32 | $(RM) config.status libtool stamp-h stamp-h.in libraries/libldap/ldap.pc libraries/liblber/lber.pc |
59 | 33 | 33 | ||
60 | 34 | distclean: veryclean FORCE | 34 | distclean: veryclean FORCE |
61 | 35 | 35 | ||
62 | diff --git a/aclocal.m4 b/aclocal.m4 | |||
63 | index daf32af..8ccd66a 100644 | |||
64 | --- a/aclocal.m4 | |||
65 | +++ b/aclocal.m4 | |||
66 | @@ -1,6 +1,6 @@ | |||
68 | 1 | # generated automatically by aclocal 1.16.1 -*- Autoconf -*- | 1 | # generated automatically by aclocal 1.16.5 -*- Autoconf -*- |
69 | 2 | 2 | ||
71 | 3 | # Copyright (C) 1996-2018 Free Software Foundation, Inc. | 3 | # Copyright (C) 1996-2021 Free Software Foundation, Inc. |
72 | 4 | 4 | ||
73 | 5 | # This file is free software; the Free Software Foundation | 5 | # This file is free software; the Free Software Foundation |
74 | 6 | # gives unlimited permission to copy and/or distribute it, | 6 | # gives unlimited permission to copy and/or distribute it, |
75 | @@ -12,9 +12,9 @@ | |||
76 | 12 | # PARTICULAR PURPOSE. | 12 | # PARTICULAR PURPOSE. |
77 | 13 | 13 | ||
78 | 14 | m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) | 14 | m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) |
82 | 15 | dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- | 15 | # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- |
83 | 16 | dnl serial 11 (pkg-config-0.29.1) | 16 | # serial 12 (pkg-config-0.29.2) |
84 | 17 | dnl | 17 | |
85 | 18 | dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. | 18 | dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. |
86 | 19 | dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> | 19 | dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> |
87 | 20 | dnl | 20 | dnl |
88 | @@ -55,7 +55,7 @@ dnl | |||
89 | 55 | dnl See the "Since" comment for each macro you use to see what version | 55 | dnl See the "Since" comment for each macro you use to see what version |
90 | 56 | dnl of the macros you require. | 56 | dnl of the macros you require. |
91 | 57 | m4_defun([PKG_PREREQ], | 57 | m4_defun([PKG_PREREQ], |
93 | 58 | [m4_define([PKG_MACROS_VERSION], [0.29.1]) | 58 | [m4_define([PKG_MACROS_VERSION], [0.29.2]) |
94 | 59 | m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, | 59 | m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, |
95 | 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])]) |
96 | 61 | ])dnl PKG_PREREQ | 61 | ])dnl PKG_PREREQ |
97 | @@ -156,7 +156,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl | |||
98 | 156 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl | 156 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl |
99 | 157 | 157 | ||
100 | 158 | pkg_failed=no | 158 | pkg_failed=no |
102 | 159 | AC_MSG_CHECKING([for $1]) | 159 | AC_MSG_CHECKING([for $2]) |
103 | 160 | 160 | ||
104 | 161 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) | 161 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) |
105 | 162 | _PKG_CONFIG([$1][_LIBS], [libs], [$2]) | 162 | _PKG_CONFIG([$1][_LIBS], [libs], [$2]) |
106 | @@ -166,11 +166,11 @@ and $1[]_LIBS to avoid the need to call pkg-config. | |||
107 | 166 | See the pkg-config man page for more details.]) | 166 | See the pkg-config man page for more details.]) |
108 | 167 | 167 | ||
109 | 168 | if test $pkg_failed = yes; then | 168 | if test $pkg_failed = yes; then |
111 | 169 | AC_MSG_RESULT([no]) | 169 | AC_MSG_RESULT([no]) |
112 | 170 | _PKG_SHORT_ERRORS_SUPPORTED | 170 | _PKG_SHORT_ERRORS_SUPPORTED |
113 | 171 | if test $_pkg_short_errors_supported = yes; then | 171 | if test $_pkg_short_errors_supported = yes; then |
114 | 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` |
116 | 173 | else | 173 | else |
117 | 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` |
118 | 175 | fi | 175 | fi |
119 | 176 | # Put the nasty error message in config.log where it belongs | 176 | # Put the nasty error message in config.log where it belongs |
120 | @@ -187,7 +187,7 @@ installed software in a non-standard prefix. | |||
121 | 187 | _PKG_TEXT])[]dnl | 187 | _PKG_TEXT])[]dnl |
122 | 188 | ]) | 188 | ]) |
123 | 189 | elif test $pkg_failed = untried; then | 189 | elif test $pkg_failed = untried; then |
125 | 190 | AC_MSG_RESULT([no]) | 190 | AC_MSG_RESULT([no]) |
126 | 191 | m4_default([$4], [AC_MSG_FAILURE( | 191 | m4_default([$4], [AC_MSG_FAILURE( |
127 | 192 | [The pkg-config script could not be found or is too old. Make sure it | 192 | [The pkg-config script could not be found or is too old. Make sure it |
128 | 193 | is in your PATH or set the PKG_CONFIG environment variable to the full | 193 | is in your PATH or set the PKG_CONFIG environment variable to the full |
129 | diff --git a/build/lib.mk b/build/lib.mk | |||
130 | index 442c0d3..c50ef52 100644 | |||
131 | --- a/build/lib.mk | |||
132 | +++ b/build/lib.mk | |||
133 | @@ -40,7 +40,7 @@ lint5: lint5-local FORCE | |||
134 | 40 | clean-common: FORCE | 40 | clean-common: FORCE |
135 | 41 | $(RM) $(LIBRARY) ../$(LIBRARY) $(XLIBRARY) \ | 41 | $(RM) $(LIBRARY) ../$(LIBRARY) $(XLIBRARY) \ |
136 | 42 | $(PROGRAMS) $(XPROGRAMS) $(XSRCS) $(XXSRCS) \ | 42 | $(PROGRAMS) $(XPROGRAMS) $(XSRCS) $(XXSRCS) \ |
138 | 43 | *.o *.lo a.out *.exe *.pc core version.c .libs/* | 43 | *.o *.lo a.out *.exe core version.c .libs/* |
139 | 44 | 44 | ||
140 | 45 | depend-common: FORCE | 45 | depend-common: FORCE |
141 | 46 | $(MKDEP) $(DEFS) $(DEFINES) $(SRCS) $(XXSRCS) | 46 | $(MKDEP) $(DEFS) $(DEFINES) $(SRCS) $(XXSRCS) |
142 | diff --git a/build/openldap.m4 b/build/openldap.m4 | |||
143 | index c7fa19e..9419aaf 100644 | |||
144 | --- a/build/openldap.m4 | |||
145 | +++ b/build/openldap.m4 | |||
146 | @@ -154,6 +154,7 @@ fi | |||
147 | 154 | if test $ol_cv_header_stdc = yes; then | 154 | if test $ol_cv_header_stdc = yes; then |
148 | 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. |
149 | 156 | AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <ctype.h> | 156 | AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <ctype.h> |
150 | 157 | #include <stdlib.h> | ||
151 | 157 | #ifndef HAVE_EBCDIC | 158 | #ifndef HAVE_EBCDIC |
152 | 158 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | 159 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
153 | 159 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | 160 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
154 | @@ -303,8 +304,12 @@ AC_DEFUN([OL_PTHREAD_TEST_INCLUDES], [[ | |||
155 | 303 | #define NULL (void*)0 | 304 | #define NULL (void*)0 |
156 | 304 | #endif | 305 | #endif |
157 | 305 | 306 | ||
158 | 307 | #ifdef __STDC__ | ||
159 | 308 | static void *task(void *p) | ||
160 | 309 | #else | ||
161 | 306 | static void *task(p) | 310 | static void *task(p) |
162 | 307 | void *p; | 311 | void *p; |
163 | 312 | #endif | ||
164 | 308 | { | 313 | { |
165 | 309 | return (void *) (p == NULL); | 314 | return (void *) (p == NULL); |
166 | 310 | } | 315 | } |
167 | @@ -360,9 +365,13 @@ AC_DEFUN([OL_PTHREAD_TEST_FUNCTION],[[ | |||
168 | 360 | AC_DEFUN([OL_PTHREAD_TEST_PROGRAM], | 365 | AC_DEFUN([OL_PTHREAD_TEST_PROGRAM], |
169 | 361 | [AC_LANG_SOURCE([OL_PTHREAD_TEST_INCLUDES | 366 | [AC_LANG_SOURCE([OL_PTHREAD_TEST_INCLUDES |
170 | 362 | 367 | ||
171 | 368 | #ifdef __STDC__ | ||
172 | 369 | int main(int argc, char **argv) | ||
173 | 370 | #else | ||
174 | 363 | int main(argc, argv) | 371 | int main(argc, argv) |
175 | 364 | int argc; | 372 | int argc; |
176 | 365 | char **argv; | 373 | char **argv; |
177 | 374 | #endif | ||
178 | 366 | { | 375 | { |
179 | 367 | OL_PTHREAD_TEST_FUNCTION | 376 | OL_PTHREAD_TEST_FUNCTION |
180 | 368 | } | 377 | } |
181 | @@ -484,7 +493,7 @@ AC_CACHE_CHECK([for compatible POSIX regex],ol_cv_c_posix_regex,[ | |||
182 | 484 | #include <sys/types.h> | 493 | #include <sys/types.h> |
183 | 485 | #include <regex.h> | 494 | #include <regex.h> |
184 | 486 | static char *pattern, *string; | 495 | static char *pattern, *string; |
186 | 487 | main() | 496 | int main(void) |
187 | 488 | { | 497 | { |
188 | 489 | int rc; | 498 | int rc; |
189 | 490 | regex_t re; | 499 | regex_t re; |
190 | @@ -511,7 +520,8 @@ AC_DEFUN([OL_C_UPPER_LOWER], | |||
191 | 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,[ |
192 | 512 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ | 521 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
193 | 513 | #include <ctype.h> | 522 | #include <ctype.h> |
195 | 514 | main() | 523 | #include <stdlib.h> |
196 | 524 | int main(void) | ||
197 | 515 | { | 525 | { |
198 | 516 | if ('C' == toupper('C')) | 526 | if ('C' == toupper('C')) |
199 | 517 | exit(0); | 527 | exit(0); |
200 | @@ -569,7 +579,7 @@ AC_DEFUN([OL_NONPOSIX_STRERROR_R], | |||
201 | 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]) |
202 | 570 | else | 580 | else |
203 | 571 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ | 581 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
205 | 572 | main() { | 582 | int main(void) { |
206 | 573 | char buf[100]; | 583 | char buf[100]; |
207 | 574 | buf[0] = 0; | 584 | buf[0] = 0; |
208 | 575 | strerror_r( 1, buf, sizeof buf ); | 585 | strerror_r( 1, buf, sizeof buf ); |
209 | diff --git a/build/version.var b/build/version.var | |||
210 | index 19cfaea..5bcd71b 100644 | |||
211 | --- a/build/version.var | |||
212 | +++ b/build/version.var | |||
213 | @@ -15,9 +15,9 @@ | |||
214 | 15 | ol_package=OpenLDAP | 15 | ol_package=OpenLDAP |
215 | 16 | ol_major=2 | 16 | ol_major=2 |
216 | 17 | ol_minor=5 | 17 | ol_minor=5 |
219 | 18 | ol_patch=14 | 18 | ol_patch=15 |
220 | 19 | ol_api_inc=20514 | 19 | ol_api_inc=20515 |
221 | 20 | ol_api_current=1 | 20 | ol_api_current=1 |
223 | 21 | ol_api_revision=9 | 21 | ol_api_revision=10 |
224 | 22 | ol_api_age=1 | 22 | ol_api_age=1 |
226 | 23 | ol_release_date="2023/02/08" | 23 | ol_release_date="2023/07/10" |
227 | diff --git a/clients/tools/ldapdelete.c b/clients/tools/ldapdelete.c | |||
228 | index 6024a33..e572e43 100644 | |||
229 | --- a/clients/tools/ldapdelete.c | |||
230 | +++ b/clients/tools/ldapdelete.c | |||
231 | @@ -386,7 +386,9 @@ more:; | |||
232 | 386 | break; | 386 | break; |
233 | 387 | default: | 387 | default: |
234 | 388 | tool_perror( "ldap_search", srch_rc, NULL, NULL, NULL, NULL ); | 388 | tool_perror( "ldap_search", srch_rc, NULL, NULL, NULL, NULL ); |
236 | 389 | return( srch_rc ); | 389 | rc = srch_rc; |
237 | 390 | srch_rc = 0; | ||
238 | 391 | goto leave; | ||
239 | 390 | } | 392 | } |
240 | 391 | 393 | ||
241 | 392 | entries = ldap_count_entries( ld, res ); | 394 | entries = ldap_count_entries( ld, res ); |
242 | @@ -402,15 +404,14 @@ more:; | |||
243 | 402 | if( dn == NULL ) { | 404 | if( dn == NULL ) { |
244 | 403 | ldap_get_option( ld, LDAP_OPT_RESULT_CODE, &rc ); | 405 | ldap_get_option( ld, LDAP_OPT_RESULT_CODE, &rc ); |
245 | 404 | tool_perror( "ldap_prune", rc, NULL, NULL, NULL, NULL ); | 406 | tool_perror( "ldap_prune", rc, NULL, NULL, NULL, NULL ); |
248 | 405 | ber_memfree( dn ); | 407 | goto leave; |
247 | 406 | return rc; | ||
249 | 407 | } | 408 | } |
250 | 408 | 409 | ||
251 | 409 | rc = deletechildren( ld, dn, 0 ); | 410 | rc = deletechildren( ld, dn, 0 ); |
252 | 410 | if ( rc != LDAP_SUCCESS ) { | 411 | if ( rc != LDAP_SUCCESS ) { |
253 | 411 | tool_perror( "ldap_prune", rc, NULL, NULL, NULL, NULL ); | 412 | tool_perror( "ldap_prune", rc, NULL, NULL, NULL, NULL ); |
254 | 412 | ber_memfree( dn ); | 413 | ber_memfree( dn ); |
256 | 413 | return rc; | 414 | goto leave; |
257 | 414 | } | 415 | } |
258 | 415 | 416 | ||
259 | 416 | if ( verbose ) { | 417 | if ( verbose ) { |
260 | @@ -421,7 +422,7 @@ more:; | |||
261 | 421 | if ( rc != LDAP_SUCCESS ) { | 422 | if ( rc != LDAP_SUCCESS ) { |
262 | 422 | tool_perror( "ldap_delete", rc, NULL, NULL, NULL, NULL ); | 423 | tool_perror( "ldap_delete", rc, NULL, NULL, NULL, NULL ); |
263 | 423 | ber_memfree( dn ); | 424 | ber_memfree( dn ); |
265 | 424 | return rc; | 425 | goto leave; |
266 | 425 | 426 | ||
267 | 426 | } | 427 | } |
268 | 427 | 428 | ||
269 | @@ -433,6 +434,7 @@ more:; | |||
270 | 433 | } | 434 | } |
271 | 434 | } | 435 | } |
272 | 435 | 436 | ||
273 | 437 | leave: | ||
274 | 436 | ldap_msgfree( res ); | 438 | ldap_msgfree( res ); |
275 | 437 | 439 | ||
276 | 438 | if ( srch_rc == LDAP_SIZELIMIT_EXCEEDED ) { | 440 | if ( srch_rc == LDAP_SIZELIMIT_EXCEEDED ) { |
277 | diff --git a/configure b/configure | |||
278 | index b718883..ae23534 100755 | |||
279 | --- a/configure | |||
280 | +++ b/configure | |||
281 | @@ -1,5 +1,5 @@ | |||
282 | 1 | #! /bin/sh | 1 | #! /bin/sh |
284 | 2 | # From configure.ac Id: 3943f6265060065483db582e5c7bef14fe934d80 . | 2 | # From configure.ac Id: a4836a8a0218326643db20d8131fc717d1fc3edf . |
285 | 3 | # Guess values for system-dependent variables and create Makefiles. | 3 | # Guess values for system-dependent variables and create Makefiles. |
286 | 4 | # Generated by GNU Autoconf 2.69. | 4 | # Generated by GNU Autoconf 2.69. |
287 | 5 | # | 5 | # |
288 | @@ -812,7 +812,6 @@ infodir | |||
289 | 812 | docdir | 812 | docdir |
290 | 813 | oldincludedir | 813 | oldincludedir |
291 | 814 | includedir | 814 | includedir |
292 | 815 | runstatedir | ||
293 | 816 | localstatedir | 815 | localstatedir |
294 | 817 | sharedstatedir | 816 | sharedstatedir |
295 | 818 | sysconfdir | 817 | sysconfdir |
296 | @@ -973,7 +972,6 @@ datadir='${datarootdir}' | |||
297 | 973 | sysconfdir='${prefix}/etc' | 972 | sysconfdir='${prefix}/etc' |
298 | 974 | sharedstatedir='${prefix}/com' | 973 | sharedstatedir='${prefix}/com' |
299 | 975 | localstatedir='${prefix}/var' | 974 | localstatedir='${prefix}/var' |
300 | 976 | runstatedir='${localstatedir}/run' | ||
301 | 977 | includedir='${prefix}/include' | 975 | includedir='${prefix}/include' |
302 | 978 | oldincludedir='/usr/include' | 976 | oldincludedir='/usr/include' |
303 | 979 | docdir='${datarootdir}/doc/${PACKAGE}' | 977 | docdir='${datarootdir}/doc/${PACKAGE}' |
304 | @@ -1226,15 +1224,6 @@ do | |||
305 | 1226 | | -silent | --silent | --silen | --sile | --sil) | 1224 | | -silent | --silent | --silen | --sile | --sil) |
306 | 1227 | silent=yes ;; | 1225 | silent=yes ;; |
307 | 1228 | 1226 | ||
308 | 1229 | -runstatedir | --runstatedir | --runstatedi | --runstated \ | ||
309 | 1230 | | --runstate | --runstat | --runsta | --runst | --runs \ | ||
310 | 1231 | | --run | --ru | --r) | ||
311 | 1232 | ac_prev=runstatedir ;; | ||
312 | 1233 | -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | ||
313 | 1234 | | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | ||
314 | 1235 | | --run=* | --ru=* | --r=*) | ||
315 | 1236 | runstatedir=$ac_optarg ;; | ||
316 | 1237 | |||
317 | 1238 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | 1227 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
318 | 1239 | ac_prev=sbindir ;; | 1228 | ac_prev=sbindir ;; |
319 | 1240 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | 1229 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ |
320 | @@ -1372,7 +1361,7 @@ fi | |||
321 | 1372 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | 1361 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ |
322 | 1373 | datadir sysconfdir sharedstatedir localstatedir includedir \ | 1362 | datadir sysconfdir sharedstatedir localstatedir includedir \ |
323 | 1374 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | 1363 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ |
325 | 1375 | libdir localedir mandir runstatedir | 1364 | libdir localedir mandir |
326 | 1376 | do | 1365 | do |
327 | 1377 | eval ac_val=\$$ac_var | 1366 | eval ac_val=\$$ac_var |
328 | 1378 | # Remove trailing slashes. | 1367 | # Remove trailing slashes. |
329 | @@ -1525,7 +1514,6 @@ Fine tuning of the installation directories: | |||
330 | 1525 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | 1514 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] |
331 | 1526 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | 1515 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] |
332 | 1527 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | 1516 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] |
333 | 1528 | --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] | ||
334 | 1529 | --libdir=DIR object code libraries [EPREFIX/lib] | 1517 | --libdir=DIR object code libraries [EPREFIX/lib] |
335 | 1530 | --includedir=DIR C header files [PREFIX/include] | 1518 | --includedir=DIR C header files [PREFIX/include] |
336 | 1531 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | 1519 | --oldincludedir=DIR C header files for non-gcc [/usr/include] |
337 | @@ -15303,6 +15291,7 @@ else | |||
338 | 15303 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 15291 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
339 | 15304 | /* end confdefs.h. */ | 15292 | /* end confdefs.h. */ |
340 | 15305 | #include <ctype.h> | 15293 | #include <ctype.h> |
341 | 15294 | #include <stdlib.h> | ||
342 | 15306 | #ifndef HAVE_EBCDIC | 15295 | #ifndef HAVE_EBCDIC |
343 | 15307 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | 15296 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
344 | 15308 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | 15297 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
345 | @@ -16271,6 +16260,10 @@ $as_echo "no" >&6; } | |||
346 | 16271 | else | 16260 | else |
347 | 16272 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 16261 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
348 | 16273 | /* end confdefs.h. */ | 16262 | /* end confdefs.h. */ |
349 | 16263 | #include <stdlib.h> | ||
350 | 16264 | #ifdef HAVE_SYS_POLL_H | ||
351 | 16265 | #include <sys/epoll.h> | ||
352 | 16266 | #endif | ||
353 | 16274 | int main(int argc, char **argv) | 16267 | int main(int argc, char **argv) |
354 | 16275 | { | 16268 | { |
355 | 16276 | int epfd = epoll_create(256); | 16269 | int epfd = epoll_create(256); |
356 | @@ -16451,7 +16444,7 @@ else | |||
357 | 16451 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 16444 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
358 | 16452 | /* end confdefs.h. */ | 16445 | /* end confdefs.h. */ |
359 | 16453 | 16446 | ||
361 | 16454 | main() { | 16447 | int main(void) { |
362 | 16455 | char buf[100]; | 16448 | char buf[100]; |
363 | 16456 | buf[0] = 0; | 16449 | buf[0] = 0; |
364 | 16457 | strerror_r( 1, buf, sizeof buf ); | 16450 | strerror_r( 1, buf, sizeof buf ); |
365 | @@ -16651,7 +16644,7 @@ else | |||
366 | 16651 | #include <sys/types.h> | 16644 | #include <sys/types.h> |
367 | 16652 | #include <regex.h> | 16645 | #include <regex.h> |
368 | 16653 | static char *pattern, *string; | 16646 | static char *pattern, *string; |
370 | 16654 | main() | 16647 | int main(void) |
371 | 16655 | { | 16648 | { |
372 | 16656 | int rc; | 16649 | int rc; |
373 | 16657 | regex_t re; | 16650 | regex_t re; |
374 | @@ -17447,9 +17440,9 @@ See \`config.log' for more details" "$LINENO" 5; } | |||
375 | 17447 | fi | 17440 | fi |
376 | 17448 | rm -f conftest.err conftest.i conftest.$ac_ext | 17441 | rm -f conftest.err conftest.i conftest.$ac_ext |
377 | 17449 | 17442 | ||
381 | 17450 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_export_keying_material_early in -lssl" >&5 | 17443 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_set_ciphersuites in -lssl" >&5 |
382 | 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; } |
383 | 17452 | if ${ac_cv_lib_ssl_SSL_export_keying_material_early+:} false; then : | 17445 | if ${ac_cv_lib_ssl_SSL_CTX_set_ciphersuites+:} false; then : |
384 | 17453 | $as_echo_n "(cached) " >&6 | 17446 | $as_echo_n "(cached) " >&6 |
385 | 17454 | else | 17447 | else |
386 | 17455 | ac_check_lib_save_LIBS=$LIBS | 17448 | ac_check_lib_save_LIBS=$LIBS |
387 | @@ -17463,27 +17456,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |||
388 | 17463 | #ifdef __cplusplus | 17456 | #ifdef __cplusplus |
389 | 17464 | extern "C" | 17457 | extern "C" |
390 | 17465 | #endif | 17458 | #endif |
392 | 17466 | char SSL_export_keying_material_early (); | 17459 | char SSL_CTX_set_ciphersuites (); |
393 | 17467 | int | 17460 | int |
394 | 17468 | main () | 17461 | main () |
395 | 17469 | { | 17462 | { |
397 | 17470 | return SSL_export_keying_material_early (); | 17463 | return SSL_CTX_set_ciphersuites (); |
398 | 17471 | ; | 17464 | ; |
399 | 17472 | return 0; | 17465 | return 0; |
400 | 17473 | } | 17466 | } |
401 | 17474 | _ACEOF | 17467 | _ACEOF |
402 | 17475 | if ac_fn_c_try_link "$LINENO"; then : | 17468 | if ac_fn_c_try_link "$LINENO"; then : |
404 | 17476 | ac_cv_lib_ssl_SSL_export_keying_material_early=yes | 17469 | ac_cv_lib_ssl_SSL_CTX_set_ciphersuites=yes |
405 | 17477 | else | 17470 | else |
407 | 17478 | ac_cv_lib_ssl_SSL_export_keying_material_early=no | 17471 | ac_cv_lib_ssl_SSL_CTX_set_ciphersuites=no |
408 | 17479 | fi | 17472 | fi |
409 | 17480 | rm -f core conftest.err conftest.$ac_objext \ | 17473 | rm -f core conftest.err conftest.$ac_objext \ |
410 | 17481 | conftest$ac_exeext conftest.$ac_ext | 17474 | conftest$ac_exeext conftest.$ac_ext |
411 | 17482 | LIBS=$ac_check_lib_save_LIBS | 17475 | LIBS=$ac_check_lib_save_LIBS |
412 | 17483 | fi | 17476 | fi |
416 | 17484 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_export_keying_material_early" >&5 | 17477 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_CTX_set_ciphersuites" >&5 |
417 | 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; } |
418 | 17486 | if test "x$ac_cv_lib_ssl_SSL_export_keying_material_early" = xyes; then : | 17479 | if test "x$ac_cv_lib_ssl_SSL_CTX_set_ciphersuites" = xyes; then : |
419 | 17487 | have_openssl=yes | 17480 | have_openssl=yes |
420 | 17488 | else | 17481 | else |
421 | 17489 | have_openssl=no | 17482 | have_openssl=no |
422 | @@ -17865,8 +17858,12 @@ else | |||
423 | 17865 | #define NULL (void*)0 | 17858 | #define NULL (void*)0 |
424 | 17866 | #endif | 17859 | #endif |
425 | 17867 | 17860 | ||
426 | 17861 | #ifdef __STDC__ | ||
427 | 17862 | static void *task(void *p) | ||
428 | 17863 | #else | ||
429 | 17868 | static void *task(p) | 17864 | static void *task(p) |
430 | 17869 | void *p; | 17865 | void *p; |
431 | 17866 | #endif | ||
432 | 17870 | { | 17867 | { |
433 | 17871 | return (void *) (p == NULL); | 17868 | return (void *) (p == NULL); |
434 | 17872 | } | 17869 | } |
435 | @@ -17945,16 +17942,24 @@ else | |||
436 | 17945 | #define NULL (void*)0 | 17942 | #define NULL (void*)0 |
437 | 17946 | #endif | 17943 | #endif |
438 | 17947 | 17944 | ||
439 | 17945 | #ifdef __STDC__ | ||
440 | 17946 | static void *task(void *p) | ||
441 | 17947 | #else | ||
442 | 17948 | static void *task(p) | 17948 | static void *task(p) |
443 | 17949 | void *p; | 17949 | void *p; |
444 | 17950 | #endif | ||
445 | 17950 | { | 17951 | { |
446 | 17951 | return (void *) (p == NULL); | 17952 | return (void *) (p == NULL); |
447 | 17952 | } | 17953 | } |
448 | 17953 | 17954 | ||
449 | 17954 | 17955 | ||
450 | 17956 | #ifdef __STDC__ | ||
451 | 17957 | int main(int argc, char **argv) | ||
452 | 17958 | #else | ||
453 | 17955 | int main(argc, argv) | 17959 | int main(argc, argv) |
454 | 17956 | int argc; | 17960 | int argc; |
455 | 17957 | char **argv; | 17961 | char **argv; |
456 | 17962 | #endif | ||
457 | 17958 | { | 17963 | { |
458 | 17959 | 17964 | ||
459 | 17960 | /* pthread test function */ | 17965 | /* pthread test function */ |
460 | @@ -18050,8 +18055,12 @@ else | |||
461 | 18050 | #define NULL (void*)0 | 18055 | #define NULL (void*)0 |
462 | 18051 | #endif | 18056 | #endif |
463 | 18052 | 18057 | ||
464 | 18058 | #ifdef __STDC__ | ||
465 | 18059 | static void *task(void *p) | ||
466 | 18060 | #else | ||
467 | 18053 | static void *task(p) | 18061 | static void *task(p) |
468 | 18054 | void *p; | 18062 | void *p; |
469 | 18063 | #endif | ||
470 | 18055 | { | 18064 | { |
471 | 18056 | return (void *) (p == NULL); | 18065 | return (void *) (p == NULL); |
472 | 18057 | } | 18066 | } |
473 | @@ -18130,16 +18139,24 @@ else | |||
474 | 18130 | #define NULL (void*)0 | 18139 | #define NULL (void*)0 |
475 | 18131 | #endif | 18140 | #endif |
476 | 18132 | 18141 | ||
477 | 18142 | #ifdef __STDC__ | ||
478 | 18143 | static void *task(void *p) | ||
479 | 18144 | #else | ||
480 | 18133 | static void *task(p) | 18145 | static void *task(p) |
481 | 18134 | void *p; | 18146 | void *p; |
482 | 18147 | #endif | ||
483 | 18135 | { | 18148 | { |
484 | 18136 | return (void *) (p == NULL); | 18149 | return (void *) (p == NULL); |
485 | 18137 | } | 18150 | } |
486 | 18138 | 18151 | ||
487 | 18139 | 18152 | ||
488 | 18153 | #ifdef __STDC__ | ||
489 | 18154 | int main(int argc, char **argv) | ||
490 | 18155 | #else | ||
491 | 18140 | int main(argc, argv) | 18156 | int main(argc, argv) |
492 | 18141 | int argc; | 18157 | int argc; |
493 | 18142 | char **argv; | 18158 | char **argv; |
494 | 18159 | #endif | ||
495 | 18143 | { | 18160 | { |
496 | 18144 | 18161 | ||
497 | 18145 | /* pthread test function */ | 18162 | /* pthread test function */ |
498 | @@ -18240,8 +18257,12 @@ else | |||
499 | 18240 | #define NULL (void*)0 | 18257 | #define NULL (void*)0 |
500 | 18241 | #endif | 18258 | #endif |
501 | 18242 | 18259 | ||
502 | 18260 | #ifdef __STDC__ | ||
503 | 18261 | static void *task(void *p) | ||
504 | 18262 | #else | ||
505 | 18243 | static void *task(p) | 18263 | static void *task(p) |
506 | 18244 | void *p; | 18264 | void *p; |
507 | 18265 | #endif | ||
508 | 18245 | { | 18266 | { |
509 | 18246 | return (void *) (p == NULL); | 18267 | return (void *) (p == NULL); |
510 | 18247 | } | 18268 | } |
511 | @@ -18320,16 +18341,24 @@ else | |||
512 | 18320 | #define NULL (void*)0 | 18341 | #define NULL (void*)0 |
513 | 18321 | #endif | 18342 | #endif |
514 | 18322 | 18343 | ||
515 | 18344 | #ifdef __STDC__ | ||
516 | 18345 | static void *task(void *p) | ||
517 | 18346 | #else | ||
518 | 18323 | static void *task(p) | 18347 | static void *task(p) |
519 | 18324 | void *p; | 18348 | void *p; |
520 | 18349 | #endif | ||
521 | 18325 | { | 18350 | { |
522 | 18326 | return (void *) (p == NULL); | 18351 | return (void *) (p == NULL); |
523 | 18327 | } | 18352 | } |
524 | 18328 | 18353 | ||
525 | 18329 | 18354 | ||
526 | 18355 | #ifdef __STDC__ | ||
527 | 18356 | int main(int argc, char **argv) | ||
528 | 18357 | #else | ||
529 | 18330 | int main(argc, argv) | 18358 | int main(argc, argv) |
530 | 18331 | int argc; | 18359 | int argc; |
531 | 18332 | char **argv; | 18360 | char **argv; |
532 | 18361 | #endif | ||
533 | 18333 | { | 18362 | { |
534 | 18334 | 18363 | ||
535 | 18335 | /* pthread test function */ | 18364 | /* pthread test function */ |
536 | @@ -18430,8 +18459,12 @@ else | |||
537 | 18430 | #define NULL (void*)0 | 18459 | #define NULL (void*)0 |
538 | 18431 | #endif | 18460 | #endif |
539 | 18432 | 18461 | ||
540 | 18462 | #ifdef __STDC__ | ||
541 | 18463 | static void *task(void *p) | ||
542 | 18464 | #else | ||
543 | 18433 | static void *task(p) | 18465 | static void *task(p) |
544 | 18434 | void *p; | 18466 | void *p; |
545 | 18467 | #endif | ||
546 | 18435 | { | 18468 | { |
547 | 18436 | return (void *) (p == NULL); | 18469 | return (void *) (p == NULL); |
548 | 18437 | } | 18470 | } |
549 | @@ -18510,16 +18543,24 @@ else | |||
550 | 18510 | #define NULL (void*)0 | 18543 | #define NULL (void*)0 |
551 | 18511 | #endif | 18544 | #endif |
552 | 18512 | 18545 | ||
553 | 18546 | #ifdef __STDC__ | ||
554 | 18547 | static void *task(void *p) | ||
555 | 18548 | #else | ||
556 | 18513 | static void *task(p) | 18549 | static void *task(p) |
557 | 18514 | void *p; | 18550 | void *p; |
558 | 18551 | #endif | ||
559 | 18515 | { | 18552 | { |
560 | 18516 | return (void *) (p == NULL); | 18553 | return (void *) (p == NULL); |
561 | 18517 | } | 18554 | } |
562 | 18518 | 18555 | ||
563 | 18519 | 18556 | ||
564 | 18557 | #ifdef __STDC__ | ||
565 | 18558 | int main(int argc, char **argv) | ||
566 | 18559 | #else | ||
567 | 18520 | int main(argc, argv) | 18560 | int main(argc, argv) |
568 | 18521 | int argc; | 18561 | int argc; |
569 | 18522 | char **argv; | 18562 | char **argv; |
570 | 18563 | #endif | ||
571 | 18523 | { | 18564 | { |
572 | 18524 | 18565 | ||
573 | 18525 | /* pthread test function */ | 18566 | /* pthread test function */ |
574 | @@ -18620,8 +18661,12 @@ else | |||
575 | 18620 | #define NULL (void*)0 | 18661 | #define NULL (void*)0 |
576 | 18621 | #endif | 18662 | #endif |
577 | 18622 | 18663 | ||
578 | 18664 | #ifdef __STDC__ | ||
579 | 18665 | static void *task(void *p) | ||
580 | 18666 | #else | ||
581 | 18623 | static void *task(p) | 18667 | static void *task(p) |
582 | 18624 | void *p; | 18668 | void *p; |
583 | 18669 | #endif | ||
584 | 18625 | { | 18670 | { |
585 | 18626 | return (void *) (p == NULL); | 18671 | return (void *) (p == NULL); |
586 | 18627 | } | 18672 | } |
587 | @@ -18700,16 +18745,24 @@ else | |||
588 | 18700 | #define NULL (void*)0 | 18745 | #define NULL (void*)0 |
589 | 18701 | #endif | 18746 | #endif |
590 | 18702 | 18747 | ||
591 | 18748 | #ifdef __STDC__ | ||
592 | 18749 | static void *task(void *p) | ||
593 | 18750 | #else | ||
594 | 18703 | static void *task(p) | 18751 | static void *task(p) |
595 | 18704 | void *p; | 18752 | void *p; |
596 | 18753 | #endif | ||
597 | 18705 | { | 18754 | { |
598 | 18706 | return (void *) (p == NULL); | 18755 | return (void *) (p == NULL); |
599 | 18707 | } | 18756 | } |
600 | 18708 | 18757 | ||
601 | 18709 | 18758 | ||
602 | 18759 | #ifdef __STDC__ | ||
603 | 18760 | int main(int argc, char **argv) | ||
604 | 18761 | #else | ||
605 | 18710 | int main(argc, argv) | 18762 | int main(argc, argv) |
606 | 18711 | int argc; | 18763 | int argc; |
607 | 18712 | char **argv; | 18764 | char **argv; |
608 | 18765 | #endif | ||
609 | 18713 | { | 18766 | { |
610 | 18714 | 18767 | ||
611 | 18715 | /* pthread test function */ | 18768 | /* pthread test function */ |
612 | @@ -18810,8 +18863,12 @@ else | |||
613 | 18810 | #define NULL (void*)0 | 18863 | #define NULL (void*)0 |
614 | 18811 | #endif | 18864 | #endif |
615 | 18812 | 18865 | ||
616 | 18866 | #ifdef __STDC__ | ||
617 | 18867 | static void *task(void *p) | ||
618 | 18868 | #else | ||
619 | 18813 | static void *task(p) | 18869 | static void *task(p) |
620 | 18814 | void *p; | 18870 | void *p; |
621 | 18871 | #endif | ||
622 | 18815 | { | 18872 | { |
623 | 18816 | return (void *) (p == NULL); | 18873 | return (void *) (p == NULL); |
624 | 18817 | } | 18874 | } |
625 | @@ -18890,16 +18947,24 @@ else | |||
626 | 18890 | #define NULL (void*)0 | 18947 | #define NULL (void*)0 |
627 | 18891 | #endif | 18948 | #endif |
628 | 18892 | 18949 | ||
629 | 18950 | #ifdef __STDC__ | ||
630 | 18951 | static void *task(void *p) | ||
631 | 18952 | #else | ||
632 | 18893 | static void *task(p) | 18953 | static void *task(p) |
633 | 18894 | void *p; | 18954 | void *p; |
634 | 18955 | #endif | ||
635 | 18895 | { | 18956 | { |
636 | 18896 | return (void *) (p == NULL); | 18957 | return (void *) (p == NULL); |
637 | 18897 | } | 18958 | } |
638 | 18898 | 18959 | ||
639 | 18899 | 18960 | ||
640 | 18961 | #ifdef __STDC__ | ||
641 | 18962 | int main(int argc, char **argv) | ||
642 | 18963 | #else | ||
643 | 18900 | int main(argc, argv) | 18964 | int main(argc, argv) |
644 | 18901 | int argc; | 18965 | int argc; |
645 | 18902 | char **argv; | 18966 | char **argv; |
646 | 18967 | #endif | ||
647 | 18903 | { | 18968 | { |
648 | 18904 | 18969 | ||
649 | 18905 | /* pthread test function */ | 18970 | /* pthread test function */ |
650 | @@ -19001,8 +19066,12 @@ else | |||
651 | 19001 | #define NULL (void*)0 | 19066 | #define NULL (void*)0 |
652 | 19002 | #endif | 19067 | #endif |
653 | 19003 | 19068 | ||
654 | 19069 | #ifdef __STDC__ | ||
655 | 19070 | static void *task(void *p) | ||
656 | 19071 | #else | ||
657 | 19004 | static void *task(p) | 19072 | static void *task(p) |
658 | 19005 | void *p; | 19073 | void *p; |
659 | 19074 | #endif | ||
660 | 19006 | { | 19075 | { |
661 | 19007 | return (void *) (p == NULL); | 19076 | return (void *) (p == NULL); |
662 | 19008 | } | 19077 | } |
663 | @@ -19081,16 +19150,24 @@ else | |||
664 | 19081 | #define NULL (void*)0 | 19150 | #define NULL (void*)0 |
665 | 19082 | #endif | 19151 | #endif |
666 | 19083 | 19152 | ||
667 | 19153 | #ifdef __STDC__ | ||
668 | 19154 | static void *task(void *p) | ||
669 | 19155 | #else | ||
670 | 19084 | static void *task(p) | 19156 | static void *task(p) |
671 | 19085 | void *p; | 19157 | void *p; |
672 | 19158 | #endif | ||
673 | 19086 | { | 19159 | { |
674 | 19087 | return (void *) (p == NULL); | 19160 | return (void *) (p == NULL); |
675 | 19088 | } | 19161 | } |
676 | 19089 | 19162 | ||
677 | 19090 | 19163 | ||
678 | 19164 | #ifdef __STDC__ | ||
679 | 19165 | int main(int argc, char **argv) | ||
680 | 19166 | #else | ||
681 | 19091 | int main(argc, argv) | 19167 | int main(argc, argv) |
682 | 19092 | int argc; | 19168 | int argc; |
683 | 19093 | char **argv; | 19169 | char **argv; |
684 | 19170 | #endif | ||
685 | 19094 | { | 19171 | { |
686 | 19095 | 19172 | ||
687 | 19096 | /* pthread test function */ | 19173 | /* pthread test function */ |
688 | @@ -19191,8 +19268,12 @@ else | |||
689 | 19191 | #define NULL (void*)0 | 19268 | #define NULL (void*)0 |
690 | 19192 | #endif | 19269 | #endif |
691 | 19193 | 19270 | ||
692 | 19271 | #ifdef __STDC__ | ||
693 | 19272 | static void *task(void *p) | ||
694 | 19273 | #else | ||
695 | 19194 | static void *task(p) | 19274 | static void *task(p) |
696 | 19195 | void *p; | 19275 | void *p; |
697 | 19276 | #endif | ||
698 | 19196 | { | 19277 | { |
699 | 19197 | return (void *) (p == NULL); | 19278 | return (void *) (p == NULL); |
700 | 19198 | } | 19279 | } |
701 | @@ -19271,16 +19352,24 @@ else | |||
702 | 19271 | #define NULL (void*)0 | 19352 | #define NULL (void*)0 |
703 | 19272 | #endif | 19353 | #endif |
704 | 19273 | 19354 | ||
705 | 19355 | #ifdef __STDC__ | ||
706 | 19356 | static void *task(void *p) | ||
707 | 19357 | #else | ||
708 | 19274 | static void *task(p) | 19358 | static void *task(p) |
709 | 19275 | void *p; | 19359 | void *p; |
710 | 19360 | #endif | ||
711 | 19276 | { | 19361 | { |
712 | 19277 | return (void *) (p == NULL); | 19362 | return (void *) (p == NULL); |
713 | 19278 | } | 19363 | } |
714 | 19279 | 19364 | ||
715 | 19280 | 19365 | ||
716 | 19366 | #ifdef __STDC__ | ||
717 | 19367 | int main(int argc, char **argv) | ||
718 | 19368 | #else | ||
719 | 19281 | int main(argc, argv) | 19369 | int main(argc, argv) |
720 | 19282 | int argc; | 19370 | int argc; |
721 | 19283 | char **argv; | 19371 | char **argv; |
722 | 19372 | #endif | ||
723 | 19284 | { | 19373 | { |
724 | 19285 | 19374 | ||
725 | 19286 | /* pthread test function */ | 19375 | /* pthread test function */ |
726 | @@ -19382,8 +19471,12 @@ else | |||
727 | 19382 | #define NULL (void*)0 | 19471 | #define NULL (void*)0 |
728 | 19383 | #endif | 19472 | #endif |
729 | 19384 | 19473 | ||
730 | 19474 | #ifdef __STDC__ | ||
731 | 19475 | static void *task(void *p) | ||
732 | 19476 | #else | ||
733 | 19385 | static void *task(p) | 19477 | static void *task(p) |
734 | 19386 | void *p; | 19478 | void *p; |
735 | 19479 | #endif | ||
736 | 19387 | { | 19480 | { |
737 | 19388 | return (void *) (p == NULL); | 19481 | return (void *) (p == NULL); |
738 | 19389 | } | 19482 | } |
739 | @@ -19462,16 +19555,24 @@ else | |||
740 | 19462 | #define NULL (void*)0 | 19555 | #define NULL (void*)0 |
741 | 19463 | #endif | 19556 | #endif |
742 | 19464 | 19557 | ||
743 | 19558 | #ifdef __STDC__ | ||
744 | 19559 | static void *task(void *p) | ||
745 | 19560 | #else | ||
746 | 19465 | static void *task(p) | 19561 | static void *task(p) |
747 | 19466 | void *p; | 19562 | void *p; |
748 | 19563 | #endif | ||
749 | 19467 | { | 19564 | { |
750 | 19468 | return (void *) (p == NULL); | 19565 | return (void *) (p == NULL); |
751 | 19469 | } | 19566 | } |
752 | 19470 | 19567 | ||
753 | 19471 | 19568 | ||
754 | 19569 | #ifdef __STDC__ | ||
755 | 19570 | int main(int argc, char **argv) | ||
756 | 19571 | #else | ||
757 | 19472 | int main(argc, argv) | 19572 | int main(argc, argv) |
758 | 19473 | int argc; | 19573 | int argc; |
759 | 19474 | char **argv; | 19574 | char **argv; |
760 | 19575 | #endif | ||
761 | 19475 | { | 19576 | { |
762 | 19476 | 19577 | ||
763 | 19477 | /* pthread test function */ | 19578 | /* pthread test function */ |
764 | @@ -19573,8 +19674,12 @@ else | |||
765 | 19573 | #define NULL (void*)0 | 19674 | #define NULL (void*)0 |
766 | 19574 | #endif | 19675 | #endif |
767 | 19575 | 19676 | ||
768 | 19677 | #ifdef __STDC__ | ||
769 | 19678 | static void *task(void *p) | ||
770 | 19679 | #else | ||
771 | 19576 | static void *task(p) | 19680 | static void *task(p) |
772 | 19577 | void *p; | 19681 | void *p; |
773 | 19682 | #endif | ||
774 | 19578 | { | 19683 | { |
775 | 19579 | return (void *) (p == NULL); | 19684 | return (void *) (p == NULL); |
776 | 19580 | } | 19685 | } |
777 | @@ -19653,16 +19758,24 @@ else | |||
778 | 19653 | #define NULL (void*)0 | 19758 | #define NULL (void*)0 |
779 | 19654 | #endif | 19759 | #endif |
780 | 19655 | 19760 | ||
781 | 19761 | #ifdef __STDC__ | ||
782 | 19762 | static void *task(void *p) | ||
783 | 19763 | #else | ||
784 | 19656 | static void *task(p) | 19764 | static void *task(p) |
785 | 19657 | void *p; | 19765 | void *p; |
786 | 19766 | #endif | ||
787 | 19658 | { | 19767 | { |
788 | 19659 | return (void *) (p == NULL); | 19768 | return (void *) (p == NULL); |
789 | 19660 | } | 19769 | } |
790 | 19661 | 19770 | ||
791 | 19662 | 19771 | ||
792 | 19772 | #ifdef __STDC__ | ||
793 | 19773 | int main(int argc, char **argv) | ||
794 | 19774 | #else | ||
795 | 19663 | int main(argc, argv) | 19775 | int main(argc, argv) |
796 | 19664 | int argc; | 19776 | int argc; |
797 | 19665 | char **argv; | 19777 | char **argv; |
798 | 19778 | #endif | ||
799 | 19666 | { | 19779 | { |
800 | 19667 | 19780 | ||
801 | 19668 | /* pthread test function */ | 19781 | /* pthread test function */ |
802 | @@ -19763,8 +19876,12 @@ else | |||
803 | 19763 | #define NULL (void*)0 | 19876 | #define NULL (void*)0 |
804 | 19764 | #endif | 19877 | #endif |
805 | 19765 | 19878 | ||
806 | 19879 | #ifdef __STDC__ | ||
807 | 19880 | static void *task(void *p) | ||
808 | 19881 | #else | ||
809 | 19766 | static void *task(p) | 19882 | static void *task(p) |
810 | 19767 | void *p; | 19883 | void *p; |
811 | 19884 | #endif | ||
812 | 19768 | { | 19885 | { |
813 | 19769 | return (void *) (p == NULL); | 19886 | return (void *) (p == NULL); |
814 | 19770 | } | 19887 | } |
815 | @@ -19843,16 +19960,24 @@ else | |||
816 | 19843 | #define NULL (void*)0 | 19960 | #define NULL (void*)0 |
817 | 19844 | #endif | 19961 | #endif |
818 | 19845 | 19962 | ||
819 | 19963 | #ifdef __STDC__ | ||
820 | 19964 | static void *task(void *p) | ||
821 | 19965 | #else | ||
822 | 19846 | static void *task(p) | 19966 | static void *task(p) |
823 | 19847 | void *p; | 19967 | void *p; |
824 | 19968 | #endif | ||
825 | 19848 | { | 19969 | { |
826 | 19849 | return (void *) (p == NULL); | 19970 | return (void *) (p == NULL); |
827 | 19850 | } | 19971 | } |
828 | 19851 | 19972 | ||
829 | 19852 | 19973 | ||
830 | 19974 | #ifdef __STDC__ | ||
831 | 19975 | int main(int argc, char **argv) | ||
832 | 19976 | #else | ||
833 | 19853 | int main(argc, argv) | 19977 | int main(argc, argv) |
834 | 19854 | int argc; | 19978 | int argc; |
835 | 19855 | char **argv; | 19979 | char **argv; |
836 | 19980 | #endif | ||
837 | 19856 | { | 19981 | { |
838 | 19857 | 19982 | ||
839 | 19858 | /* pthread test function */ | 19983 | /* pthread test function */ |
840 | @@ -19954,8 +20079,12 @@ else | |||
841 | 19954 | #define NULL (void*)0 | 20079 | #define NULL (void*)0 |
842 | 19955 | #endif | 20080 | #endif |
843 | 19956 | 20081 | ||
844 | 20082 | #ifdef __STDC__ | ||
845 | 20083 | static void *task(void *p) | ||
846 | 20084 | #else | ||
847 | 19957 | static void *task(p) | 20085 | static void *task(p) |
848 | 19958 | void *p; | 20086 | void *p; |
849 | 20087 | #endif | ||
850 | 19959 | { | 20088 | { |
851 | 19960 | return (void *) (p == NULL); | 20089 | return (void *) (p == NULL); |
852 | 19961 | } | 20090 | } |
853 | @@ -20034,16 +20163,24 @@ else | |||
854 | 20034 | #define NULL (void*)0 | 20163 | #define NULL (void*)0 |
855 | 20035 | #endif | 20164 | #endif |
856 | 20036 | 20165 | ||
857 | 20166 | #ifdef __STDC__ | ||
858 | 20167 | static void *task(void *p) | ||
859 | 20168 | #else | ||
860 | 20037 | static void *task(p) | 20169 | static void *task(p) |
861 | 20038 | void *p; | 20170 | void *p; |
862 | 20171 | #endif | ||
863 | 20039 | { | 20172 | { |
864 | 20040 | return (void *) (p == NULL); | 20173 | return (void *) (p == NULL); |
865 | 20041 | } | 20174 | } |
866 | 20042 | 20175 | ||
867 | 20043 | 20176 | ||
868 | 20177 | #ifdef __STDC__ | ||
869 | 20178 | int main(int argc, char **argv) | ||
870 | 20179 | #else | ||
871 | 20044 | int main(argc, argv) | 20180 | int main(argc, argv) |
872 | 20045 | int argc; | 20181 | int argc; |
873 | 20046 | char **argv; | 20182 | char **argv; |
874 | 20183 | #endif | ||
875 | 20047 | { | 20184 | { |
876 | 20048 | 20185 | ||
877 | 20049 | /* pthread test function */ | 20186 | /* pthread test function */ |
878 | @@ -20145,8 +20282,12 @@ else | |||
879 | 20145 | #define NULL (void*)0 | 20282 | #define NULL (void*)0 |
880 | 20146 | #endif | 20283 | #endif |
881 | 20147 | 20284 | ||
882 | 20285 | #ifdef __STDC__ | ||
883 | 20286 | static void *task(void *p) | ||
884 | 20287 | #else | ||
885 | 20148 | static void *task(p) | 20288 | static void *task(p) |
886 | 20149 | void *p; | 20289 | void *p; |
887 | 20290 | #endif | ||
888 | 20150 | { | 20291 | { |
889 | 20151 | return (void *) (p == NULL); | 20292 | return (void *) (p == NULL); |
890 | 20152 | } | 20293 | } |
891 | @@ -20225,16 +20366,24 @@ else | |||
892 | 20225 | #define NULL (void*)0 | 20366 | #define NULL (void*)0 |
893 | 20226 | #endif | 20367 | #endif |
894 | 20227 | 20368 | ||
895 | 20369 | #ifdef __STDC__ | ||
896 | 20370 | static void *task(void *p) | ||
897 | 20371 | #else | ||
898 | 20228 | static void *task(p) | 20372 | static void *task(p) |
899 | 20229 | void *p; | 20373 | void *p; |
900 | 20374 | #endif | ||
901 | 20230 | { | 20375 | { |
902 | 20231 | return (void *) (p == NULL); | 20376 | return (void *) (p == NULL); |
903 | 20232 | } | 20377 | } |
904 | 20233 | 20378 | ||
905 | 20234 | 20379 | ||
906 | 20380 | #ifdef __STDC__ | ||
907 | 20381 | int main(int argc, char **argv) | ||
908 | 20382 | #else | ||
909 | 20235 | int main(argc, argv) | 20383 | int main(argc, argv) |
910 | 20236 | int argc; | 20384 | int argc; |
911 | 20237 | char **argv; | 20385 | char **argv; |
912 | 20386 | #endif | ||
913 | 20238 | { | 20387 | { |
914 | 20239 | 20388 | ||
915 | 20240 | /* pthread test function */ | 20389 | /* pthread test function */ |
916 | @@ -20335,8 +20484,12 @@ else | |||
917 | 20335 | #define NULL (void*)0 | 20484 | #define NULL (void*)0 |
918 | 20336 | #endif | 20485 | #endif |
919 | 20337 | 20486 | ||
920 | 20487 | #ifdef __STDC__ | ||
921 | 20488 | static void *task(void *p) | ||
922 | 20489 | #else | ||
923 | 20338 | static void *task(p) | 20490 | static void *task(p) |
924 | 20339 | void *p; | 20491 | void *p; |
925 | 20492 | #endif | ||
926 | 20340 | { | 20493 | { |
927 | 20341 | return (void *) (p == NULL); | 20494 | return (void *) (p == NULL); |
928 | 20342 | } | 20495 | } |
929 | @@ -20415,16 +20568,24 @@ else | |||
930 | 20415 | #define NULL (void*)0 | 20568 | #define NULL (void*)0 |
931 | 20416 | #endif | 20569 | #endif |
932 | 20417 | 20570 | ||
933 | 20571 | #ifdef __STDC__ | ||
934 | 20572 | static void *task(void *p) | ||
935 | 20573 | #else | ||
936 | 20418 | static void *task(p) | 20574 | static void *task(p) |
937 | 20419 | void *p; | 20575 | void *p; |
938 | 20576 | #endif | ||
939 | 20420 | { | 20577 | { |
940 | 20421 | return (void *) (p == NULL); | 20578 | return (void *) (p == NULL); |
941 | 20422 | } | 20579 | } |
942 | 20423 | 20580 | ||
943 | 20424 | 20581 | ||
944 | 20582 | #ifdef __STDC__ | ||
945 | 20583 | int main(int argc, char **argv) | ||
946 | 20584 | #else | ||
947 | 20425 | int main(argc, argv) | 20585 | int main(argc, argv) |
948 | 20426 | int argc; | 20586 | int argc; |
949 | 20427 | char **argv; | 20587 | char **argv; |
950 | 20588 | #endif | ||
951 | 20428 | { | 20589 | { |
952 | 20429 | 20590 | ||
953 | 20430 | /* pthread test function */ | 20591 | /* pthread test function */ |
954 | @@ -20525,8 +20686,12 @@ else | |||
955 | 20525 | #define NULL (void*)0 | 20686 | #define NULL (void*)0 |
956 | 20526 | #endif | 20687 | #endif |
957 | 20527 | 20688 | ||
958 | 20689 | #ifdef __STDC__ | ||
959 | 20690 | static void *task(void *p) | ||
960 | 20691 | #else | ||
961 | 20528 | static void *task(p) | 20692 | static void *task(p) |
962 | 20529 | void *p; | 20693 | void *p; |
963 | 20694 | #endif | ||
964 | 20530 | { | 20695 | { |
965 | 20531 | return (void *) (p == NULL); | 20696 | return (void *) (p == NULL); |
966 | 20532 | } | 20697 | } |
967 | @@ -20605,16 +20770,24 @@ else | |||
968 | 20605 | #define NULL (void*)0 | 20770 | #define NULL (void*)0 |
969 | 20606 | #endif | 20771 | #endif |
970 | 20607 | 20772 | ||
971 | 20773 | #ifdef __STDC__ | ||
972 | 20774 | static void *task(void *p) | ||
973 | 20775 | #else | ||
974 | 20608 | static void *task(p) | 20776 | static void *task(p) |
975 | 20609 | void *p; | 20777 | void *p; |
976 | 20778 | #endif | ||
977 | 20610 | { | 20779 | { |
978 | 20611 | return (void *) (p == NULL); | 20780 | return (void *) (p == NULL); |
979 | 20612 | } | 20781 | } |
980 | 20613 | 20782 | ||
981 | 20614 | 20783 | ||
982 | 20784 | #ifdef __STDC__ | ||
983 | 20785 | int main(int argc, char **argv) | ||
984 | 20786 | #else | ||
985 | 20615 | int main(argc, argv) | 20787 | int main(argc, argv) |
986 | 20616 | int argc; | 20788 | int argc; |
987 | 20617 | char **argv; | 20789 | char **argv; |
988 | 20790 | #endif | ||
989 | 20618 | { | 20791 | { |
990 | 20619 | 20792 | ||
991 | 20620 | /* pthread test function */ | 20793 | /* pthread test function */ |
992 | @@ -20716,8 +20889,12 @@ else | |||
993 | 20716 | #define NULL (void*)0 | 20889 | #define NULL (void*)0 |
994 | 20717 | #endif | 20890 | #endif |
995 | 20718 | 20891 | ||
996 | 20892 | #ifdef __STDC__ | ||
997 | 20893 | static void *task(void *p) | ||
998 | 20894 | #else | ||
999 | 20719 | static void *task(p) | 20895 | static void *task(p) |
1000 | 20720 | void *p; | 20896 | void *p; |
1001 | 20897 | #endif | ||
1002 | 20721 | { | 20898 | { |
1003 | 20722 | return (void *) (p == NULL); | 20899 | return (void *) (p == NULL); |
1004 | 20723 | } | 20900 | } |
1005 | @@ -20796,16 +20973,24 @@ else | |||
1006 | 20796 | #define NULL (void*)0 | 20973 | #define NULL (void*)0 |
1007 | 20797 | #endif | 20974 | #endif |
1008 | 20798 | 20975 | ||
1009 | 20976 | #ifdef __STDC__ | ||
1010 | 20977 | static void *task(void *p) | ||
1011 | 20978 | #else | ||
1012 | 20799 | static void *task(p) | 20979 | static void *task(p) |
1013 | 20800 | void *p; | 20980 | void *p; |
1014 | 20981 | #endif | ||
1015 | 20801 | { | 20982 | { |
1016 | 20802 | return (void *) (p == NULL); | 20983 | return (void *) (p == NULL); |
1017 | 20803 | } | 20984 | } |
1018 | 20804 | 20985 | ||
1019 | 20805 | 20986 | ||
1020 | 20987 | #ifdef __STDC__ | ||
1021 | 20988 | int main(int argc, char **argv) | ||
1022 | 20989 | #else | ||
1023 | 20806 | int main(argc, argv) | 20990 | int main(argc, argv) |
1024 | 20807 | int argc; | 20991 | int argc; |
1025 | 20808 | char **argv; | 20992 | char **argv; |
1026 | 20993 | #endif | ||
1027 | 20809 | { | 20994 | { |
1028 | 20810 | 20995 | ||
1029 | 20811 | /* pthread test function */ | 20996 | /* pthread test function */ |
1030 | @@ -21017,14 +21202,12 @@ else | |||
1031 | 21017 | /* end confdefs.h. */ | 21202 | /* end confdefs.h. */ |
1032 | 21018 | 21203 | ||
1033 | 21019 | #include <pthread.h> | 21204 | #include <pthread.h> |
1037 | 21020 | #ifndef NULL | 21205 | pthread_t thread; |
1035 | 21021 | #define NULL (void*)0 | ||
1036 | 21022 | #endif | ||
1038 | 21023 | 21206 | ||
1039 | 21024 | int | 21207 | int |
1040 | 21025 | main () | 21208 | main () |
1041 | 21026 | { | 21209 | { |
1043 | 21027 | pthread_detach(NULL); | 21210 | pthread_detach(thread); |
1044 | 21028 | ; | 21211 | ; |
1045 | 21029 | return 0; | 21212 | return 0; |
1046 | 21030 | } | 21213 | } |
1047 | @@ -21138,16 +21321,24 @@ else | |||
1048 | 21138 | #define NULL (void*)0 | 21321 | #define NULL (void*)0 |
1049 | 21139 | #endif | 21322 | #endif |
1050 | 21140 | 21323 | ||
1051 | 21324 | #ifdef __STDC__ | ||
1052 | 21325 | static void *task(void *p) | ||
1053 | 21326 | #else | ||
1054 | 21141 | static void *task(p) | 21327 | static void *task(p) |
1055 | 21142 | void *p; | 21328 | void *p; |
1056 | 21329 | #endif | ||
1057 | 21143 | { | 21330 | { |
1058 | 21144 | return (void *) (p == NULL); | 21331 | return (void *) (p == NULL); |
1059 | 21145 | } | 21332 | } |
1060 | 21146 | 21333 | ||
1061 | 21147 | 21334 | ||
1062 | 21335 | #ifdef __STDC__ | ||
1063 | 21336 | int main(int argc, char **argv) | ||
1064 | 21337 | #else | ||
1065 | 21148 | int main(argc, argv) | 21338 | int main(argc, argv) |
1066 | 21149 | int argc; | 21339 | int argc; |
1067 | 21150 | char **argv; | 21340 | char **argv; |
1068 | 21341 | #endif | ||
1069 | 21151 | { | 21342 | { |
1070 | 21152 | 21343 | ||
1071 | 21153 | /* pthread test function */ | 21344 | /* pthread test function */ |
1072 | @@ -21237,6 +21428,9 @@ else | |||
1073 | 21237 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 21428 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1074 | 21238 | /* end confdefs.h. */ | 21429 | /* end confdefs.h. */ |
1075 | 21239 | 21430 | ||
1076 | 21431 | #define _XOPEN_SOURCE 500 /* For pthread_setconcurrency() on glibc */ | ||
1077 | 21432 | #include <stdlib.h> | ||
1078 | 21433 | #include <stdio.h> | ||
1079 | 21240 | #include <sys/types.h> | 21434 | #include <sys/types.h> |
1080 | 21241 | #include <sys/time.h> | 21435 | #include <sys/time.h> |
1081 | 21242 | #include <unistd.h> | 21436 | #include <unistd.h> |
1082 | @@ -21247,8 +21441,12 @@ else | |||
1083 | 21247 | 21441 | ||
1084 | 21248 | static int fildes[2]; | 21442 | static int fildes[2]; |
1085 | 21249 | 21443 | ||
1086 | 21444 | #ifdef __STDC__ | ||
1087 | 21445 | static void *task(void *p) | ||
1088 | 21446 | #else | ||
1089 | 21250 | static void *task(p) | 21447 | static void *task(p) |
1090 | 21251 | void *p; | 21448 | void *p; |
1091 | 21449 | #endif | ||
1092 | 21252 | { | 21450 | { |
1093 | 21253 | int i; | 21451 | int i; |
1094 | 21254 | struct timeval tv; | 21452 | struct timeval tv; |
1095 | @@ -21272,9 +21470,13 @@ static void *task(p) | |||
1096 | 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 */ |
1097 | 21273 | } | 21471 | } |
1098 | 21274 | 21472 | ||
1099 | 21473 | #ifdef __STDC__ | ||
1100 | 21474 | int main(int argc, char **argv) | ||
1101 | 21475 | #else | ||
1102 | 21275 | int main(argc, argv) | 21476 | int main(argc, argv) |
1103 | 21276 | int argc; | 21477 | int argc; |
1104 | 21277 | char **argv; | 21478 | char **argv; |
1105 | 21479 | #endif | ||
1106 | 21278 | { | 21480 | { |
1107 | 21279 | pthread_t t; | 21481 | pthread_t t; |
1108 | 21280 | 21482 | ||
1109 | @@ -22566,8 +22768,8 @@ $as_echo "no" >&6; } | |||
1110 | 22566 | fi | 22768 | fi |
1111 | 22567 | 22769 | ||
1112 | 22568 | pkg_failed=no | 22770 | pkg_failed=no |
1115 | 22569 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WT" >&5 | 22771 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wiredtiger" >&5 |
1116 | 22570 | $as_echo_n "checking for WT... " >&6; } | 22772 | $as_echo_n "checking for wiredtiger... " >&6; } |
1117 | 22571 | 22773 | ||
1118 | 22572 | if test -n "$WT_CFLAGS"; then | 22774 | if test -n "$WT_CFLAGS"; then |
1119 | 22573 | pkg_cv_WT_CFLAGS="$WT_CFLAGS" | 22775 | pkg_cv_WT_CFLAGS="$WT_CFLAGS" |
1120 | @@ -22607,7 +22809,7 @@ fi | |||
1121 | 22607 | 22809 | ||
1122 | 22608 | 22810 | ||
1123 | 22609 | if test $pkg_failed = yes; then | 22811 | if test $pkg_failed = yes; then |
1125 | 22610 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | 22812 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
1126 | 22611 | $as_echo "no" >&6; } | 22813 | $as_echo "no" >&6; } |
1127 | 22612 | 22814 | ||
1128 | 22613 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | 22815 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
1129 | @@ -22634,7 +22836,7 @@ Alternatively, you may set the environment variables WT_CFLAGS | |||
1130 | 22634 | and WT_LIBS to avoid the need to call pkg-config. | 22836 | and WT_LIBS to avoid the need to call pkg-config. |
1131 | 22635 | See the pkg-config man page for more details." "$LINENO" 5 | 22837 | See the pkg-config man page for more details." "$LINENO" 5 |
1132 | 22636 | elif test $pkg_failed = untried; then | 22838 | elif test $pkg_failed = untried; then |
1134 | 22637 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | 22839 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
1135 | 22638 | $as_echo "no" >&6; } | 22840 | $as_echo "no" >&6; } |
1136 | 22639 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | 22841 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
1137 | 22640 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | 22842 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
1138 | @@ -23734,7 +23936,8 @@ else | |||
1139 | 23734 | /* end confdefs.h. */ | 23936 | /* end confdefs.h. */ |
1140 | 23735 | 23937 | ||
1141 | 23736 | #include <ctype.h> | 23938 | #include <ctype.h> |
1143 | 23737 | main() | 23939 | #include <stdlib.h> |
1144 | 23940 | int main(void) | ||
1145 | 23738 | { | 23941 | { |
1146 | 23739 | if ('C' == toupper('C')) | 23942 | if ('C' == toupper('C')) |
1147 | 23740 | exit(0); | 23943 | exit(0); |
1148 | @@ -25785,7 +25988,7 @@ $as_echo "#define HAVE_LIBSODIUM 1" >>confdefs.h | |||
1149 | 25785 | 25988 | ||
1150 | 25786 | BUILD_PW_ARGON2=$ol_enable_argon2 | 25989 | BUILD_PW_ARGON2=$ol_enable_argon2 |
1151 | 25787 | if test "$ol_enable_argon2" = "yes" ; then | 25990 | if test "$ol_enable_argon2" = "yes" ; then |
1153 | 25788 | SLAPD_DYNAMIC_PWMODS="$SLAPD_DYNAMIC_PWDMODS argon2.la" | 25991 | SLAPD_DYNAMIC_PWMODS="$SLAPD_DYNAMIC_PWMODS argon2.la" |
1154 | 25789 | fi | 25992 | fi |
1155 | 25790 | 25993 | ||
1156 | 25791 | cat >>confdefs.h <<_ACEOF | 25994 | cat >>confdefs.h <<_ACEOF |
1157 | diff --git a/configure.ac b/configure.ac | |||
1158 | index c8dfa2a..6ddfee5 100644 | |||
1159 | --- a/configure.ac | |||
1160 | +++ b/configure.ac | |||
1161 | @@ -25,7 +25,7 @@ dnl ================================================================ | |||
1162 | 25 | dnl Configure.in for OpenLDAP | 25 | dnl Configure.in for OpenLDAP |
1163 | 26 | AC_COPYRIGHT([[Copyright 1998-2022 The OpenLDAP Foundation. All rights reserved. | 26 | AC_COPYRIGHT([[Copyright 1998-2022 The OpenLDAP Foundation. All rights reserved. |
1164 | 27 | Restrictions apply, see COPYRIGHT and LICENSE files.]]) | 27 | Restrictions apply, see COPYRIGHT and LICENSE files.]]) |
1166 | 28 | AC_REVISION([$Id: 3943f6265060065483db582e5c7bef14fe934d80 $]) | 28 | AC_REVISION([$Id: a4836a8a0218326643db20d8131fc717d1fc3edf $]) |
1167 | 29 | AC_INIT([OpenLDAP],,[https://bugs.openldap.org],,[https://www.openldap.org]) | 29 | AC_INIT([OpenLDAP],,[https://bugs.openldap.org],,[https://www.openldap.org]) |
1168 | 30 | AC_CONFIG_SRCDIR(build/version.sh)dnl | 30 | AC_CONFIG_SRCDIR(build/version.sh)dnl |
1169 | 31 | dnl ---------------------------------------------------------------- | 31 | dnl ---------------------------------------------------------------- |
1170 | @@ -1009,7 +1009,11 @@ dnl ---------------------------------------------------------------- | |||
1171 | 1009 | AC_CHECK_HEADERS( sys/epoll.h ) | 1009 | AC_CHECK_HEADERS( sys/epoll.h ) |
1172 | 1010 | if test "${ac_cv_header_sys_epoll_h}" = yes; then | 1010 | if test "${ac_cv_header_sys_epoll_h}" = yes; then |
1173 | 1011 | AC_MSG_CHECKING(for epoll system call) | 1011 | AC_MSG_CHECKING(for epoll system call) |
1175 | 1012 | AC_RUN_IFELSE([AC_LANG_SOURCE([[int main(int argc, char **argv) | 1012 | AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h> |
1176 | 1013 | #ifdef HAVE_SYS_POLL_H | ||
1177 | 1014 | #include <sys/epoll.h> | ||
1178 | 1015 | #endif | ||
1179 | 1016 | int main(int argc, char **argv) | ||
1180 | 1013 | { | 1017 | { |
1181 | 1014 | int epfd = epoll_create(256); | 1018 | int epfd = epoll_create(256); |
1182 | 1015 | exit (epfd == -1 ? 1 : 0); | 1019 | exit (epfd == -1 ? 1 : 0); |
1183 | @@ -1232,7 +1236,7 @@ if test $ol_with_tls = openssl || test $ol_with_tls = auto ; then | |||
1184 | 1232 | [#endif]])], | 1236 | [#endif]])], |
1185 | 1233 | , [AC_MSG_FAILURE([OpenSSL 1.1.1 or newer required])]) | 1237 | , [AC_MSG_FAILURE([OpenSSL 1.1.1 or newer required])]) |
1186 | 1234 | 1238 | ||
1188 | 1235 | AC_CHECK_LIB(ssl, SSL_export_keying_material_early, | 1239 | AC_CHECK_LIB(ssl, SSL_CTX_set_ciphersuites, |
1189 | 1236 | [have_openssl=yes], [have_openssl=no], | 1240 | [have_openssl=yes], [have_openssl=no], |
1190 | 1237 | [-lcrypto]) | 1241 | [-lcrypto]) |
1191 | 1238 | 1242 | ||
1192 | @@ -1362,10 +1366,10 @@ case $ol_with_threads in auto | yes | posix) | |||
1193 | 1362 | dnl pthread_create() in -lpthread (many) | 1366 | dnl pthread_create() in -lpthread (many) |
1194 | 1363 | dnl pthread_create() in -lc_r (FreeBSD) | 1367 | dnl pthread_create() in -lc_r (FreeBSD) |
1195 | 1364 | dnl | 1368 | dnl |
1197 | 1365 | dnl Check pthread (draft4) flags (depreciated) | 1369 | dnl Check pthread (draft4) flags (deprecated) |
1198 | 1366 | dnl pthread_create() with -threads (OSF/1) | 1370 | dnl pthread_create() with -threads (OSF/1) |
1199 | 1367 | dnl | 1371 | dnl |
1201 | 1368 | dnl Check pthread (draft4) libraries (depreciated) | 1372 | dnl Check pthread (draft4) libraries (deprecated) |
1202 | 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) |
1203 | 1370 | dnl pthread_mutex_lock() in -lpthreads -lmach -lexc (OSF/1) | 1374 | dnl pthread_mutex_lock() in -lpthreads -lmach -lexc (OSF/1) |
1204 | 1371 | dnl pthread_mutex_trylock() in -lpthreads -lexc (OSF/1) | 1375 | dnl pthread_mutex_trylock() in -lpthreads -lexc (OSF/1) |
1205 | @@ -1386,7 +1390,7 @@ case $ol_with_threads in auto | yes | posix) | |||
1206 | 1386 | ol_link_threads=posix | 1390 | ol_link_threads=posix |
1207 | 1387 | ol_link_pthreads="" | 1391 | ol_link_pthreads="" |
1208 | 1388 | fi | 1392 | fi |
1210 | 1389 | 1393 | ||
1211 | 1390 | dnl OL_PTHREAD_TRY([-mt], [ol_cv_pthread_mt]) | 1394 | dnl OL_PTHREAD_TRY([-mt], [ol_cv_pthread_mt]) |
1212 | 1391 | OL_PTHREAD_TRY([-kthread], [ol_cv_pthread_kthread]) | 1395 | OL_PTHREAD_TRY([-kthread], [ol_cv_pthread_kthread]) |
1213 | 1392 | OL_PTHREAD_TRY([-pthread], [ol_cv_pthread_pthread]) | 1396 | OL_PTHREAD_TRY([-pthread], [ol_cv_pthread_pthread]) |
1214 | @@ -1473,10 +1477,8 @@ pthread_rwlock_t rwlock; | |||
1215 | 1473 | dnl save the flags | 1477 | dnl save the flags |
1216 | 1474 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ | 1478 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
1217 | 1475 | #include <pthread.h> | 1479 | #include <pthread.h> |
1222 | 1476 | #ifndef NULL | 1480 | pthread_t thread; |
1223 | 1477 | #define NULL (void*)0 | 1481 | ]], [[pthread_detach(thread);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no]) |
1220 | 1478 | #endif | ||
1221 | 1479 | ]], [[pthread_detach(NULL);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no]) | ||
1224 | 1480 | ]) | 1482 | ]) |
1225 | 1481 | 1483 | ||
1226 | 1482 | if test $ol_cv_func_pthread_detach = no ; then | 1484 | if test $ol_cv_func_pthread_detach = no ; then |
1227 | @@ -1531,6 +1533,9 @@ dnl esac | |||
1228 | 1531 | AC_CACHE_CHECK([if select yields when using pthreads], | 1533 | AC_CACHE_CHECK([if select yields when using pthreads], |
1229 | 1532 | ol_cv_pthread_select_yields,[ | 1534 | ol_cv_pthread_select_yields,[ |
1230 | 1533 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ | 1535 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
1231 | 1536 | #define _XOPEN_SOURCE 500 /* For pthread_setconcurrency() on glibc */ | ||
1232 | 1537 | #include <stdlib.h> | ||
1233 | 1538 | #include <stdio.h> | ||
1234 | 1534 | #include <sys/types.h> | 1539 | #include <sys/types.h> |
1235 | 1535 | #include <sys/time.h> | 1540 | #include <sys/time.h> |
1236 | 1536 | #include <unistd.h> | 1541 | #include <unistd.h> |
1237 | @@ -1541,8 +1546,12 @@ dnl esac | |||
1238 | 1541 | 1546 | ||
1239 | 1542 | static int fildes[2]; | 1547 | static int fildes[2]; |
1240 | 1543 | 1548 | ||
1241 | 1549 | #ifdef __STDC__ | ||
1242 | 1550 | static void *task(void *p) | ||
1243 | 1551 | #else | ||
1244 | 1544 | static void *task(p) | 1552 | static void *task(p) |
1245 | 1545 | void *p; | 1553 | void *p; |
1246 | 1554 | #endif | ||
1247 | 1546 | { | 1555 | { |
1248 | 1547 | int i; | 1556 | int i; |
1249 | 1548 | struct timeval tv; | 1557 | struct timeval tv; |
1250 | @@ -1566,9 +1575,13 @@ static void *task(p) | |||
1251 | 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 */ |
1252 | 1567 | } | 1576 | } |
1253 | 1568 | 1577 | ||
1254 | 1578 | #ifdef __STDC__ | ||
1255 | 1579 | int main(int argc, char **argv) | ||
1256 | 1580 | #else | ||
1257 | 1569 | int main(argc, argv) | 1581 | int main(argc, argv) |
1258 | 1570 | int argc; | 1582 | int argc; |
1259 | 1571 | char **argv; | 1583 | char **argv; |
1260 | 1584 | #endif | ||
1261 | 1572 | { | 1585 | { |
1262 | 1573 | pthread_t t; | 1586 | pthread_t t; |
1263 | 1574 | 1587 | ||
1264 | @@ -3093,7 +3106,7 @@ if test "$ol_enable_argon2" = "yes" ; then | |||
1265 | 3093 | 3106 | ||
1266 | 3094 | BUILD_PW_ARGON2=$ol_enable_argon2 | 3107 | BUILD_PW_ARGON2=$ol_enable_argon2 |
1267 | 3095 | if test "$ol_enable_argon2" = "yes" ; then | 3108 | if test "$ol_enable_argon2" = "yes" ; then |
1269 | 3096 | SLAPD_DYNAMIC_PWMODS="$SLAPD_DYNAMIC_PWDMODS argon2.la" | 3109 | SLAPD_DYNAMIC_PWMODS="$SLAPD_DYNAMIC_PWMODS argon2.la" |
1270 | 3097 | fi | 3110 | fi |
1271 | 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]) |
1272 | 3099 | fi | 3112 | fi |
1273 | diff --git a/contrib/ldaptcl/tclAppInit.c b/contrib/ldaptcl/tclAppInit.c | |||
1274 | index f84e182..d50a724 100644 | |||
1275 | --- a/contrib/ldaptcl/tclAppInit.c | |||
1276 | +++ b/contrib/ldaptcl/tclAppInit.c | |||
1277 | @@ -45,9 +45,7 @@ EXTERN int Tcltest_Init _ANSI_ARGS_((Tcl_Interp *interp)); | |||
1278 | 45 | */ | 45 | */ |
1279 | 46 | 46 | ||
1280 | 47 | int | 47 | int |
1284 | 48 | main(argc, argv) | 48 | main(int argc, char **argv) |
1282 | 49 | int argc; /* Number of command-line arguments. */ | ||
1283 | 50 | char **argv; /* Values of command-line arguments. */ | ||
1285 | 51 | { | 49 | { |
1286 | 52 | #ifdef USE_TCLX | 50 | #ifdef USE_TCLX |
1287 | 53 | TclX_Main(argc, argv, Tcl_AppInit); | 51 | TclX_Main(argc, argv, Tcl_AppInit); |
1288 | diff --git a/contrib/ldaptcl/tkAppInit.c b/contrib/ldaptcl/tkAppInit.c | |||
1289 | index 68fd956..6934523 100644 | |||
1290 | --- a/contrib/ldaptcl/tkAppInit.c | |||
1291 | +++ b/contrib/ldaptcl/tkAppInit.c | |||
1292 | @@ -37,16 +37,9 @@ int (*tclDummyMathPtr)() = matherr; | |||
1293 | 37 | * This is the main program for the application. | 37 | * This is the main program for the application. |
1294 | 38 | *----------------------------------------------------------------------------- | 38 | *----------------------------------------------------------------------------- |
1295 | 39 | */ | 39 | */ |
1296 | 40 | #ifdef __cplusplus | ||
1297 | 41 | int | 40 | int |
1298 | 42 | main (int argc, | 41 | main (int argc, |
1299 | 43 | char **argv) | 42 | char **argv) |
1300 | 44 | #else | ||
1301 | 45 | int | ||
1302 | 46 | main (argc, argv) | ||
1303 | 47 | int argc; | ||
1304 | 48 | char **argv; | ||
1305 | 49 | #endif | ||
1306 | 50 | { | 43 | { |
1307 | 51 | #ifdef USE_TCLX | 44 | #ifdef USE_TCLX |
1308 | 52 | TkX_Main(argc, argv, Tcl_AppInit); | 45 | TkX_Main(argc, argv, Tcl_AppInit); |
1309 | @@ -68,14 +61,8 @@ main (argc, argv) | |||
1310 | 68 | * interp->result if an error occurs. | 61 | * interp->result if an error occurs. |
1311 | 69 | *----------------------------------------------------------------------------- | 62 | *----------------------------------------------------------------------------- |
1312 | 70 | */ | 63 | */ |
1313 | 71 | #ifdef __cplusplus | ||
1314 | 72 | int | 64 | int |
1315 | 73 | Tcl_AppInit (Tcl_Interp *interp) | 65 | Tcl_AppInit (Tcl_Interp *interp) |
1316 | 74 | #else | ||
1317 | 75 | int | ||
1318 | 76 | Tcl_AppInit (interp) | ||
1319 | 77 | Tcl_Interp *interp; | ||
1320 | 78 | #endif | ||
1321 | 79 | { | 66 | { |
1322 | 80 | if (Tcl_Init (interp) == TCL_ERROR) { | 67 | if (Tcl_Init (interp) == TCL_ERROR) { |
1323 | 81 | return TCL_ERROR; | 68 | return TCL_ERROR; |
1324 | diff --git a/contrib/slapd-modules/datamorph/tests/run b/contrib/slapd-modules/datamorph/tests/run | |||
1325 | index 6a38431..239bff7 100755 | |||
1326 | --- a/contrib/slapd-modules/datamorph/tests/run | |||
1327 | +++ b/contrib/slapd-modules/datamorph/tests/run | |||
1328 | @@ -12,218 +12,6 @@ | |||
1329 | 12 | ## A copy of this license is available in the file LICENSE in the | 12 | ## A copy of this license is available in the file LICENSE in the |
1330 | 13 | ## top-level directory of the distribution or, alternatively, at | 13 | ## top-level directory of the distribution or, alternatively, at |
1331 | 14 | ## <http://www.OpenLDAP.org/license.html>. | 14 | ## <http://www.OpenLDAP.org/license.html>. |
1332 | 15 | ## | ||
1333 | 16 | ## ACKNOWLEDGEMENTS: | ||
1334 | 17 | ## This module was written in 2016 by Ondřej Kuzník for Symas Corp. | ||
1335 | 18 | |||
1336 | 19 | USAGE="$0 [-b <backend>] [-c] [-k] [-l #] [-p] [-s {ro|rp}] [-u] [-w] <script>" | ||
1337 | 20 | |||
1338 | 21 | TOPSRCDIR="${SRCDIR-$LDAP_SRC}" | ||
1339 | 22 | SRCDIR="${TOPSRCDIR}/tests" | ||
1340 | 23 | eval `grep EGREP_CMD= ${LDAP_BUILD}/tests/run` | ||
1341 | 24 | eval `$EGREP_CMD -e '^LN_S=' ${LDAP_BUILD}/tests/run` | ||
1342 | 25 | |||
1343 | 26 | export SRCDIR TOPSRCDIR LN_S EGREP_CMD | ||
1344 | 27 | |||
1345 | 28 | . "${SRCDIR}/scripts/defines.sh" | ||
1346 | 29 | |||
1347 | 30 | BACKEND= | ||
1348 | 31 | CLEAN=no | ||
1349 | 32 | WAIT=0 | ||
1350 | 33 | KILLSERVERS=yes | ||
1351 | 34 | PRESERVE=${PRESERVE-no} | ||
1352 | 35 | SYNCMODE=${SYNCMODE-rp} | ||
1353 | 36 | USERDATA=no | ||
1354 | 37 | LOOP=1 | ||
1355 | 38 | COUNTER=1 | ||
1356 | 39 | |||
1357 | 40 | while test $# -gt 0 ; do | ||
1358 | 41 | case "$1" in | ||
1359 | 42 | -b | -backend) | ||
1360 | 43 | BACKEND="$2" | ||
1361 | 44 | shift; shift ;; | ||
1362 | 45 | |||
1363 | 46 | -c | -clean) | ||
1364 | 47 | CLEAN=yes | ||
1365 | 48 | shift ;; | ||
1366 | 49 | |||
1367 | 50 | -k | -kill) | ||
1368 | 51 | KILLSERVERS=no | ||
1369 | 52 | shift ;; | ||
1370 | 53 | -l | -loop) | ||
1371 | 54 | NUM="`echo $2 | sed 's/[0-9]//g'`" | ||
1372 | 55 | if [ -z "$NUM" ]; then | ||
1373 | 56 | LOOP=$2 | ||
1374 | 57 | else | ||
1375 | 58 | echo "Loop variable not an int: $2" | ||
1376 | 59 | echo "$USAGE"; exit 1 | ||
1377 | 60 | fi | ||
1378 | 61 | shift ; | ||
1379 | 62 | shift ;; | ||
1380 | 63 | |||
1381 | 64 | -p | -preserve) | ||
1382 | 65 | PRESERVE=yes | ||
1383 | 66 | shift ;; | ||
1384 | 67 | |||
1385 | 68 | -s | -syncmode) | ||
1386 | 69 | case "$2" in | ||
1387 | 70 | ro | rp) | ||
1388 | 71 | SYNCMODE="$2" | ||
1389 | 72 | ;; | ||
1390 | 73 | *) | ||
1391 | 74 | echo "unknown sync mode $2" | ||
1392 | 75 | echo "$USAGE"; exit 1 | ||
1393 | 76 | ;; | ||
1394 | 77 | esac | ||
1395 | 78 | shift; shift ;; | ||
1396 | 79 | |||
1397 | 80 | -u | -userdata) | ||
1398 | 81 | USERDATA=yes | ||
1399 | 82 | shift ;; | ||
1400 | 83 | |||
1401 | 84 | -w | -wait) | ||
1402 | 85 | WAIT=1 | ||
1403 | 86 | shift ;; | ||
1404 | 87 | |||
1405 | 88 | -) | ||
1406 | 89 | shift | ||
1407 | 90 | break ;; | ||
1408 | 91 | |||
1409 | 92 | -*) | ||
1410 | 93 | echo "$USAGE"; exit 1 | ||
1411 | 94 | ;; | ||
1412 | 95 | |||
1413 | 96 | *) | ||
1414 | 97 | break ;; | ||
1415 | 98 | esac | ||
1416 | 99 | done | ||
1417 | 100 | |||
1418 | 101 | eval `$EGREP_CMD -e '^AC' ${LDAP_BUILD}/tests/run` | ||
1419 | 102 | export `$EGREP_CMD -e '^AC' ${LDAP_BUILD}/tests/run | sed 's/=.*//'` | ||
1420 | 103 | |||
1421 | 104 | if test -z "$BACKEND" ; then | ||
1422 | 105 | for b in mdb ; do | ||
1423 | 106 | if eval "test \"\$AC_$b\" != no" ; then | ||
1424 | 107 | BACKEND=$b | ||
1425 | 108 | break | ||
1426 | 109 | fi | ||
1427 | 110 | done | ||
1428 | 111 | if test -z "$BACKEND" ; then | ||
1429 | 112 | echo "No suitable default database backend configured" >&2 | ||
1430 | 113 | exit 1 | ||
1431 | 114 | fi | ||
1432 | 115 | fi | ||
1433 | 116 | |||
1434 | 117 | BACKENDTYPE=`eval 'echo $AC_'$BACKEND` | ||
1435 | 118 | if test "x$BACKENDTYPE" = "x" ; then | ||
1436 | 119 | BACKENDTYPE="unknown" | ||
1437 | 120 | fi | ||
1438 | 121 | |||
1439 | 122 | # Backend features. indexdb: indexing and unchecked limit. | ||
1440 | 123 | # maindb: main storage backend. Currently index,limits,mode,paged results. | ||
1441 | 124 | INDEXDB=noindexdb MAINDB=nomaindb | ||
1442 | 125 | case $BACKEND in | ||
1443 | 126 | mdb) INDEXDB=indexdb MAINDB=maindb ;; | ||
1444 | 127 | ndb) INDEXDB=indexdb ;; | ||
1445 | 128 | esac | ||
1446 | 129 | |||
1447 | 130 | export BACKEND BACKENDTYPE INDEXDB MAINDB \ | ||
1448 | 131 | WAIT KILLSERVERS PRESERVE SYNCMODE USERDATA \ | ||
1449 | 132 | SRCDIR | ||
1450 | 133 | |||
1451 | 134 | if test $# = 0 ; then | ||
1452 | 135 | echo "$USAGE"; exit 1 | ||
1453 | 136 | fi | ||
1454 | 137 | |||
1455 | 138 | # need defines.sh for the definitions of the directories | ||
1456 | 139 | . $SRCDIR/scripts/defines.sh | ||
1457 | 140 | |||
1458 | 141 | SCRIPTDIR="${TOPDIR}/tests/scripts" | ||
1459 | 142 | |||
1460 | 143 | export SCRIPTDIR | ||
1461 | 144 | |||
1462 | 145 | SCRIPTNAME="$1" | ||
1463 | 146 | shift | ||
1464 | 147 | |||
1465 | 148 | if test -x "${SCRIPTDIR}/${SCRIPTNAME}" ; then | ||
1466 | 149 | SCRIPT="${SCRIPTDIR}/${SCRIPTNAME}" | ||
1467 | 150 | elif test -x "`echo ${SCRIPTDIR}/test*-${SCRIPTNAME}`"; then | ||
1468 | 151 | SCRIPT="`echo ${SCRIPTDIR}/test*-${SCRIPTNAME}`" | ||
1469 | 152 | elif test -x "`echo ${SCRIPTDIR}/${SCRIPTNAME}-*`"; then | ||
1470 | 153 | SCRIPT="`echo ${SCRIPTDIR}/${SCRIPTNAME}-*`" | ||
1471 | 154 | else | ||
1472 | 155 | echo "run: ${SCRIPTNAME} not found (or not executable)" | ||
1473 | 156 | exit 1; | ||
1474 | 157 | fi | ||
1475 | 158 | |||
1476 | 159 | if test ! -r ${DATADIR}/test.ldif ; then | ||
1477 | 160 | ${LN_S} ${SRCDIR}/data ${DATADIR} | ||
1478 | 161 | fi | ||
1479 | 162 | if test ! -r ${SCHEMADIR}/core.schema ; then | ||
1480 | 163 | ${LN_S} ${TOPSRCDIR}/servers/slapd/schema ${SCHEMADIR} | ||
1481 | 164 | fi | ||
1482 | 165 | if test ! -r ./data; then | ||
1483 | 166 | ${LN_S} ${TOPDIR}/tests/data ./ | ||
1484 | 167 | fi | ||
1485 | 168 | |||
1486 | 169 | if test -d ${TESTDIR} ; then | ||
1487 | 170 | if test $PRESERVE = no ; then | ||
1488 | 171 | echo "Cleaning up test run directory leftover from previous run." | ||
1489 | 172 | /bin/rm -rf ${TESTDIR} | ||
1490 | 173 | elif test $PRESERVE = yes ; then | ||
1491 | 174 | echo "Cleaning up only database directories leftover from previous run." | ||
1492 | 175 | /bin/rm -rf ${TESTDIR}/db.* | ||
1493 | 176 | fi | ||
1494 | 177 | fi | ||
1495 | 178 | if test $BACKEND = ndb ; then | ||
1496 | 179 | mysql --user root <<EOF | ||
1497 | 180 | drop database if exists db_1; | ||
1498 | 181 | drop database if exists db_2; | ||
1499 | 182 | drop database if exists db_3; | ||
1500 | 183 | drop database if exists db_4; | ||
1501 | 184 | drop database if exists db_5; | ||
1502 | 185 | drop database if exists db_6; | ||
1503 | 186 | EOF | ||
1504 | 187 | fi | ||
1505 | 188 | mkdir -p ${TESTDIR} | ||
1506 | 189 | |||
1507 | 190 | if test $USERDATA = yes ; then | ||
1508 | 191 | if test ! -d userdata ; then | ||
1509 | 192 | echo "User data directory (userdata) does not exist." | ||
1510 | 193 | exit 1 | ||
1511 | 194 | fi | ||
1512 | 195 | cp -R userdata/* ${TESTDIR} | ||
1513 | 196 | fi | ||
1514 | 197 | |||
1515 | 198 | # disable LDAP initialization | ||
1516 | 199 | LDAPNOINIT=true; export LDAPNOINIT | ||
1517 | 200 | |||
1518 | 201 | echo "Running ${SCRIPT} for ${BACKEND}..." | ||
1519 | 202 | while [ $COUNTER -le $LOOP ]; do | ||
1520 | 203 | if [ $LOOP -gt 1 ]; then | ||
1521 | 204 | echo "Running $COUNTER of $LOOP iterations" | ||
1522 | 205 | fi | ||
1523 | 206 | $SCRIPT $* | ||
1524 | 207 | RC=$? | ||
1525 | 208 | 15 | ||
1532 | 209 | if test $CLEAN = yes ; then | 16 | TOPSRCDIR="$SRCDIR" OBJDIR="${LDAP_BUILD}" SRCDIR="${SRCDIR}/tests" DEFSDIR="${SRCDIR}/scripts" SCRIPTDIR="${TOPDIR}/tests/scripts" "${LDAP_BUILD}/tests/run" $* |
1527 | 210 | echo "Cleaning up test run directory from this run." | ||
1528 | 211 | /bin/rm -rf ${TESTDIR} | ||
1529 | 212 | echo "Cleaning up symlinks." | ||
1530 | 213 | /bin/rm -f ${DATADIR} ${SCHEMADIR} | ||
1531 | 214 | fi | ||
1533 | 215 | 17 | ||
1534 | 216 | if [ $RC -ne 0 ]; then | ||
1535 | 217 | if [ $LOOP -gt 1 ]; then | ||
1536 | 218 | echo "Failed after $COUNTER of $LOOP iterations" | ||
1537 | 219 | fi | ||
1538 | 220 | exit $RC | ||
1539 | 221 | else | ||
1540 | 222 | COUNTER=`expr $COUNTER + 1` | ||
1541 | 223 | if [ $COUNTER -le $LOOP ]; then | ||
1542 | 224 | echo "Cleaning up test run directory from this run." | ||
1543 | 225 | /bin/rm -rf ${TESTDIR} | ||
1544 | 226 | fi | ||
1545 | 227 | fi | ||
1546 | 228 | done | ||
1547 | 229 | exit $RC | ||
1548 | diff --git a/contrib/slapd-modules/emptyds/tests/run b/contrib/slapd-modules/emptyds/tests/run | |||
1549 | index e28820c..239bff7 100755 | |||
1550 | --- a/contrib/slapd-modules/emptyds/tests/run | |||
1551 | +++ b/contrib/slapd-modules/emptyds/tests/run | |||
1552 | @@ -12,207 +12,6 @@ | |||
1553 | 12 | ## A copy of this license is available in the file LICENSE in the | 12 | ## A copy of this license is available in the file LICENSE in the |
1554 | 13 | ## top-level directory of the distribution or, alternatively, at | 13 | ## top-level directory of the distribution or, alternatively, at |
1555 | 14 | ## <http://www.OpenLDAP.org/license.html>. | 14 | ## <http://www.OpenLDAP.org/license.html>. |
1556 | 15 | ## | ||
1557 | 16 | ## ACKNOWLEDGEMENTS: | ||
1558 | 17 | ## This module was written in 2016 by Ondřej Kuzník for Symas Corp. | ||
1559 | 18 | |||
1560 | 19 | USAGE="$0 [-b <backend>] [-c] [-k] [-l #] [-p] [-s {ro|rp}] [-u] [-w] <script>" | ||
1561 | 20 | |||
1562 | 21 | TOPSRCDIR="${SRCDIR-$LDAP_SRC}" | ||
1563 | 22 | SRCDIR="${TOPSRCDIR}/tests" | ||
1564 | 23 | eval `grep EGREP_CMD= ${LDAP_BUILD}/tests/run` | ||
1565 | 24 | eval `$EGREP_CMD -e '^LN_S=' ${LDAP_BUILD}/tests/run` | ||
1566 | 25 | |||
1567 | 26 | export SRCDIR TOPSRCDIR LN_S EGREP_CMD | ||
1568 | 27 | |||
1569 | 28 | . "${SRCDIR}/scripts/defines.sh" | ||
1570 | 29 | |||
1571 | 30 | BACKEND= | ||
1572 | 31 | CLEAN=no | ||
1573 | 32 | WAIT=0 | ||
1574 | 33 | KILLSERVERS=yes | ||
1575 | 34 | PRESERVE=${PRESERVE-no} | ||
1576 | 35 | SYNCMODE=${SYNCMODE-rp} | ||
1577 | 36 | USERDATA=no | ||
1578 | 37 | LOOP=1 | ||
1579 | 38 | COUNTER=1 | ||
1580 | 39 | |||
1581 | 40 | while test $# -gt 0 ; do | ||
1582 | 41 | case "$1" in | ||
1583 | 42 | -b | -backend) | ||
1584 | 43 | BACKEND="$2" | ||
1585 | 44 | shift; shift ;; | ||
1586 | 45 | |||
1587 | 46 | -c | -clean) | ||
1588 | 47 | CLEAN=yes | ||
1589 | 48 | shift ;; | ||
1590 | 49 | |||
1591 | 50 | -k | -kill) | ||
1592 | 51 | KILLSERVERS=no | ||
1593 | 52 | shift ;; | ||
1594 | 53 | -l | -loop) | ||
1595 | 54 | NUM="`echo $2 | sed 's/[0-9]//g'`" | ||
1596 | 55 | if [ -z "$NUM" ]; then | ||
1597 | 56 | LOOP=$2 | ||
1598 | 57 | else | ||
1599 | 58 | echo "Loop variable not an int: $2" | ||
1600 | 59 | echo "$USAGE"; exit 1 | ||
1601 | 60 | fi | ||
1602 | 61 | shift ; | ||
1603 | 62 | shift ;; | ||
1604 | 63 | |||
1605 | 64 | -p | -preserve) | ||
1606 | 65 | PRESERVE=yes | ||
1607 | 66 | shift ;; | ||
1608 | 67 | |||
1609 | 68 | -s | -syncmode) | ||
1610 | 69 | case "$2" in | ||
1611 | 70 | ro | rp) | ||
1612 | 71 | SYNCMODE="$2" | ||
1613 | 72 | ;; | ||
1614 | 73 | *) | ||
1615 | 74 | echo "unknown sync mode $2" | ||
1616 | 75 | echo "$USAGE"; exit 1 | ||
1617 | 76 | ;; | ||
1618 | 77 | esac | ||
1619 | 78 | shift; shift ;; | ||
1620 | 79 | |||
1621 | 80 | -u | -userdata) | ||
1622 | 81 | USERDATA=yes | ||
1623 | 82 | shift ;; | ||
1624 | 83 | |||
1625 | 84 | -w | -wait) | ||
1626 | 85 | WAIT=1 | ||
1627 | 86 | shift ;; | ||
1628 | 87 | |||
1629 | 88 | -) | ||
1630 | 89 | shift | ||
1631 | 90 | break ;; | ||
1632 | 91 | |||
1633 | 92 | -*) | ||
1634 | 93 | echo "$USAGE"; exit 1 | ||
1635 | 94 | ;; | ||
1636 | 95 | |||
1637 | 96 | *) | ||
1638 | 97 | break ;; | ||
1639 | 98 | esac | ||
1640 | 99 | done | ||
1641 | 100 | |||
1642 | 101 | eval `$EGREP_CMD -e '^AC' ${LDAP_BUILD}/tests/run` | ||
1643 | 102 | export `$EGREP_CMD -e '^AC' ${LDAP_BUILD}/tests/run | sed 's/=.*//'` | ||
1644 | 103 | |||
1645 | 104 | if test -z "$BACKEND" ; then | ||
1646 | 105 | for b in mdb ; do | ||
1647 | 106 | if eval "test \"\$AC_$b\" != no" ; then | ||
1648 | 107 | BACKEND=$b | ||
1649 | 108 | break | ||
1650 | 109 | fi | ||
1651 | 110 | done | ||
1652 | 111 | if test -z "$BACKEND" ; then | ||
1653 | 112 | echo "No suitable default database backend configured" >&2 | ||
1654 | 113 | exit 1 | ||
1655 | 114 | fi | ||
1656 | 115 | fi | ||
1657 | 116 | |||
1658 | 117 | BACKENDTYPE=`eval 'echo $AC_'$BACKEND` | ||
1659 | 118 | if test "x$BACKENDTYPE" = "x" ; then | ||
1660 | 119 | BACKENDTYPE="unknown" | ||
1661 | 120 | fi | ||
1662 | 121 | |||
1663 | 122 | # Backend features. indexdb: indexing and unchecked limit. | ||
1664 | 123 | # maindb: main storage backend. Currently index,limits,mode,paged results. | ||
1665 | 124 | INDEXDB=noindexdb MAINDB=nomaindb | ||
1666 | 125 | case $BACKEND in | ||
1667 | 126 | mdb) INDEXDB=indexdb MAINDB=maindb ;; | ||
1668 | 127 | esac | ||
1669 | 128 | |||
1670 | 129 | export BACKEND BACKENDTYPE INDEXDB MAINDB \ | ||
1671 | 130 | WAIT KILLSERVERS PRESERVE SYNCMODE USERDATA \ | ||
1672 | 131 | SRCDIR | ||
1673 | 132 | |||
1674 | 133 | if test $# = 0 ; then | ||
1675 | 134 | echo "$USAGE"; exit 1 | ||
1676 | 135 | fi | ||
1677 | 136 | |||
1678 | 137 | # need defines.sh for the definitions of the directories | ||
1679 | 138 | . $SRCDIR/scripts/defines.sh | ||
1680 | 139 | |||
1681 | 140 | SCRIPTDIR="${TOPDIR}/tests/scripts" | ||
1682 | 141 | |||
1683 | 142 | export SCRIPTDIR | ||
1684 | 143 | |||
1685 | 144 | SCRIPTNAME="$1" | ||
1686 | 145 | shift | ||
1687 | 146 | |||
1688 | 147 | if test -x "${SCRIPTDIR}/${SCRIPTNAME}" ; then | ||
1689 | 148 | SCRIPT="${SCRIPTDIR}/${SCRIPTNAME}" | ||
1690 | 149 | elif test -x "`echo ${SCRIPTDIR}/test*-${SCRIPTNAME}`"; then | ||
1691 | 150 | SCRIPT="`echo ${SCRIPTDIR}/test*-${SCRIPTNAME}`" | ||
1692 | 151 | elif test -x "`echo ${SCRIPTDIR}/${SCRIPTNAME}-*`"; then | ||
1693 | 152 | SCRIPT="`echo ${SCRIPTDIR}/${SCRIPTNAME}-*`" | ||
1694 | 153 | else | ||
1695 | 154 | echo "run: ${SCRIPTNAME} not found (or not executable)" | ||
1696 | 155 | exit 1; | ||
1697 | 156 | fi | ||
1698 | 157 | |||
1699 | 158 | if test ! -r ${DATADIR}/test.ldif ; then | ||
1700 | 159 | ${LN_S} ${SRCDIR}/data ${DATADIR} | ||
1701 | 160 | fi | ||
1702 | 161 | if test ! -r ${SCHEMADIR}/core.schema ; then | ||
1703 | 162 | ${LN_S} ${TOPSRCDIR}/servers/slapd/schema ${SCHEMADIR} | ||
1704 | 163 | fi | ||
1705 | 164 | if test ! -r ./data; then | ||
1706 | 165 | ${LN_S} ${TOPDIR}/tests/data ./ | ||
1707 | 166 | fi | ||
1708 | 167 | |||
1709 | 168 | if test -d ${TESTDIR} ; then | ||
1710 | 169 | if test $PRESERVE = no ; then | ||
1711 | 170 | echo "Cleaning up test run directory leftover from previous run." | ||
1712 | 171 | /bin/rm -rf ${TESTDIR} | ||
1713 | 172 | elif test $PRESERVE = yes ; then | ||
1714 | 173 | echo "Cleaning up only database directories leftover from previous run." | ||
1715 | 174 | /bin/rm -rf ${TESTDIR}/db.* | ||
1716 | 175 | fi | ||
1717 | 176 | fi | ||
1718 | 177 | mkdir -p ${TESTDIR} | ||
1719 | 178 | |||
1720 | 179 | if test $USERDATA = yes ; then | ||
1721 | 180 | if test ! -d userdata ; then | ||
1722 | 181 | echo "User data directory (userdata) does not exist." | ||
1723 | 182 | exit 1 | ||
1724 | 183 | fi | ||
1725 | 184 | cp -R userdata/* ${TESTDIR} | ||
1726 | 185 | fi | ||
1727 | 186 | |||
1728 | 187 | # disable LDAP initialization | ||
1729 | 188 | LDAPNOINIT=true; export LDAPNOINIT | ||
1730 | 189 | |||
1731 | 190 | echo "Running ${SCRIPT} for ${BACKEND}..." | ||
1732 | 191 | while [ $COUNTER -le $LOOP ]; do | ||
1733 | 192 | if [ $LOOP -gt 1 ]; then | ||
1734 | 193 | echo "Running $COUNTER of $LOOP iterations" | ||
1735 | 194 | fi | ||
1736 | 195 | $SCRIPT $* | ||
1737 | 196 | RC=$? | ||
1738 | 197 | 15 | ||
1745 | 198 | if test $CLEAN = yes ; then | 16 | TOPSRCDIR="$SRCDIR" OBJDIR="${LDAP_BUILD}" SRCDIR="${SRCDIR}/tests" DEFSDIR="${SRCDIR}/scripts" SCRIPTDIR="${TOPDIR}/tests/scripts" "${LDAP_BUILD}/tests/run" $* |
1740 | 199 | echo "Cleaning up test run directory from this run." | ||
1741 | 200 | /bin/rm -rf ${TESTDIR} | ||
1742 | 201 | echo "Cleaning up symlinks." | ||
1743 | 202 | /bin/rm -f ${DATADIR} ${SCHEMADIR} | ||
1744 | 203 | fi | ||
1746 | 204 | 17 | ||
1747 | 205 | if [ $RC -ne 0 ]; then | ||
1748 | 206 | if [ $LOOP -gt 1 ]; then | ||
1749 | 207 | echo "Failed after $COUNTER of $LOOP iterations" | ||
1750 | 208 | fi | ||
1751 | 209 | exit $RC | ||
1752 | 210 | else | ||
1753 | 211 | COUNTER=`expr $COUNTER + 1` | ||
1754 | 212 | if [ $COUNTER -le $LOOP ]; then | ||
1755 | 213 | echo "Cleaning up test run directory from this run." | ||
1756 | 214 | /bin/rm -rf ${TESTDIR} | ||
1757 | 215 | fi | ||
1758 | 216 | fi | ||
1759 | 217 | done | ||
1760 | 218 | exit $RC | ||
1761 | diff --git a/contrib/slapd-modules/variant/slapo-variant.5 b/contrib/slapd-modules/variant/slapo-variant.5 | |||
1762 | index a480744..f46eb69 100644 | |||
1763 | --- a/contrib/slapd-modules/variant/slapo-variant.5 | |||
1764 | +++ b/contrib/slapd-modules/variant/slapo-variant.5 | |||
1765 | @@ -341,14 +341,14 @@ olcVariantEntry: dc=example,dc=com | |||
1766 | 341 | 341 | ||
1767 | 342 | # share the Headquarters' address as the company address | 342 | # share the Headquarters' address as the company address |
1768 | 343 | dn: olcVariantVariantAttribute=postaladdress,name={0}example,olcOverlay={x}variant,$DATABASE | 343 | dn: olcVariantVariantAttribute=postaladdress,name={0}example,olcOverlay={x}variant,$DATABASE |
1770 | 344 | objectClass: olcVariantVariantAttribute | 344 | objectClass: olcVariantAttribute |
1771 | 345 | olcVariantVariantAttribute: postaladdress | 345 | olcVariantVariantAttribute: postaladdress |
1772 | 346 | olcVariantAlternativeAttribute: postaladdress | 346 | olcVariantAlternativeAttribute: postaladdress |
1773 | 347 | olcVariantAlternativeEntry: ou=Headquarters,dc=example,dc=com | 347 | olcVariantAlternativeEntry: ou=Headquarters,dc=example,dc=com |
1774 | 348 | 348 | ||
1775 | 349 | # populate telephonenumber from CEO's home phone | 349 | # populate telephonenumber from CEO's home phone |
1776 | 350 | dn: name=Take phone from CEO entry,name={0}example,olcOverlay={x}variant,$DATABASE | 350 | dn: name=Take phone from CEO entry,name={0}example,olcOverlay={x}variant,$DATABASE |
1778 | 351 | objectClass: olcVariantVariantAttribute | 351 | objectClass: olcVariantAttribute |
1779 | 352 | olcVariantVariantAttribute: telephonenumber | 352 | olcVariantVariantAttribute: telephonenumber |
1780 | 353 | olcVariantAlternativeAttribute: homephone | 353 | olcVariantAlternativeAttribute: homephone |
1781 | 354 | olcVariantAlternativeEntry: cn=John Doe,ou=People,dc=example,dc=com | 354 | olcVariantAlternativeEntry: cn=John Doe,ou=People,dc=example,dc=com |
1782 | 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 | |||
1783 | 355 | new file mode 100644 | 355 | new file mode 100644 |
1784 | index 0000000..071df0f | |||
1785 | --- /dev/null | |||
1786 | +++ b/contrib/slapd-modules/variant/tests/data/test001-04a-same-regex.ldif | |||
1787 | @@ -0,0 +1,4 @@ | |||
1788 | 1 | dn: name={3}regex,olcOverlay={0}variant,olcDatabase={1}mdb,cn=config | ||
1789 | 2 | changetype: modify | ||
1790 | 3 | replace: olcVariantEntryRegex | ||
1791 | 4 | olcVariantEntryRegex: (.*),(ou=.*technology.*)(,)dc=example,dc=com | ||
1792 | 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 | |||
1793 | 0 | new file mode 100644 | 5 | new file mode 100644 |
1794 | index 0000000..5fa1d3b | |||
1795 | --- /dev/null | |||
1796 | +++ b/contrib/slapd-modules/variant/tests/data/test001-04b-same-regex.ldif | |||
1797 | @@ -0,0 +1,4 @@ | |||
1798 | 1 | dn: name=regex,olcOverlay={0}variant,olcDatabase={1}@BACKEND@,cn=config | ||
1799 | 2 | changetype: add | ||
1800 | 3 | objectclass: olcVariantRegex | ||
1801 | 4 | olcVariantEntryRegex: .* | ||
1802 | diff --git a/contrib/slapd-modules/variant/tests/run b/contrib/slapd-modules/variant/tests/run | |||
1803 | index 6a38431..239bff7 100755 | |||
1804 | --- a/contrib/slapd-modules/variant/tests/run | |||
1805 | +++ b/contrib/slapd-modules/variant/tests/run | |||
1806 | @@ -12,218 +12,6 @@ | |||
1807 | 12 | ## A copy of this license is available in the file LICENSE in the | 12 | ## A copy of this license is available in the file LICENSE in the |
1808 | 13 | ## top-level directory of the distribution or, alternatively, at | 13 | ## top-level directory of the distribution or, alternatively, at |
1809 | 14 | ## <http://www.OpenLDAP.org/license.html>. | 14 | ## <http://www.OpenLDAP.org/license.html>. |
1810 | 15 | ## | ||
1811 | 16 | ## ACKNOWLEDGEMENTS: | ||
1812 | 17 | ## This module was written in 2016 by Ondřej Kuzník for Symas Corp. | ||
1813 | 18 | |||
1814 | 19 | USAGE="$0 [-b <backend>] [-c] [-k] [-l #] [-p] [-s {ro|rp}] [-u] [-w] <script>" | ||
1815 | 20 | |||
1816 | 21 | TOPSRCDIR="${SRCDIR-$LDAP_SRC}" | ||
1817 | 22 | SRCDIR="${TOPSRCDIR}/tests" | ||
1818 | 23 | eval `grep EGREP_CMD= ${LDAP_BUILD}/tests/run` | ||
1819 | 24 | eval `$EGREP_CMD -e '^LN_S=' ${LDAP_BUILD}/tests/run` | ||
1820 | 25 | |||
1821 | 26 | export SRCDIR TOPSRCDIR LN_S EGREP_CMD | ||
1822 | 27 | |||
1823 | 28 | . "${SRCDIR}/scripts/defines.sh" | ||
1824 | 29 | |||
1825 | 30 | BACKEND= | ||
1826 | 31 | CLEAN=no | ||
1827 | 32 | WAIT=0 | ||
1828 | 33 | KILLSERVERS=yes | ||
1829 | 34 | PRESERVE=${PRESERVE-no} | ||
1830 | 35 | SYNCMODE=${SYNCMODE-rp} | ||
1831 | 36 | USERDATA=no | ||
1832 | 37 | LOOP=1 | ||
1833 | 38 | COUNTER=1 | ||
1834 | 39 | |||
1835 | 40 | while test $# -gt 0 ; do | ||
1836 | 41 | case "$1" in | ||
1837 | 42 | -b | -backend) | ||
1838 | 43 | BACKEND="$2" | ||
1839 | 44 | shift; shift ;; | ||
1840 | 45 | |||
1841 | 46 | -c | -clean) | ||
1842 | 47 | CLEAN=yes | ||
1843 | 48 | shift ;; | ||
1844 | 49 | |||
1845 | 50 | -k | -kill) | ||
1846 | 51 | KILLSERVERS=no | ||
1847 | 52 | shift ;; | ||
1848 | 53 | -l | -loop) | ||
1849 | 54 | NUM="`echo $2 | sed 's/[0-9]//g'`" | ||
1850 | 55 | if [ -z "$NUM" ]; then | ||
1851 | 56 | LOOP=$2 | ||
1852 | 57 | else | ||
1853 | 58 | echo "Loop variable not an int: $2" | ||
1854 | 59 | echo "$USAGE"; exit 1 | ||
1855 | 60 | fi | ||
1856 | 61 | shift ; | ||
1857 | 62 | shift ;; | ||
1858 | 63 | |||
1859 | 64 | -p | -preserve) | ||
1860 | 65 | PRESERVE=yes | ||
1861 | 66 | shift ;; | ||
1862 | 67 | |||
1863 | 68 | -s | -syncmode) | ||
1864 | 69 | case "$2" in | ||
1865 | 70 | ro | rp) | ||
1866 | 71 | SYNCMODE="$2" | ||
1867 | 72 | ;; | ||
1868 | 73 | *) | ||
1869 | 74 | echo "unknown sync mode $2" | ||
1870 | 75 | echo "$USAGE"; exit 1 | ||
1871 | 76 | ;; | ||
1872 | 77 | esac | ||
1873 | 78 | shift; shift ;; | ||
1874 | 79 | |||
1875 | 80 | -u | -userdata) | ||
1876 | 81 | USERDATA=yes | ||
1877 | 82 | shift ;; | ||
1878 | 83 | |||
1879 | 84 | -w | -wait) | ||
1880 | 85 | WAIT=1 | ||
1881 | 86 | shift ;; | ||
1882 | 87 | |||
1883 | 88 | -) | ||
1884 | 89 | shift | ||
1885 | 90 | break ;; | ||
1886 | 91 | |||
1887 | 92 | -*) | ||
1888 | 93 | echo "$USAGE"; exit 1 | ||
1889 | 94 | ;; | ||
1890 | 95 | |||
1891 | 96 | *) | ||
1892 | 97 | break ;; | ||
1893 | 98 | esac | ||
1894 | 99 | done | ||
1895 | 100 | |||
1896 | 101 | eval `$EGREP_CMD -e '^AC' ${LDAP_BUILD}/tests/run` | ||
1897 | 102 | export `$EGREP_CMD -e '^AC' ${LDAP_BUILD}/tests/run | sed 's/=.*//'` | ||
1898 | 103 | |||
1899 | 104 | if test -z "$BACKEND" ; then | ||
1900 | 105 | for b in mdb ; do | ||
1901 | 106 | if eval "test \"\$AC_$b\" != no" ; then | ||
1902 | 107 | BACKEND=$b | ||
1903 | 108 | break | ||
1904 | 109 | fi | ||
1905 | 110 | done | ||
1906 | 111 | if test -z "$BACKEND" ; then | ||
1907 | 112 | echo "No suitable default database backend configured" >&2 | ||
1908 | 113 | exit 1 | ||
1909 | 114 | fi | ||
1910 | 115 | fi | ||
1911 | 116 | |||
1912 | 117 | BACKENDTYPE=`eval 'echo $AC_'$BACKEND` | ||
1913 | 118 | if test "x$BACKENDTYPE" = "x" ; then | ||
1914 | 119 | BACKENDTYPE="unknown" | ||
1915 | 120 | fi | ||
1916 | 121 | |||
1917 | 122 | # Backend features. indexdb: indexing and unchecked limit. | ||
1918 | 123 | # maindb: main storage backend. Currently index,limits,mode,paged results. | ||
1919 | 124 | INDEXDB=noindexdb MAINDB=nomaindb | ||
1920 | 125 | case $BACKEND in | ||
1921 | 126 | mdb) INDEXDB=indexdb MAINDB=maindb ;; | ||
1922 | 127 | ndb) INDEXDB=indexdb ;; | ||
1923 | 128 | esac | ||
1924 | 129 | |||
1925 | 130 | export BACKEND BACKENDTYPE INDEXDB MAINDB \ | ||
1926 | 131 | WAIT KILLSERVERS PRESERVE SYNCMODE USERDATA \ | ||
1927 | 132 | SRCDIR | ||
1928 | 133 | |||
1929 | 134 | if test $# = 0 ; then | ||
1930 | 135 | echo "$USAGE"; exit 1 | ||
1931 | 136 | fi | ||
1932 | 137 | |||
1933 | 138 | # need defines.sh for the definitions of the directories | ||
1934 | 139 | . $SRCDIR/scripts/defines.sh | ||
1935 | 140 | |||
1936 | 141 | SCRIPTDIR="${TOPDIR}/tests/scripts" | ||
1937 | 142 | |||
1938 | 143 | export SCRIPTDIR | ||
1939 | 144 | |||
1940 | 145 | SCRIPTNAME="$1" | ||
1941 | 146 | shift | ||
1942 | 147 | |||
1943 | 148 | if test -x "${SCRIPTDIR}/${SCRIPTNAME}" ; then | ||
1944 | 149 | SCRIPT="${SCRIPTDIR}/${SCRIPTNAME}" | ||
1945 | 150 | elif test -x "`echo ${SCRIPTDIR}/test*-${SCRIPTNAME}`"; then | ||
1946 | 151 | SCRIPT="`echo ${SCRIPTDIR}/test*-${SCRIPTNAME}`" | ||
1947 | 152 | elif test -x "`echo ${SCRIPTDIR}/${SCRIPTNAME}-*`"; then | ||
1948 | 153 | SCRIPT="`echo ${SCRIPTDIR}/${SCRIPTNAME}-*`" | ||
1949 | 154 | else | ||
1950 | 155 | echo "run: ${SCRIPTNAME} not found (or not executable)" | ||
1951 | 156 | exit 1; | ||
1952 | 157 | fi | ||
1953 | 158 | |||
1954 | 159 | if test ! -r ${DATADIR}/test.ldif ; then | ||
1955 | 160 | ${LN_S} ${SRCDIR}/data ${DATADIR} | ||
1956 | 161 | fi | ||
1957 | 162 | if test ! -r ${SCHEMADIR}/core.schema ; then | ||
1958 | 163 | ${LN_S} ${TOPSRCDIR}/servers/slapd/schema ${SCHEMADIR} | ||
1959 | 164 | fi | ||
1960 | 165 | if test ! -r ./data; then | ||
1961 | 166 | ${LN_S} ${TOPDIR}/tests/data ./ | ||
1962 | 167 | fi | ||
1963 | 168 | |||
1964 | 169 | if test -d ${TESTDIR} ; then | ||
1965 | 170 | if test $PRESERVE = no ; then | ||
1966 | 171 | echo "Cleaning up test run directory leftover from previous run." | ||
1967 | 172 | /bin/rm -rf ${TESTDIR} | ||
1968 | 173 | elif test $PRESERVE = yes ; then | ||
1969 | 174 | echo "Cleaning up only database directories leftover from previous run." | ||
1970 | 175 | /bin/rm -rf ${TESTDIR}/db.* | ||
1971 | 176 | fi | ||
1972 | 177 | fi | ||
1973 | 178 | if test $BACKEND = ndb ; then | ||
1974 | 179 | mysql --user root <<EOF | ||
1975 | 180 | drop database if exists db_1; | ||
1976 | 181 | drop database if exists db_2; | ||
1977 | 182 | drop database if exists db_3; | ||
1978 | 183 | drop database if exists db_4; | ||
1979 | 184 | drop database if exists db_5; | ||
1980 | 185 | drop database if exists db_6; | ||
1981 | 186 | EOF | ||
1982 | 187 | fi | ||
1983 | 188 | mkdir -p ${TESTDIR} | ||
1984 | 189 | |||
1985 | 190 | if test $USERDATA = yes ; then | ||
1986 | 191 | if test ! -d userdata ; then | ||
1987 | 192 | echo "User data directory (userdata) does not exist." | ||
1988 | 193 | exit 1 | ||
1989 | 194 | fi | ||
1990 | 195 | cp -R userdata/* ${TESTDIR} | ||
1991 | 196 | fi | ||
1992 | 197 | |||
1993 | 198 | # disable LDAP initialization | ||
1994 | 199 | LDAPNOINIT=true; export LDAPNOINIT | ||
1995 | 200 | |||
1996 | 201 | echo "Running ${SCRIPT} for ${BACKEND}..." | ||
1997 | 202 | while [ $COUNTER -le $LOOP ]; do | ||
1998 | 203 | if [ $LOOP -gt 1 ]; then | ||
1999 | 204 | echo "Running $COUNTER of $LOOP iterations" | ||
2000 | 205 | fi | ||
2001 | 206 | $SCRIPT $* | ||
2002 | 207 | RC=$? | ||
2003 | 208 | 15 | ||
2010 | 209 | if test $CLEAN = yes ; then | 16 | TOPSRCDIR="$SRCDIR" OBJDIR="${LDAP_BUILD}" SRCDIR="${SRCDIR}/tests" DEFSDIR="${SRCDIR}/scripts" SCRIPTDIR="${TOPDIR}/tests/scripts" "${LDAP_BUILD}/tests/run" $* |
2005 | 210 | echo "Cleaning up test run directory from this run." | ||
2006 | 211 | /bin/rm -rf ${TESTDIR} | ||
2007 | 212 | echo "Cleaning up symlinks." | ||
2008 | 213 | /bin/rm -f ${DATADIR} ${SCHEMADIR} | ||
2009 | 214 | fi | ||
2011 | 215 | 17 | ||
2012 | 216 | if [ $RC -ne 0 ]; then | ||
2013 | 217 | if [ $LOOP -gt 1 ]; then | ||
2014 | 218 | echo "Failed after $COUNTER of $LOOP iterations" | ||
2015 | 219 | fi | ||
2016 | 220 | exit $RC | ||
2017 | 221 | else | ||
2018 | 222 | COUNTER=`expr $COUNTER + 1` | ||
2019 | 223 | if [ $COUNTER -le $LOOP ]; then | ||
2020 | 224 | echo "Cleaning up test run directory from this run." | ||
2021 | 225 | /bin/rm -rf ${TESTDIR} | ||
2022 | 226 | fi | ||
2023 | 227 | fi | ||
2024 | 228 | done | ||
2025 | 229 | exit $RC | ||
2026 | diff --git a/contrib/slapd-modules/variant/variant.c b/contrib/slapd-modules/variant/variant.c | |||
2027 | index edf4832..cc1c693 100644 | |||
2028 | --- a/contrib/slapd-modules/variant/variant.c | |||
2029 | +++ b/contrib/slapd-modules/variant/variant.c | |||
2030 | @@ -282,9 +282,7 @@ variant_op_add( Operation *op, SlapReply *rs ) | |||
2031 | 282 | variantEntry_info *vei; | 282 | variantEntry_info *vei; |
2032 | 283 | int rc; | 283 | int rc; |
2033 | 284 | 284 | ||
2037 | 285 | /* Replication always uses the rootdn */ | 285 | if ( ov->passReplication && be_shadow_update( op ) ) { |
2035 | 286 | if ( ov->passReplication && SLAPD_SYNC_IS_SYNCCONN(op->o_connid) && | ||
2036 | 287 | be_isroot( op ) ) { | ||
2038 | 288 | return SLAP_CB_CONTINUE; | 286 | return SLAP_CB_CONTINUE; |
2039 | 289 | } | 287 | } |
2040 | 290 | 288 | ||
2041 | @@ -431,9 +429,7 @@ variant_op_mod( Operation *op, SlapReply *rs ) | |||
2042 | 431 | regmatch_t pmatch[10]; | 429 | regmatch_t pmatch[10]; |
2043 | 432 | int rc, nmatch = sizeof(pmatch) / sizeof(regmatch_t); | 430 | int rc, nmatch = sizeof(pmatch) / sizeof(regmatch_t); |
2044 | 433 | 431 | ||
2048 | 434 | /* Replication always uses the rootdn */ | 432 | if ( ov->passReplication && be_shadow_update( op ) ) { |
2046 | 435 | if ( ov->passReplication && SLAPD_SYNC_IS_SYNCCONN(op->o_connid) && | ||
2047 | 436 | be_isroot( op ) ) { | ||
2049 | 437 | return SLAP_CB_CONTINUE; | 433 | return SLAP_CB_CONTINUE; |
2050 | 438 | } | 434 | } |
2051 | 439 | 435 | ||
2052 | @@ -868,6 +864,9 @@ variant_set_dn( ConfigArgs *ca ) | |||
2053 | 868 | 864 | ||
2054 | 869 | dnMatch( &diff, 0, NULL, NULL, &vei->dn, &vei2->dn ); | 865 | dnMatch( &diff, 0, NULL, NULL, &vei->dn, &vei2->dn ); |
2055 | 870 | if ( !diff ) { | 866 | if ( !diff ) { |
2056 | 867 | snprintf( ca->cr_msg, sizeof(ca->cr_msg), | ||
2057 | 868 | "duplicate variant dn: %s", ca->value_ndn.bv_val ); | ||
2058 | 869 | Debug( LDAP_DEBUG_ANY, "%s: %s\n", ca->log, ca->cr_msg ); | ||
2059 | 871 | ca->reply.err = LDAP_CONSTRAINT_VIOLATION; | 870 | ca->reply.err = LDAP_CONSTRAINT_VIOLATION; |
2060 | 872 | return ca->reply.err; | 871 | return ca->reply.err; |
2061 | 873 | } | 872 | } |
2062 | @@ -889,7 +888,11 @@ variant_set_regex( ConfigArgs *ca ) | |||
2063 | 889 | } else if ( ca->op == LDAP_MOD_DELETE ) { | 888 | } else if ( ca->op == LDAP_MOD_DELETE ) { |
2064 | 890 | ber_memfree( vei->dn.bv_val ); | 889 | ber_memfree( vei->dn.bv_val ); |
2065 | 891 | BER_BVZERO( &vei->dn ); | 890 | BER_BVZERO( &vei->dn ); |
2067 | 892 | regfree( vei->regex ); | 891 | if ( vei->regex ) { |
2068 | 892 | regfree( vei->regex ); | ||
2069 | 893 | ch_free( vei->regex ); | ||
2070 | 894 | vei->regex = NULL; | ||
2071 | 895 | } | ||
2072 | 893 | return LDAP_SUCCESS; | 896 | return LDAP_SUCCESS; |
2073 | 894 | } | 897 | } |
2074 | 895 | 898 | ||
2075 | @@ -910,8 +913,9 @@ variant_set_regex( ConfigArgs *ca ) | |||
2076 | 910 | if ( vei == vei2 ) continue; | 913 | if ( vei == vei2 ) continue; |
2077 | 911 | 914 | ||
2078 | 912 | if ( !ber_bvcmp( &ca->value_bv, &vei2->dn ) ) { | 915 | if ( !ber_bvcmp( &ca->value_bv, &vei2->dn ) ) { |
2081 | 913 | ch_free( vei ); | 916 | snprintf( ca->cr_msg, sizeof(ca->cr_msg), |
2082 | 914 | ca->ca_private = NULL; | 917 | "duplicate variant regex: %s", ca->value_dn.bv_val ); |
2083 | 918 | Debug( LDAP_DEBUG_ANY, "%s: %s\n", ca->log, ca->cr_msg ); | ||
2084 | 915 | ca->reply.err = LDAP_CONSTRAINT_VIOLATION; | 919 | ca->reply.err = LDAP_CONSTRAINT_VIOLATION; |
2085 | 916 | return ca->reply.err; | 920 | return ca->reply.err; |
2086 | 917 | } | 921 | } |
2087 | @@ -920,6 +924,10 @@ variant_set_regex( ConfigArgs *ca ) | |||
2088 | 920 | vei->regex = ch_calloc( 1, sizeof(regex_t) ); | 924 | vei->regex = ch_calloc( 1, sizeof(regex_t) ); |
2089 | 921 | if ( regcomp( vei->regex, vei->dn.bv_val, REG_EXTENDED ) ) { | 925 | if ( regcomp( vei->regex, vei->dn.bv_val, REG_EXTENDED ) ) { |
2090 | 922 | ch_free( vei->regex ); | 926 | ch_free( vei->regex ); |
2091 | 927 | vei->regex = NULL; | ||
2092 | 928 | snprintf( ca->cr_msg, sizeof(ca->cr_msg), | ||
2093 | 929 | "cannot process regex: %s", vei->dn.bv_val ); | ||
2094 | 930 | Debug( LDAP_DEBUG_ANY, "%s: %s\n", ca->log, ca->cr_msg ); | ||
2095 | 923 | ca->reply.err = LDAP_CONSTRAINT_VIOLATION; | 931 | ca->reply.err = LDAP_CONSTRAINT_VIOLATION; |
2096 | 924 | return ca->reply.err; | 932 | return ca->reply.err; |
2097 | 925 | } | 933 | } |
2098 | @@ -969,9 +977,10 @@ variant_set_alt_pattern( ConfigArgs *ca ) | |||
2099 | 969 | if ( ( ( *p >= '0' ) && ( *p <= '9' ) ) || ( *p == '$' ) ) { | 977 | if ( ( ( *p >= '0' ) && ( *p <= '9' ) ) || ( *p == '$' ) ) { |
2100 | 970 | p += 1; | 978 | p += 1; |
2101 | 971 | } else { | 979 | } else { |
2104 | 972 | Debug( LDAP_DEBUG_ANY, "variant_set_alt_pattern: " | 980 | snprintf( ca->cr_msg, sizeof(ca->cr_msg), |
2105 | 973 | "invalid replacement pattern supplied '%s'\n", | 981 | "invalid replacement pattern supplied '%s'", |
2106 | 974 | ca->value_bv.bv_val ); | 982 | ca->value_bv.bv_val ); |
2107 | 983 | Debug( LDAP_DEBUG_ANY, "%s: %s\n", ca->log, ca->cr_msg ); | ||
2108 | 975 | ca->reply.err = LDAP_CONSTRAINT_VIOLATION; | 984 | ca->reply.err = LDAP_CONSTRAINT_VIOLATION; |
2109 | 976 | return ca->reply.err; | 985 | return ca->reply.err; |
2110 | 977 | } | 986 | } |
2111 | @@ -1017,6 +1026,9 @@ variant_set_attribute( ConfigArgs *ca ) | |||
2112 | 1017 | rc = slap_str2ad( s, ad, &text ); | 1026 | rc = slap_str2ad( s, ad, &text ); |
2113 | 1018 | ber_memfree( ca->value_string ); | 1027 | ber_memfree( ca->value_string ); |
2114 | 1019 | if ( rc ) { | 1028 | if ( rc ) { |
2115 | 1029 | snprintf( ca->cr_msg, sizeof(ca->cr_msg), | ||
2116 | 1030 | "attribute %s invalid: %s", s, text ); | ||
2117 | 1031 | Debug( LDAP_DEBUG_ANY, "%s: %s\n", ca->log, ca->cr_msg ); | ||
2118 | 1020 | return rc; | 1032 | return rc; |
2119 | 1021 | } | 1033 | } |
2120 | 1022 | 1034 | ||
2121 | @@ -1024,6 +1036,10 @@ variant_set_attribute( ConfigArgs *ca ) | |||
2122 | 1024 | if ( vai->attr && vai->alternative && | 1036 | if ( vai->attr && vai->alternative && |
2123 | 1025 | vai->attr->ad_type->sat_syntax != | 1037 | vai->attr->ad_type->sat_syntax != |
2124 | 1026 | vai->alternative->ad_type->sat_syntax ) { | 1038 | vai->alternative->ad_type->sat_syntax ) { |
2125 | 1039 | snprintf( ca->cr_msg, sizeof(ca->cr_msg), | ||
2126 | 1040 | "attribute '%s' syntax doesn't match alternative attribute '%s'", | ||
2127 | 1041 | vai->attr->ad_cname.bv_val, vai->alternative->ad_cname.bv_val ); | ||
2128 | 1042 | Debug( LDAP_DEBUG_ANY, "%s: %s\n", ca->log, ca->cr_msg ); | ||
2129 | 1027 | ca->reply.err = LDAP_CONSTRAINT_VIOLATION; | 1043 | ca->reply.err = LDAP_CONSTRAINT_VIOLATION; |
2130 | 1028 | return ca->reply.err; | 1044 | return ca->reply.err; |
2131 | 1029 | } | 1045 | } |
2132 | @@ -1033,6 +1049,9 @@ variant_set_attribute( ConfigArgs *ca ) | |||
2133 | 1033 | LDAP_SLIST_FOREACH( vai2, &vai->variant->attributes, next ) { | 1049 | LDAP_SLIST_FOREACH( vai2, &vai->variant->attributes, next ) { |
2134 | 1034 | if ( vai == vai2 ) continue; | 1050 | if ( vai == vai2 ) continue; |
2135 | 1035 | if ( vai->attr == vai2->attr ) { | 1051 | if ( vai->attr == vai2->attr ) { |
2136 | 1052 | snprintf( ca->cr_msg, sizeof(ca->cr_msg), | ||
2137 | 1053 | "duplicate attribute '%s'", vai->attr->ad_cname.bv_val ); | ||
2138 | 1054 | Debug( LDAP_DEBUG_ANY, "%s: %s\n", ca->log, ca->cr_msg ); | ||
2139 | 1036 | ca->reply.err = LDAP_CONSTRAINT_VIOLATION; | 1055 | ca->reply.err = LDAP_CONSTRAINT_VIOLATION; |
2140 | 1037 | return ca->reply.err; | 1056 | return ca->reply.err; |
2141 | 1038 | } | 1057 | } |
2142 | diff --git a/debian/changelog b/debian/changelog | |||
2143 | index 786cdf7..61b5af5 100644 | |||
2144 | --- a/debian/changelog | |||
2145 | +++ b/debian/changelog | |||
2146 | @@ -1,3 +1,11 @@ | |||
2147 | 1 | openldap (2.5.15+dfsg-0ubuntu0.22.04.1) jammy; urgency=medium | ||
2148 | 2 | |||
2149 | 3 | * New upstream version (LP: #2027079). | ||
2150 | 4 | - Several fixes, including to asynchronous connections to the OpenLDAP | ||
2151 | 5 | server. | ||
2152 | 6 | |||
2153 | 7 | -- Sergio Durigan Junior <sergio.durigan@canonical.com> Tue, 11 Jul 2023 15:26:41 -0400 | ||
2154 | 8 | |||
2155 | 1 | openldap (2.5.14+dfsg-0ubuntu0.22.04.2) jammy; urgency=medium | 9 | openldap (2.5.14+dfsg-0ubuntu0.22.04.2) jammy; urgency=medium |
2156 | 2 | 10 | ||
2157 | 3 | * Build the passwd/sha2 contrib module with -fno-strict-aliasing to | 11 | * Build the passwd/sha2 contrib module with -fno-strict-aliasing to |
2158 | diff --git a/doc/guide/admin/aspell.en.pws b/doc/guide/admin/aspell.en.pws | |||
2159 | index 63d3f0e..67bd346 100644 | |||
2160 | --- a/doc/guide/admin/aspell.en.pws | |||
2161 | +++ b/doc/guide/admin/aspell.en.pws | |||
2162 | @@ -680,7 +680,6 @@ affectsMultipleDSAs | |||
2163 | 680 | Preprocessor | 680 | Preprocessor |
2164 | 681 | lastName | 681 | lastName |
2165 | 682 | lldap | 682 | lldap |
2166 | 683 | cachesize | ||
2167 | 684 | slapauth | 683 | slapauth |
2168 | 685 | attributeType | 684 | attributeType |
2169 | 686 | attributetype | 685 | attributetype |
2170 | diff --git a/doc/guide/admin/guide.html b/doc/guide/admin/guide.html | |||
2171 | index b1467fc..5fb51d0 100644 | |||
2172 | --- a/doc/guide/admin/guide.html | |||
2173 | +++ b/doc/guide/admin/guide.html | |||
2174 | @@ -23,7 +23,7 @@ | |||
2175 | 23 | <DIV CLASS="title"> | 23 | <DIV CLASS="title"> |
2176 | 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> |
2177 | 25 | <ADDRESS CLASS="doc-author">The OpenLDAP Project <<A HREF="https://www.openldap.org/">https://www.openldap.org/</A>></ADDRESS> | 25 | <ADDRESS CLASS="doc-author">The OpenLDAP Project <<A HREF="https://www.openldap.org/">https://www.openldap.org/</A>></ADDRESS> |
2179 | 26 | <ADDRESS CLASS="doc-modified">8 February 2023</ADDRESS> | 26 | <ADDRESS CLASS="doc-modified">10 July 2023</ADDRESS> |
2180 | 27 | <BR CLEAR="All"> | 27 | <BR CLEAR="All"> |
2181 | 28 | </DIV> | 28 | </DIV> |
2182 | 29 | <DIV CLASS="contents"> | 29 | <DIV CLASS="contents"> |
2183 | @@ -5732,8 +5732,8 @@ Members of a group | |||
2184 | 5732 | pcacheTemplate (&(sn=)(givenName=)) 0 3600 | 5732 | pcacheTemplate (&(sn=)(givenName=)) 0 3600 |
2185 | 5733 | pcacheTemplate (&(departmentNumber=)(secretary=*)) 0 3600 | 5733 | pcacheTemplate (&(departmentNumber=)(secretary=*)) 0 3600 |
2186 | 5734 | 5734 | ||
2187 | 5735 | cachesize 20 | ||
2188 | 5736 | directory ./testrun/db.2.a | 5735 | directory ./testrun/db.2.a |
2189 | 5736 | maxsize 1073741824 | ||
2190 | 5737 | index objectClass eq | 5737 | index objectClass eq |
2191 | 5738 | index cn,sn,uid,mail pres,eq,sub | 5738 | index cn,sn,uid,mail pres,eq,sub |
2192 | 5739 | </PRE> | 5739 | </PRE> |
2193 | @@ -5763,7 +5763,7 @@ Members of a group | |||
2194 | 5763 | objectClass: olcPcacheDatabase | 5763 | objectClass: olcPcacheDatabase |
2195 | 5764 | olcDatabase: {0}mdb | 5764 | olcDatabase: {0}mdb |
2196 | 5765 | olcDbDirectory: ./testrun/db.2.a | 5765 | olcDbDirectory: ./testrun/db.2.a |
2198 | 5766 | olcDbCacheSize: 20 | 5766 | olcDbMaxSize: 1073741824 |
2199 | 5767 | olcDbIndex: objectClass eq | 5767 | olcDbIndex: objectClass eq |
2200 | 5768 | olcDbIndex: cn,sn,uid,mail pres,eq,sub | 5768 | olcDbIndex: cn,sn,uid,mail pres,eq,sub |
2201 | 5769 | </PRE> | 5769 | </PRE> |
2202 | diff --git a/doc/guide/admin/overlays.sdf b/doc/guide/admin/overlays.sdf | |||
2203 | index 20e4b93..47cb7b8 100644 | |||
2204 | --- a/doc/guide/admin/overlays.sdf | |||
2205 | +++ b/doc/guide/admin/overlays.sdf | |||
2206 | @@ -783,8 +783,8 @@ at server {{EX:ldap.example.com}}. | |||
2207 | 783 | > pcacheTemplate (&(sn=)(givenName=)) 0 3600 | 783 | > pcacheTemplate (&(sn=)(givenName=)) 0 3600 |
2208 | 784 | > pcacheTemplate (&(departmentNumber=)(secretary=*)) 0 3600 | 784 | > pcacheTemplate (&(departmentNumber=)(secretary=*)) 0 3600 |
2209 | 785 | > | 785 | > |
2210 | 786 | > cachesize 20 | ||
2211 | 787 | > directory ./testrun/db.2.a | 786 | > directory ./testrun/db.2.a |
2212 | 787 | > maxsize 1073741824 | ||
2213 | 788 | > index objectClass eq | 788 | > index objectClass eq |
2214 | 789 | > index cn,sn,uid,mail pres,eq,sub | 789 | > index cn,sn,uid,mail pres,eq,sub |
2215 | 790 | 790 | ||
2216 | @@ -817,7 +817,7 @@ at server {{EX:ldap.example.com}}. | |||
2217 | 817 | > objectClass: olcPcacheDatabase | 817 | > objectClass: olcPcacheDatabase |
2218 | 818 | > olcDatabase: {0}mdb | 818 | > olcDatabase: {0}mdb |
2219 | 819 | > olcDbDirectory: ./testrun/db.2.a | 819 | > olcDbDirectory: ./testrun/db.2.a |
2221 | 820 | > olcDbCacheSize: 20 | 820 | > olcDbMaxSize: 1073741824 |
2222 | 821 | > olcDbIndex: objectClass eq | 821 | > olcDbIndex: objectClass eq |
2223 | 822 | > olcDbIndex: cn,sn,uid,mail pres,eq,sub | 822 | > olcDbIndex: cn,sn,uid,mail pres,eq,sub |
2224 | 823 | 823 | ||
2225 | diff --git a/doc/man/man5/lloadd.conf.5 b/doc/man/man5/lloadd.conf.5 | |||
2226 | index 53f50ba..49c72b9 100644 | |||
2227 | --- a/doc/man/man5/lloadd.conf.5 | |||
2228 | +++ b/doc/man/man5/lloadd.conf.5 | |||
2229 | @@ -824,7 +824,7 @@ The original ETCDIR/lloadd.conf is another example. | |||
2230 | 824 | .SH LIMITATIONS | 824 | .SH LIMITATIONS |
2231 | 825 | Support for proxying SASL Binds is limited to the | 825 | Support for proxying SASL Binds is limited to the |
2232 | 826 | .B EXTERNAL | 826 | .B EXTERNAL |
2234 | 827 | mechanism (and only to extract the DN of a client TLS cerificate if used during | 827 | mechanism (and only to extract the DN of a client TLS certificate if used during |
2235 | 828 | the last renegotiation) and mechanisms that rely neither on connection metadata | 828 | the last renegotiation) and mechanisms that rely neither on connection metadata |
2236 | 829 | (as Kerberos does) nor establish a SASL integrity/confidentialiy layer (again, | 829 | (as Kerberos does) nor establish a SASL integrity/confidentialiy layer (again, |
2237 | 830 | some Kerberos mechanisms, | 830 | some Kerberos mechanisms, |
2238 | diff --git a/doc/man/man5/slapd-ldap.5 b/doc/man/man5/slapd-ldap.5 | |||
2239 | index ffcbe81..a3c46e9 100644 | |||
2240 | --- a/doc/man/man5/slapd-ldap.5 | |||
2241 | +++ b/doc/man/man5/slapd-ldap.5 | |||
2242 | @@ -402,6 +402,7 @@ which defaults to "allow". | |||
2243 | 402 | The identity associated to this directive is also used for privileged | 402 | The identity associated to this directive is also used for privileged |
2244 | 403 | operations whenever \fBidassert\-bind\fP is defined and \fBacl\-bind\fP | 403 | operations whenever \fBidassert\-bind\fP is defined and \fBacl\-bind\fP |
2245 | 404 | is not. See \fBacl\-bind\fP for details. | 404 | is not. See \fBacl\-bind\fP for details. |
2246 | 405 | .RE | ||
2247 | 405 | 406 | ||
2248 | 406 | .TP | 407 | .TP |
2249 | 407 | .B idassert-passthru <authz-regexp> | 408 | .B idassert-passthru <authz-regexp> |
2250 | diff --git a/doc/man/man5/slapo-pcache.5 b/doc/man/man5/slapo-pcache.5 | |||
2251 | index 1425897..3cfd7f2 100644 | |||
2252 | --- a/doc/man/man5/slapo-pcache.5 | |||
2253 | +++ b/doc/man/man5/slapo-pcache.5 | |||
2254 | @@ -208,7 +208,7 @@ shown here: | |||
2255 | 208 | .RS | 208 | .RS |
2256 | 209 | .nf | 209 | .nf |
2257 | 210 | directory /var/tmp/cache | 210 | directory /var/tmp/cache |
2259 | 211 | cachesize 100 | 211 | maxsize 1073741824 |
2260 | 212 | .fi | 212 | .fi |
2261 | 213 | .RE | 213 | .RE |
2262 | 214 | .LP | 214 | .LP |
2263 | diff --git a/libraries/libldap/init.c b/libraries/libldap/init.c | |||
2264 | index a2409d7..3a81790 100644 | |||
2265 | --- a/libraries/libldap/init.c | |||
2266 | +++ b/libraries/libldap/init.c | |||
2267 | @@ -96,9 +96,9 @@ static const struct ol_attribute { | |||
2268 | 96 | {0, ATTR_OPTION, "URI", NULL, LDAP_OPT_URI}, /* replaces HOST/PORT */ | 96 | {0, ATTR_OPTION, "URI", NULL, LDAP_OPT_URI}, /* replaces HOST/PORT */ |
2269 | 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}, |
2270 | 98 | {0, ATTR_BOOL, "REFERRALS", NULL, LDAP_BOOL_REFERRALS}, | 98 | {0, ATTR_BOOL, "REFERRALS", NULL, LDAP_BOOL_REFERRALS}, |
2274 | 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}, |
2275 | 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}, |
2276 | 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}, |
2277 | 102 | 102 | ||
2278 | 103 | #if 0 | 103 | #if 0 |
2279 | 104 | /* This should only be allowed via ldap_set_option(3) */ | 104 | /* This should only be allowed via ldap_set_option(3) */ |
2280 | diff --git a/libraries/libldap/open.c b/libraries/libldap/open.c | |||
2281 | index afef818..bfdbb25 100644 | |||
2282 | --- a/libraries/libldap/open.c | |||
2283 | +++ b/libraries/libldap/open.c | |||
2284 | @@ -501,6 +501,11 @@ ldap_int_open_connection( | |||
2285 | 501 | if( proto == LDAP_PROTO_UDP ) return 0; | 501 | if( proto == LDAP_PROTO_UDP ) return 0; |
2286 | 502 | #endif | 502 | #endif |
2287 | 503 | 503 | ||
2288 | 504 | if ( async && rc == -2) { | ||
2289 | 505 | /* Need to let the connect complete asynchronously before we continue */ | ||
2290 | 506 | return -2; | ||
2291 | 507 | } | ||
2292 | 508 | |||
2293 | 504 | #ifdef HAVE_TLS | 509 | #ifdef HAVE_TLS |
2294 | 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 || |
2295 | 506 | strcmp( srv->lud_scheme, "ldaps" ) == 0 )) | 511 | strcmp( srv->lud_scheme, "ldaps" ) == 0 )) |
2296 | @@ -585,9 +590,9 @@ ldap_open_internal_connection( LDAP **ldp, ber_socket_t *fdp ) | |||
2297 | 585 | /* Attach the passed socket as the *LDAP's connection */ | 590 | /* Attach the passed socket as the *LDAP's connection */ |
2298 | 586 | c = ldap_new_connection( ld, NULL, 1, 0, NULL, 0, 0 ); | 591 | c = ldap_new_connection( ld, NULL, 1, 0, NULL, 0, 0 ); |
2299 | 587 | if( c == NULL ) { | 592 | if( c == NULL ) { |
2300 | 593 | LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex ); | ||
2301 | 588 | ldap_unbind_ext( ld, NULL, NULL ); | 594 | ldap_unbind_ext( ld, NULL, NULL ); |
2302 | 589 | *ldp = NULL; | 595 | *ldp = NULL; |
2303 | 590 | LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex ); | ||
2304 | 591 | return( LDAP_NO_MEMORY ); | 596 | return( LDAP_NO_MEMORY ); |
2305 | 592 | } | 597 | } |
2306 | 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 ); |
2307 | diff --git a/libraries/libldap/tls_o.c b/libraries/libldap/tls_o.c | |||
2308 | index 834d986..d6405bc 100644 | |||
2309 | --- a/libraries/libldap/tls_o.c | |||
2310 | +++ b/libraries/libldap/tls_o.c | |||
2311 | @@ -52,6 +52,10 @@ | |||
2312 | 52 | #define ASN1_STRING_data(x) ASN1_STRING_get0_data(x) | 52 | #define ASN1_STRING_data(x) ASN1_STRING_get0_data(x) |
2313 | 53 | #endif | 53 | #endif |
2314 | 54 | 54 | ||
2315 | 55 | #if OPENSSL_VERSION_MAJOR >= 3 | ||
2316 | 56 | #define ERR_get_error_line( a, b ) ERR_get_error_all( a, b, NULL, NULL, NULL ) | ||
2317 | 57 | #define SSL_get_peer_certificate( s ) SSL_get1_peer_certificate( s ) | ||
2318 | 58 | #endif | ||
2319 | 55 | typedef SSL_CTX tlso_ctx; | 59 | typedef SSL_CTX tlso_ctx; |
2320 | 56 | typedef SSL tlso_session; | 60 | typedef SSL tlso_session; |
2321 | 57 | 61 | ||
2322 | @@ -329,7 +333,7 @@ tlso_ctx_cipher13( tlso_ctx *ctx, char *suites ) | |||
2323 | 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 ) { |
2324 | 330 | if ( tls13_suites[0] ) | 334 | if ( tls13_suites[0] ) |
2325 | 331 | ts = tlso_stecpy( ts, ":", te ); | 335 | ts = tlso_stecpy( ts, ":", te ); |
2327 | 332 | ts = tlso_stecpy( ts, sname, te ); | 336 | ts = tlso_stecpy( ts, nptr, te ); |
2328 | 333 | } | 337 | } |
2329 | 334 | } | 338 | } |
2330 | 335 | } | 339 | } |
2331 | @@ -523,7 +527,13 @@ tlso_ctx_init( struct ldapoptions *lo, struct ldaptls *lt, int is_server ) | |||
2332 | 523 | } | 527 | } |
2333 | 524 | 528 | ||
2334 | 525 | if ( is_server && lo->ldo_tls_dhfile ) { | 529 | if ( is_server && lo->ldo_tls_dhfile ) { |
2335 | 530 | #if OPENSSL_VERSION_MAJOR >= 3 | ||
2336 | 531 | EVP_PKEY *dh; | ||
2337 | 532 | #define bio_params( bio, dh ) dh = PEM_read_bio_Parameters( bio, &dh ) | ||
2338 | 533 | #else | ||
2339 | 526 | DH *dh; | 534 | DH *dh; |
2340 | 535 | #define bio_params( bio, dh ) dh = PEM_read_bio_DHparams( bio, NULL, NULL, NULL ) | ||
2341 | 536 | #endif | ||
2342 | 527 | BIO *bio; | 537 | BIO *bio; |
2343 | 528 | 538 | ||
2344 | 529 | if (( bio=BIO_new_file( lt->lt_dhfile,"r" )) == NULL ) { | 539 | if (( bio=BIO_new_file( lt->lt_dhfile,"r" )) == NULL ) { |
2345 | @@ -533,7 +543,7 @@ tlso_ctx_init( struct ldapoptions *lo, struct ldaptls *lt, int is_server ) | |||
2346 | 533 | tlso_report_error(); | 543 | tlso_report_error(); |
2347 | 534 | return -1; | 544 | return -1; |
2348 | 535 | } | 545 | } |
2350 | 536 | if (!( dh=PEM_read_bio_DHparams( bio, NULL, NULL, NULL ))) { | 546 | if (!( bio_params( bio, dh ))) { |
2351 | 537 | Debug1( LDAP_DEBUG_ANY, | 547 | Debug1( LDAP_DEBUG_ANY, |
2352 | 538 | "TLS: could not read DH parameters file `%s'.\n", | 548 | "TLS: could not read DH parameters file `%s'.\n", |
2353 | 539 | lo->ldo_tls_dhfile ); | 549 | lo->ldo_tls_dhfile ); |
2354 | @@ -542,9 +552,13 @@ tlso_ctx_init( struct ldapoptions *lo, struct ldaptls *lt, int is_server ) | |||
2355 | 542 | return -1; | 552 | return -1; |
2356 | 543 | } | 553 | } |
2357 | 544 | BIO_free( bio ); | 554 | BIO_free( bio ); |
2358 | 555 | #if OPENSSL_VERSION_MAJOR >= 3 | ||
2359 | 556 | SSL_CTX_set0_tmp_dh_pkey( ctx, dh ); | ||
2360 | 557 | #else | ||
2361 | 545 | SSL_CTX_set_tmp_dh( ctx, dh ); | 558 | SSL_CTX_set_tmp_dh( ctx, dh ); |
2362 | 546 | SSL_CTX_set_options( ctx, SSL_OP_SINGLE_DH_USE ); | 559 | SSL_CTX_set_options( ctx, SSL_OP_SINGLE_DH_USE ); |
2363 | 547 | DH_free( dh ); | 560 | DH_free( dh ); |
2364 | 561 | #endif | ||
2365 | 548 | } | 562 | } |
2366 | 549 | 563 | ||
2367 | 550 | if ( lo->ldo_tls_ecname ) { | 564 | if ( lo->ldo_tls_ecname ) { |
2368 | diff --git a/libraries/liblmdb/CHANGES b/libraries/liblmdb/CHANGES | |||
2369 | index 6ff5d5f..76dd591 100644 | |||
2370 | --- a/libraries/liblmdb/CHANGES | |||
2371 | +++ b/libraries/liblmdb/CHANGES | |||
2372 | @@ -1,5 +1,8 @@ | |||
2373 | 1 | LMDB 0.9 Change Log | 1 | LMDB 0.9 Change Log |
2374 | 2 | 2 | ||
2375 | 3 | LMDB 0.9.31 Release (2023/07/10) | ||
2376 | 4 | ITS#8447 - Fix cursor_put(MDB_CURRENT) on DUPSORT DB with different sized data | ||
2377 | 5 | |||
2378 | 3 | LMDB 0.9.30 Release (2023/02/08) | 6 | LMDB 0.9.30 Release (2023/02/08) |
2379 | 4 | ITS#9806 - LMDB page_split: key threshold depends on page size | 7 | ITS#9806 - LMDB page_split: key threshold depends on page size |
2380 | 5 | ITS#9916 - avoid gcc optimization bug on sparc64 linux | 8 | ITS#9916 - avoid gcc optimization bug on sparc64 linux |
2381 | diff --git a/libraries/liblmdb/lmdb.h b/libraries/liblmdb/lmdb.h | |||
2382 | index 5f5d80a..ff03c22 100644 | |||
2383 | --- a/libraries/liblmdb/lmdb.h | |||
2384 | +++ b/libraries/liblmdb/lmdb.h | |||
2385 | @@ -200,7 +200,7 @@ typedef int mdb_filehandle_t; | |||
2386 | 200 | /** Library minor version */ | 200 | /** Library minor version */ |
2387 | 201 | #define MDB_VERSION_MINOR 9 | 201 | #define MDB_VERSION_MINOR 9 |
2388 | 202 | /** Library patch version */ | 202 | /** Library patch version */ |
2390 | 203 | #define MDB_VERSION_PATCH 30 | 203 | #define MDB_VERSION_PATCH 31 |
2391 | 204 | 204 | ||
2392 | 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 */ |
2393 | 206 | #define MDB_VERINT(a,b,c) (((a) << 24) | ((b) << 16) | (c)) | 206 | #define MDB_VERINT(a,b,c) (((a) << 24) | ((b) << 16) | (c)) |
2394 | @@ -210,7 +210,7 @@ typedef int mdb_filehandle_t; | |||
2395 | 210 | MDB_VERINT(MDB_VERSION_MAJOR,MDB_VERSION_MINOR,MDB_VERSION_PATCH) | 210 | MDB_VERINT(MDB_VERSION_MAJOR,MDB_VERSION_MINOR,MDB_VERSION_PATCH) |
2396 | 211 | 211 | ||
2397 | 212 | /** The release date of this library version */ | 212 | /** The release date of this library version */ |
2399 | 213 | #define MDB_VERSION_DATE "February 8, 2023" | 213 | #define MDB_VERSION_DATE "July 10, 2023" |
2400 | 214 | 214 | ||
2401 | 215 | /** A stringifier for the version info */ | 215 | /** A stringifier for the version info */ |
2402 | 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 ")" |
2403 | diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c | |||
2404 | index 9315171..deb6779 100644 | |||
2405 | --- a/libraries/liblmdb/mdb.c | |||
2406 | +++ b/libraries/liblmdb/mdb.c | |||
2407 | @@ -6963,11 +6963,14 @@ current: | |||
2408 | 6963 | else if (!(mc->mc_flags & C_SUB)) | 6963 | else if (!(mc->mc_flags & C_SUB)) |
2409 | 6964 | memcpy(olddata.mv_data, data->mv_data, data->mv_size); | 6964 | memcpy(olddata.mv_data, data->mv_data, data->mv_size); |
2410 | 6965 | else { | 6965 | else { |
2411 | 6966 | if (key->mv_size != NODEKSZ(leaf)) | ||
2412 | 6967 | goto new_ksize; | ||
2413 | 6966 | memcpy(NODEKEY(leaf), key->mv_data, key->mv_size); | 6968 | memcpy(NODEKEY(leaf), key->mv_data, key->mv_size); |
2414 | 6967 | goto fix_parent; | 6969 | goto fix_parent; |
2415 | 6968 | } | 6970 | } |
2416 | 6969 | return MDB_SUCCESS; | 6971 | return MDB_SUCCESS; |
2417 | 6970 | } | 6972 | } |
2418 | 6973 | new_ksize: | ||
2419 | 6971 | mdb_node_del(mc, 0); | 6974 | mdb_node_del(mc, 0); |
2420 | 6972 | } | 6975 | } |
2421 | 6973 | 6976 | ||
2422 | diff --git a/libraries/librewrite/ldapmap.c b/libraries/librewrite/ldapmap.c | |||
2423 | index 7d0252b..e62cd3a 100644 | |||
2424 | --- a/libraries/librewrite/ldapmap.c | |||
2425 | +++ b/libraries/librewrite/ldapmap.c | |||
2426 | @@ -343,6 +343,7 @@ do_bind:; | |||
2427 | 343 | NULL, NULL, NULL ); | 343 | NULL, NULL, NULL ); |
2428 | 344 | if ( rc == LDAP_SERVER_DOWN && first_try ) { | 344 | if ( rc == LDAP_SERVER_DOWN && first_try ) { |
2429 | 345 | first_try = 0; | 345 | first_try = 0; |
2430 | 346 | ldap_unbind_ext( ld, NULL, NULL ); | ||
2431 | 346 | if ( ldap_initialize( &ld, data->lm_url ) != LDAP_SUCCESS ) { | 347 | if ( ldap_initialize( &ld, data->lm_url ) != LDAP_SUCCESS ) { |
2432 | 347 | rc = REWRITE_ERR; | 348 | rc = REWRITE_ERR; |
2433 | 348 | goto rc_return; | 349 | goto rc_return; |
2434 | @@ -360,11 +361,14 @@ do_bind:; | |||
2435 | 360 | data->lm_attrs, 0, NULL, NULL, NULL, 1, &res ); | 361 | data->lm_attrs, 0, NULL, NULL, NULL, 1, &res ); |
2436 | 361 | if ( rc == LDAP_SERVER_DOWN && first_try ) { | 362 | if ( rc == LDAP_SERVER_DOWN && first_try ) { |
2437 | 362 | first_try = 0; | 363 | first_try = 0; |
2439 | 363 | if ( ldap_initialize( &ld, data->lm_url ) != LDAP_SUCCESS ) { | 364 | ldap_unbind_ext( ld, NULL, NULL ); |
2440 | 365 | if ( ldap_initialize( &ld, data->lm_url ) != LDAP_SUCCESS ) { | ||
2441 | 364 | rc = REWRITE_ERR; | 366 | rc = REWRITE_ERR; |
2442 | 365 | goto rc_return; | 367 | goto rc_return; |
2443 | 366 | } | 368 | } |
2444 | 367 | set_version = 1; | 369 | set_version = 1; |
2445 | 370 | ldap_msgfree( res ); | ||
2446 | 371 | res = NULL; | ||
2447 | 368 | goto do_bind; | 372 | goto do_bind; |
2448 | 369 | 373 | ||
2449 | 370 | } else if ( rc != LDAP_SUCCESS ) { | 374 | } else if ( rc != LDAP_SUCCESS ) { |
2450 | @@ -373,7 +377,6 @@ do_bind:; | |||
2451 | 373 | } | 377 | } |
2452 | 374 | 378 | ||
2453 | 375 | if ( ldap_count_entries( ld, res ) != 1 ) { | 379 | if ( ldap_count_entries( ld, res ) != 1 ) { |
2454 | 376 | ldap_msgfree( res ); | ||
2455 | 377 | rc = REWRITE_ERR; | 380 | rc = REWRITE_ERR; |
2456 | 378 | goto rc_return; | 381 | goto rc_return; |
2457 | 379 | } | 382 | } |
2458 | @@ -408,14 +411,14 @@ do_bind:; | |||
2459 | 408 | } | 411 | } |
2460 | 409 | } | 412 | } |
2461 | 410 | 413 | ||
2462 | 411 | ldap_msgfree( res ); | ||
2463 | 412 | |||
2464 | 413 | if ( val->bv_val == NULL ) { | 414 | if ( val->bv_val == NULL ) { |
2465 | 414 | rc = REWRITE_ERR; | 415 | rc = REWRITE_ERR; |
2466 | 415 | goto rc_return; | 416 | goto rc_return; |
2467 | 416 | } | 417 | } |
2468 | 417 | 418 | ||
2469 | 418 | rc_return:; | 419 | rc_return:; |
2470 | 420 | ldap_msgfree( res ); | ||
2471 | 421 | |||
2472 | 419 | if ( data->lm_when == MAP_LDAP_EVERYTIME ) { | 422 | if ( data->lm_when == MAP_LDAP_EVERYTIME ) { |
2473 | 420 | if ( ld != NULL ) { | 423 | if ( ld != NULL ) { |
2474 | 421 | ldap_unbind_ext( ld, NULL, NULL ); | 424 | ldap_unbind_ext( ld, NULL, NULL ); |
2475 | diff --git a/servers/slapd/at.c b/servers/slapd/at.c | |||
2476 | index 99efba6..353a641 100644 | |||
2477 | --- a/servers/slapd/at.c | |||
2478 | +++ b/servers/slapd/at.c | |||
2479 | @@ -952,11 +952,15 @@ error_return:; | |||
2480 | 952 | } | 952 | } |
2481 | 953 | 953 | ||
2482 | 954 | if ( oidm ) { | 954 | if ( oidm ) { |
2483 | 955 | if ( *err == at->at_oid ) | ||
2484 | 956 | *err = oidm; | ||
2485 | 955 | SLAP_FREE( at->at_oid ); | 957 | SLAP_FREE( at->at_oid ); |
2486 | 956 | at->at_oid = oidm; | 958 | at->at_oid = oidm; |
2487 | 957 | } | 959 | } |
2488 | 958 | 960 | ||
2489 | 959 | if ( soidm ) { | 961 | if ( soidm ) { |
2490 | 962 | if ( *err == at->at_syntax_oid ) | ||
2491 | 963 | *err = soidm; | ||
2492 | 960 | SLAP_FREE( at->at_syntax_oid ); | 964 | SLAP_FREE( at->at_syntax_oid ); |
2493 | 961 | at->at_syntax_oid = soidm; | 965 | at->at_syntax_oid = soidm; |
2494 | 962 | } | 966 | } |
2495 | diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c | |||
2496 | index 52fe6ad..15d4a6a 100644 | |||
2497 | --- a/servers/slapd/bconfig.c | |||
2498 | +++ b/servers/slapd/bconfig.c | |||
2499 | @@ -5953,12 +5953,21 @@ config_back_add( Operation *op, SlapReply *rs ) | |||
2500 | 5953 | } | 5953 | } |
2501 | 5954 | } | 5954 | } |
2502 | 5955 | 5955 | ||
2503 | 5956 | /* | ||
2504 | 5957 | * ITS#10045 Pre-check for abandon but be willing to handle that the | ||
2505 | 5958 | * operation might be abandoned while waiting for the server to pause. | ||
2506 | 5959 | */ | ||
2507 | 5956 | if ( op->o_abandon ) { | 5960 | if ( op->o_abandon ) { |
2508 | 5957 | rs->sr_err = SLAPD_ABANDON; | 5961 | rs->sr_err = SLAPD_ABANDON; |
2509 | 5962 | dopause = 0; | ||
2510 | 5958 | goto out; | 5963 | goto out; |
2511 | 5959 | } | 5964 | } |
2512 | 5960 | if ( slap_pause_server() < 0 ) | 5965 | if ( slap_pause_server() < 0 ) |
2513 | 5961 | dopause = 0; | 5966 | dopause = 0; |
2514 | 5967 | if ( op->o_abandon ) { | ||
2515 | 5968 | rs->sr_err = SLAPD_ABANDON; | ||
2516 | 5969 | goto out; | ||
2517 | 5970 | } | ||
2518 | 5962 | 5971 | ||
2519 | 5963 | ldap_pvt_thread_rdwr_wlock( &cfb->cb_rwlock ); | 5972 | ldap_pvt_thread_rdwr_wlock( &cfb->cb_rwlock ); |
2520 | 5964 | 5973 | ||
2521 | @@ -6011,10 +6020,11 @@ config_back_add( Operation *op, SlapReply *rs ) | |||
2522 | 6011 | 6020 | ||
2523 | 6012 | out2:; | 6021 | out2:; |
2524 | 6013 | ldap_pvt_thread_rdwr_wunlock( &cfb->cb_rwlock ); | 6022 | ldap_pvt_thread_rdwr_wunlock( &cfb->cb_rwlock ); |
2525 | 6023 | |||
2526 | 6024 | out:; | ||
2527 | 6014 | if ( dopause ) | 6025 | if ( dopause ) |
2528 | 6015 | slap_unpause_server(); | 6026 | slap_unpause_server(); |
2529 | 6016 | 6027 | ||
2530 | 6017 | out:; | ||
2531 | 6018 | { int repl = op->o_dont_replicate; | 6028 | { int repl = op->o_dont_replicate; |
2532 | 6019 | if ( rs->sr_err == LDAP_COMPARE_TRUE ) { | 6029 | if ( rs->sr_err == LDAP_COMPARE_TRUE ) { |
2533 | 6020 | rs->sr_text = NULL; /* Set after config_add_internal */ | 6030 | rs->sr_text = NULL; /* Set after config_add_internal */ |
2534 | @@ -6490,12 +6500,21 @@ config_back_modify( Operation *op, SlapReply *rs ) | |||
2535 | 6490 | slap_mods_opattrs( op, &op->orm_modlist, 1 ); | 6500 | slap_mods_opattrs( op, &op->orm_modlist, 1 ); |
2536 | 6491 | 6501 | ||
2537 | 6492 | if ( do_pause ) { | 6502 | if ( do_pause ) { |
2538 | 6503 | /* | ||
2539 | 6504 | * ITS#10045 Pre-check for abandon but be willing to handle that the | ||
2540 | 6505 | * operation might be abandoned while waiting for the server to pause. | ||
2541 | 6506 | */ | ||
2542 | 6493 | if ( op->o_abandon ) { | 6507 | if ( op->o_abandon ) { |
2543 | 6494 | rs->sr_err = SLAPD_ABANDON; | 6508 | rs->sr_err = SLAPD_ABANDON; |
2544 | 6509 | do_pause = 0; | ||
2545 | 6495 | goto out; | 6510 | goto out; |
2546 | 6496 | } | 6511 | } |
2547 | 6497 | if ( slap_pause_server() < 0 ) | 6512 | if ( slap_pause_server() < 0 ) |
2548 | 6498 | do_pause = 0; | 6513 | do_pause = 0; |
2549 | 6514 | if ( op->o_abandon ) { | ||
2550 | 6515 | rs->sr_err = SLAPD_ABANDON; | ||
2551 | 6516 | goto out; | ||
2552 | 6517 | } | ||
2553 | 6499 | } | 6518 | } |
2554 | 6500 | ldap_pvt_thread_rdwr_wlock( &cfb->cb_rwlock ); | 6519 | ldap_pvt_thread_rdwr_wlock( &cfb->cb_rwlock ); |
2555 | 6501 | 6520 | ||
2556 | @@ -6530,9 +6549,9 @@ config_back_modify( Operation *op, SlapReply *rs ) | |||
2557 | 6530 | } | 6549 | } |
2558 | 6531 | 6550 | ||
2559 | 6532 | ldap_pvt_thread_rdwr_wunlock( &cfb->cb_rwlock ); | 6551 | ldap_pvt_thread_rdwr_wunlock( &cfb->cb_rwlock ); |
2560 | 6552 | out: | ||
2561 | 6533 | if ( do_pause ) | 6553 | if ( do_pause ) |
2562 | 6534 | slap_unpause_server(); | 6554 | slap_unpause_server(); |
2563 | 6535 | out: | ||
2564 | 6536 | send_ldap_result( op, rs ); | 6555 | send_ldap_result( op, rs ); |
2565 | 6537 | slap_graduate_commit_csn( op ); | 6556 | slap_graduate_commit_csn( op ); |
2566 | 6538 | return rs->sr_err; | 6557 | return rs->sr_err; |
2567 | @@ -6662,12 +6681,21 @@ config_back_modrdn( Operation *op, SlapReply *rs ) | |||
2568 | 6662 | goto out; | 6681 | goto out; |
2569 | 6663 | } | 6682 | } |
2570 | 6664 | 6683 | ||
2571 | 6684 | /* | ||
2572 | 6685 | * ITS#10045 Pre-check for abandon but be willing to handle that the | ||
2573 | 6686 | * operation might be abandoned while waiting for the server to pause. | ||
2574 | 6687 | */ | ||
2575 | 6665 | if ( op->o_abandon ) { | 6688 | if ( op->o_abandon ) { |
2576 | 6666 | rs->sr_err = SLAPD_ABANDON; | 6689 | rs->sr_err = SLAPD_ABANDON; |
2577 | 6690 | dopause = 0; | ||
2578 | 6667 | goto out; | 6691 | goto out; |
2579 | 6668 | } | 6692 | } |
2580 | 6669 | if ( slap_pause_server() < 0 ) | 6693 | if ( slap_pause_server() < 0 ) |
2581 | 6670 | dopause = 0; | 6694 | dopause = 0; |
2582 | 6695 | if ( op->o_abandon ) { | ||
2583 | 6696 | rs->sr_err = SLAPD_ABANDON; | ||
2584 | 6697 | goto out; | ||
2585 | 6698 | } | ||
2586 | 6671 | 6699 | ||
2587 | 6672 | ldap_pvt_thread_rdwr_wlock( &cfb->cb_rwlock ); | 6700 | ldap_pvt_thread_rdwr_wlock( &cfb->cb_rwlock ); |
2588 | 6673 | 6701 | ||
2589 | @@ -6737,9 +6765,9 @@ config_back_modrdn( Operation *op, SlapReply *rs ) | |||
2590 | 6737 | 6765 | ||
2591 | 6738 | ldap_pvt_thread_rdwr_wunlock( &cfb->cb_rwlock ); | 6766 | ldap_pvt_thread_rdwr_wunlock( &cfb->cb_rwlock ); |
2592 | 6739 | 6767 | ||
2593 | 6768 | out: | ||
2594 | 6740 | if ( dopause ) | 6769 | if ( dopause ) |
2595 | 6741 | slap_unpause_server(); | 6770 | slap_unpause_server(); |
2596 | 6742 | out: | ||
2597 | 6743 | send_ldap_result( op, rs ); | 6771 | send_ldap_result( op, rs ); |
2598 | 6744 | return rs->sr_err; | 6772 | return rs->sr_err; |
2599 | 6745 | } | 6773 | } |
2600 | @@ -6774,6 +6802,11 @@ config_back_delete( Operation *op, SlapReply *rs ) | |||
2601 | 6774 | 6802 | ||
2602 | 6775 | ldap_pvt_thread_rdwr_wlock( &cfb->cb_rwlock ); | 6803 | ldap_pvt_thread_rdwr_wlock( &cfb->cb_rwlock ); |
2603 | 6776 | 6804 | ||
2604 | 6805 | if ( op->o_abandon ) { | ||
2605 | 6806 | rs->sr_err = SLAPD_ABANDON; | ||
2606 | 6807 | goto out2; | ||
2607 | 6808 | } | ||
2608 | 6809 | |||
2609 | 6777 | if ( ce->ce_type == Cft_Overlay ){ | 6810 | if ( ce->ce_type == Cft_Overlay ){ |
2610 | 6778 | overlay_remove( ce->ce_be, (slap_overinst *)ce->ce_bi, op ); | 6811 | overlay_remove( ce->ce_be, (slap_overinst *)ce->ce_bi, op ); |
2611 | 6779 | } else if ( ce->ce_type == Cft_Misc ) { | 6812 | } else if ( ce->ce_type == Cft_Misc ) { |
2612 | diff --git a/servers/slapd/overlays/constraint.c b/servers/slapd/overlays/constraint.c | |||
2613 | index 1feff7a..c691f0b 100644 | |||
2614 | --- a/servers/slapd/overlays/constraint.c | |||
2615 | +++ b/servers/slapd/overlays/constraint.c | |||
2616 | @@ -816,7 +816,7 @@ constraint_add( Operation *op, SlapReply *rs ) | |||
2617 | 816 | int rc = 0; | 816 | int rc = 0; |
2618 | 817 | char *msg = NULL; | 817 | char *msg = NULL; |
2619 | 818 | 818 | ||
2621 | 819 | if (get_relax(op) || SLAPD_SYNC_IS_SYNCCONN( op->o_connid )) { | 819 | if ( get_relax(op) || be_shadow_update( op ) ) { |
2622 | 820 | return SLAP_CB_CONTINUE; | 820 | return SLAP_CB_CONTINUE; |
2623 | 821 | } | 821 | } |
2624 | 822 | 822 | ||
2625 | @@ -958,7 +958,7 @@ constraint_update( Operation *op, SlapReply *rs ) | |||
2626 | 958 | char *msg = NULL; | 958 | char *msg = NULL; |
2627 | 959 | int is_v; | 959 | int is_v; |
2628 | 960 | 960 | ||
2630 | 961 | if (get_relax(op) || SLAPD_SYNC_IS_SYNCCONN( op->o_connid )) { | 961 | if ( get_relax(op) || be_shadow_update( op ) ) { |
2631 | 962 | return SLAP_CB_CONTINUE; | 962 | return SLAP_CB_CONTINUE; |
2632 | 963 | } | 963 | } |
2633 | 964 | 964 | ||
2634 | diff --git a/servers/slapd/overlays/dynlist.c b/servers/slapd/overlays/dynlist.c | |||
2635 | index 89425c7..10cacf9 100644 | |||
2636 | --- a/servers/slapd/overlays/dynlist.c | |||
2637 | +++ b/servers/slapd/overlays/dynlist.c | |||
2638 | @@ -99,6 +99,83 @@ ad_infilter( AttributeDescription *ad, Filter *f ) | |||
2639 | 99 | return 0; | 99 | return 0; |
2640 | 100 | } | 100 | } |
2641 | 101 | 101 | ||
2642 | 102 | static Filter * | ||
2643 | 103 | transform_filter( Operation *op, dynlist_info_t *dli, int not, Filter *orig ) | ||
2644 | 104 | { | ||
2645 | 105 | Filter *f; | ||
2646 | 106 | dynlist_map_t *dlm; | ||
2647 | 107 | |||
2648 | 108 | /* Tilt the filter towards TRUE if it could match through this dli */ | ||
2649 | 109 | int result = not ? LDAP_COMPARE_FALSE : LDAP_COMPARE_TRUE; | ||
2650 | 110 | |||
2651 | 111 | if ( orig ) { | ||
2652 | 112 | f = orig; | ||
2653 | 113 | } else { | ||
2654 | 114 | f = orig = filter_dup( op->ors_filter, op->o_tmpmemctx ); | ||
2655 | 115 | } | ||
2656 | 116 | |||
2657 | 117 | switch( f->f_choice & SLAPD_FILTER_MASK ) { | ||
2658 | 118 | case LDAP_FILTER_EQUALITY: | ||
2659 | 119 | case LDAP_FILTER_GE: | ||
2660 | 120 | case LDAP_FILTER_LE: | ||
2661 | 121 | case LDAP_FILTER_APPROX: | ||
2662 | 122 | for ( dlm = dli->dli_dlm; dlm; dlm = dlm->dlm_next ) { | ||
2663 | 123 | AttributeDescription *ad = dlm->dlm_mapped_ad ? dlm->dlm_mapped_ad : dlm->dlm_member_ad; | ||
2664 | 124 | if ( f->f_av_desc == ad ) { | ||
2665 | 125 | filter_free_x( op, f, 0 ); | ||
2666 | 126 | f->f_choice = SLAPD_FILTER_COMPUTED; | ||
2667 | 127 | f->f_result = result; | ||
2668 | 128 | break; | ||
2669 | 129 | } | ||
2670 | 130 | } | ||
2671 | 131 | break; | ||
2672 | 132 | case LDAP_FILTER_PRESENT: | ||
2673 | 133 | for ( dlm = dli->dli_dlm; dlm; dlm = dlm->dlm_next ) { | ||
2674 | 134 | AttributeDescription *ad = dlm->dlm_mapped_ad ? dlm->dlm_mapped_ad : dlm->dlm_member_ad; | ||
2675 | 135 | if ( f->f_sub_desc == ad ) { | ||
2676 | 136 | filter_free_x( op, f, 0 ); | ||
2677 | 137 | f->f_choice = SLAPD_FILTER_COMPUTED; | ||
2678 | 138 | f->f_result = result; | ||
2679 | 139 | break; | ||
2680 | 140 | } | ||
2681 | 141 | } | ||
2682 | 142 | break; | ||
2683 | 143 | case LDAP_FILTER_SUBSTRINGS: | ||
2684 | 144 | for ( dlm = dli->dli_dlm; dlm; dlm = dlm->dlm_next ) { | ||
2685 | 145 | AttributeDescription *ad = dlm->dlm_mapped_ad ? dlm->dlm_mapped_ad : dlm->dlm_member_ad; | ||
2686 | 146 | if ( f->f_desc == ad ) { | ||
2687 | 147 | filter_free_x( op, f, 0 ); | ||
2688 | 148 | f->f_choice = SLAPD_FILTER_COMPUTED; | ||
2689 | 149 | f->f_result = result; | ||
2690 | 150 | break; | ||
2691 | 151 | } | ||
2692 | 152 | } | ||
2693 | 153 | break; | ||
2694 | 154 | case LDAP_FILTER_EXT: | ||
2695 | 155 | for ( dlm = dli->dli_dlm; dlm; dlm = dlm->dlm_next ) { | ||
2696 | 156 | AttributeDescription *ad = dlm->dlm_mapped_ad ? dlm->dlm_mapped_ad : dlm->dlm_member_ad; | ||
2697 | 157 | if ( f->f_mr_desc == ad ) { | ||
2698 | 158 | filter_free_x( op, f, 0 ); | ||
2699 | 159 | f->f_choice = SLAPD_FILTER_COMPUTED; | ||
2700 | 160 | f->f_result = result; | ||
2701 | 161 | break; | ||
2702 | 162 | } | ||
2703 | 163 | } | ||
2704 | 164 | break; | ||
2705 | 165 | case LDAP_FILTER_AND: | ||
2706 | 166 | case LDAP_FILTER_OR: | ||
2707 | 167 | for ( f = f->f_list; f; f = f->f_next ) | ||
2708 | 168 | transform_filter( op, dli, not, f ); | ||
2709 | 169 | break; | ||
2710 | 170 | case LDAP_FILTER_NOT: | ||
2711 | 171 | transform_filter( op, dli, !not, f->f_list ); | ||
2712 | 172 | case SLAPD_FILTER_COMPUTED: | ||
2713 | 173 | break; | ||
2714 | 174 | } | ||
2715 | 175 | |||
2716 | 176 | return orig; | ||
2717 | 177 | } | ||
2718 | 178 | |||
2719 | 102 | typedef struct dynlist_filterinst_t { | 179 | typedef struct dynlist_filterinst_t { |
2720 | 103 | AttributeAssertion *df_a; | 180 | AttributeAssertion *df_a; |
2721 | 104 | Entry *df_e; | 181 | Entry *df_e; |
2722 | @@ -1790,7 +1867,7 @@ dynlist_search( Operation *op, SlapReply *rs ) | |||
2723 | 1790 | dynlist_info_t *dli; | 1867 | dynlist_info_t *dli; |
2724 | 1791 | Operation o = *op; | 1868 | Operation o = *op; |
2725 | 1792 | dynlist_map_t *dlm; | 1869 | dynlist_map_t *dlm; |
2727 | 1793 | Filter f[3]; | 1870 | Filter f[4]; |
2728 | 1794 | AttributeAssertion ava[2]; | 1871 | AttributeAssertion ava[2]; |
2729 | 1795 | AttributeName an[2] = {0}; | 1872 | AttributeName an[2] = {0}; |
2730 | 1796 | 1873 | ||
2731 | @@ -1908,27 +1985,45 @@ dynlist_search( Operation *op, SlapReply *rs ) | |||
2732 | 1908 | } | 1985 | } |
2733 | 1909 | 1986 | ||
2734 | 1910 | if ( tmpwant ) { | 1987 | if ( tmpwant ) { |
2735 | 1988 | Filter *f_new = NULL; | ||
2736 | 1989 | |||
2737 | 1990 | if ( tmpwant == WANT_MEMBER ) { | ||
2738 | 1991 | /* | ||
2739 | 1992 | * If we only need to list groups, not their members, keep the | ||
2740 | 1993 | * filter, assuming any references to mapped attributes make it | ||
2741 | 1994 | * succeed. | ||
2742 | 1995 | * | ||
2743 | 1996 | * A nested groups search will indicate that it needs both. | ||
2744 | 1997 | */ | ||
2745 | 1998 | f_new = transform_filter( op, dli, 0, NULL ); | ||
2746 | 1999 | } | ||
2747 | 1911 | 2000 | ||
2748 | 1912 | if ( static_oc ) { | 2001 | if ( static_oc ) { |
2750 | 1913 | f[0].f_choice = LDAP_FILTER_OR; | 2002 | f[0].f_choice = LDAP_FILTER_AND; |
2751 | 1914 | f[0].f_list = &f[1]; | 2003 | f[0].f_list = &f[1]; |
2752 | 1915 | f[0].f_next = NULL; | 2004 | f[0].f_next = NULL; |
2758 | 1916 | f[1].f_choice = LDAP_FILTER_EQUALITY; | 2005 | f[1].f_choice = LDAP_FILTER_OR; |
2759 | 1917 | f[1].f_next = &f[2]; | 2006 | f[1].f_list = &f[2]; |
2760 | 1918 | f[1].f_ava = &ava[0]; | 2007 | f[1].f_next = f_new; |
2756 | 1919 | f[1].f_av_desc = slap_schema.si_ad_objectClass; | ||
2757 | 1920 | f[1].f_av_value = dli->dli_oc->soc_cname; | ||
2761 | 1921 | f[2].f_choice = LDAP_FILTER_EQUALITY; | 2008 | f[2].f_choice = LDAP_FILTER_EQUALITY; |
2763 | 1922 | f[2].f_ava = &ava[1]; | 2009 | f[2].f_next = &f[3]; |
2764 | 2010 | f[2].f_ava = &ava[0]; | ||
2765 | 1923 | f[2].f_av_desc = slap_schema.si_ad_objectClass; | 2011 | f[2].f_av_desc = slap_schema.si_ad_objectClass; |
2768 | 1924 | f[2].f_av_value = static_oc->soc_cname; | 2012 | f[2].f_av_value = dli->dli_oc->soc_cname; |
2769 | 1925 | f[2].f_next = NULL; | 2013 | f[3].f_choice = LDAP_FILTER_EQUALITY; |
2770 | 2014 | f[3].f_ava = &ava[1]; | ||
2771 | 2015 | f[3].f_av_desc = slap_schema.si_ad_objectClass; | ||
2772 | 2016 | f[3].f_av_value = static_oc->soc_cname; | ||
2773 | 2017 | f[3].f_next = NULL; | ||
2774 | 1926 | } else { | 2018 | } else { |
2779 | 1927 | f[0].f_choice = LDAP_FILTER_EQUALITY; | 2019 | f[0].f_choice = LDAP_FILTER_AND; |
2780 | 1928 | f[0].f_ava = ava; | 2020 | f[0].f_list = &f[1]; |
2777 | 1929 | f[0].f_av_desc = slap_schema.si_ad_objectClass; | ||
2778 | 1930 | f[0].f_av_value = dli->dli_oc->soc_cname; | ||
2781 | 1931 | f[0].f_next = NULL; | 2021 | f[0].f_next = NULL; |
2782 | 2022 | f[1].f_choice = LDAP_FILTER_EQUALITY; | ||
2783 | 2023 | f[1].f_ava = ava; | ||
2784 | 2024 | f[1].f_av_desc = slap_schema.si_ad_objectClass; | ||
2785 | 2025 | f[1].f_av_value = dli->dli_oc->soc_cname; | ||
2786 | 2026 | f[1].f_next = f_new; | ||
2787 | 1932 | } | 2027 | } |
2788 | 1933 | 2028 | ||
2789 | 1934 | if ( o.o_callback != sc ) { | 2029 | if ( o.o_callback != sc ) { |
2790 | @@ -1963,6 +2058,7 @@ dynlist_search( Operation *op, SlapReply *rs ) | |||
2791 | 1963 | } | 2058 | } |
2792 | 1964 | o.o_tmpfree( o.ors_filterstr.bv_val, o.o_tmpmemctx ); | 2059 | o.o_tmpfree( o.ors_filterstr.bv_val, o.o_tmpmemctx ); |
2793 | 1965 | o.ors_filterstr.bv_val = NULL; | 2060 | o.ors_filterstr.bv_val = NULL; |
2794 | 2061 | filter_free_x( &o, f_new, 1 ); | ||
2795 | 1966 | if ( found != ds->ds_found && nested ) | 2062 | if ( found != ds->ds_found && nested ) |
2796 | 1967 | dynlist_nestlink( op, ds ); | 2063 | dynlist_nestlink( op, ds ); |
2797 | 1968 | } | 2064 | } |
2798 | diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c | |||
2799 | index 726eaeb..2b947e4 100644 | |||
2800 | --- a/servers/slapd/overlays/pcache.c | |||
2801 | +++ b/servers/slapd/overlays/pcache.c | |||
2802 | @@ -3841,8 +3841,8 @@ pc_cfadd( Operation *op, SlapReply *rs, Entry *p, ConfigArgs *ca ) | |||
2803 | 3841 | 3841 | ||
2804 | 3842 | /* We can only create this entry if the database is table-driven | 3842 | /* We can only create this entry if the database is table-driven |
2805 | 3843 | */ | 3843 | */ |
2808 | 3844 | if ( cm->db.bd_info->bi_cf_ocs ) | 3844 | if ( cm->db.be_cf_ocs ) |
2809 | 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, |
2810 | 3846 | &pcocs[1] ); | 3846 | &pcocs[1] ); |
2811 | 3847 | 3847 | ||
2812 | 3848 | return 0; | 3848 | return 0; |
2813 | diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c | |||
2814 | index a3f2e70..48b9942 100644 | |||
2815 | --- a/servers/slapd/overlays/ppolicy.c | |||
2816 | +++ b/servers/slapd/overlays/ppolicy.c | |||
2817 | @@ -1617,7 +1617,8 @@ ppolicy_bind_response( Operation *op, SlapReply *rs ) | |||
2818 | 1617 | } else if ( ppb->pp.pwdMinDelay ) { | 1617 | } else if ( ppb->pp.pwdMinDelay ) { |
2819 | 1618 | int waittime = ppb->pp.pwdMinDelay << fc; | 1618 | int waittime = ppb->pp.pwdMinDelay << fc; |
2820 | 1619 | time_t wait_end; | 1619 | time_t wait_end; |
2822 | 1620 | struct berval lockout_stamp; | 1620 | char lockout_stamp_buf[ LDAP_LUTIL_GENTIME_BUFSIZE ]; |
2823 | 1621 | struct berval lockout_stamp = BER_BVC(lockout_stamp_buf); | ||
2824 | 1621 | 1622 | ||
2825 | 1622 | if ( waittime > ppb->pp.pwdMaxDelay ) { | 1623 | if ( waittime > ppb->pp.pwdMaxDelay ) { |
2826 | 1623 | waittime = ppb->pp.pwdMaxDelay; | 1624 | waittime = ppb->pp.pwdMaxDelay; |
2827 | @@ -2223,7 +2224,7 @@ ppolicy_add( | |||
2828 | 2223 | return rs->sr_err; | 2224 | return rs->sr_err; |
2829 | 2224 | 2225 | ||
2830 | 2225 | /* If this is a replica, assume the provider checked everything */ | 2226 | /* If this is a replica, assume the provider checked everything */ |
2832 | 2226 | if ( SLAPD_SYNC_IS_SYNCCONN( op->o_connid ) ) | 2227 | if ( be_shadow_update( op ) ) |
2833 | 2227 | return SLAP_CB_CONTINUE; | 2228 | return SLAP_CB_CONTINUE; |
2834 | 2228 | 2229 | ||
2835 | 2229 | ppolicy_get( op, op->ora_e, &pp ); | 2230 | ppolicy_get( op, op->ora_e, &pp ); |
2836 | @@ -2390,7 +2391,7 @@ ppolicy_modify( Operation *op, SlapReply *rs ) | |||
2837 | 2390 | /* If this is a replica, we may need to tweak some of the | 2391 | /* If this is a replica, we may need to tweak some of the |
2838 | 2391 | * provider's modifications. Otherwise, just pass it through. | 2392 | * provider's modifications. Otherwise, just pass it through. |
2839 | 2392 | */ | 2393 | */ |
2841 | 2393 | if ( SLAPD_SYNC_IS_SYNCCONN( op->o_connid ) ) { | 2394 | if ( be_shadow_update( op ) ) { |
2842 | 2394 | Modifications **prev; | 2395 | Modifications **prev; |
2843 | 2395 | Attribute *a_grace, *a_lock, *a_fail, *a_success; | 2396 | Attribute *a_grace, *a_lock, *a_fail, *a_success; |
2844 | 2396 | 2397 | ||
2845 | diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c | |||
2846 | index 1ff507c..5504c97 100644 | |||
2847 | --- a/servers/slapd/overlays/syncprov.c | |||
2848 | +++ b/servers/slapd/overlays/syncprov.c | |||
2849 | @@ -869,6 +869,11 @@ static void free_resinfo( syncres *sr ) | |||
2850 | 869 | 869 | ||
2851 | 870 | #define FS_UNLINK 1 | 870 | #define FS_UNLINK 1 |
2852 | 871 | #define FS_LOCK 2 | 871 | #define FS_LOCK 2 |
2853 | 872 | #define FS_DEFER 4 | ||
2854 | 873 | |||
2855 | 874 | #define FSR_NOTFREE 0 | ||
2856 | 875 | #define FSR_DIDFREE 1 | ||
2857 | 876 | #define FSR_CANFREE 2 | ||
2858 | 872 | 877 | ||
2859 | 873 | static int | 878 | static int |
2860 | 874 | syncprov_free_syncop( syncops *so, int flags ) | 879 | syncprov_free_syncop( syncops *so, int flags ) |
2861 | @@ -879,12 +884,19 @@ syncprov_free_syncop( syncops *so, int flags ) | |||
2862 | 879 | if ( flags & FS_LOCK ) | 884 | if ( flags & FS_LOCK ) |
2863 | 880 | ldap_pvt_thread_mutex_lock( &so->s_mutex ); | 885 | ldap_pvt_thread_mutex_lock( &so->s_mutex ); |
2864 | 881 | /* already being freed, or still in use */ | 886 | /* already being freed, or still in use */ |
2866 | 882 | if ( !so->s_inuse || --so->s_inuse > 0 ) { | 887 | if ( !so->s_inuse || so->s_inuse > 1 ) { |
2867 | 883 | if ( flags & FS_LOCK ) | 888 | if ( flags & FS_LOCK ) |
2868 | 884 | ldap_pvt_thread_mutex_unlock( &so->s_mutex ); | 889 | ldap_pvt_thread_mutex_unlock( &so->s_mutex ); |
2870 | 885 | return 0; | 890 | if ( !( flags & FS_DEFER ) && so->s_inuse ) |
2871 | 891 | so->s_inuse--; | ||
2872 | 892 | return FSR_NOTFREE; | ||
2873 | 886 | } | 893 | } |
2874 | 887 | ldap_pvt_thread_mutex_unlock( &so->s_mutex ); | 894 | ldap_pvt_thread_mutex_unlock( &so->s_mutex ); |
2875 | 895 | |||
2876 | 896 | /* caller wants to cleanup other stuff before actual free */ | ||
2877 | 897 | if ( flags & FS_DEFER ) | ||
2878 | 898 | return FSR_CANFREE; | ||
2879 | 899 | |||
2880 | 888 | if (( flags & FS_UNLINK ) && so->s_si ) { | 900 | if (( flags & FS_UNLINK ) && so->s_si ) { |
2881 | 889 | syncops **sop; | 901 | syncops **sop; |
2882 | 890 | ldap_pvt_thread_mutex_lock( &so->s_si->si_ops_mutex ); | 902 | ldap_pvt_thread_mutex_lock( &so->s_si->si_ops_mutex ); |
2883 | @@ -912,7 +924,7 @@ syncprov_free_syncop( syncops *so, int flags ) | |||
2884 | 912 | } | 924 | } |
2885 | 913 | ldap_pvt_thread_mutex_destroy( &so->s_mutex ); | 925 | ldap_pvt_thread_mutex_destroy( &so->s_mutex ); |
2886 | 914 | ch_free( so ); | 926 | ch_free( so ); |
2888 | 915 | return 1; | 927 | return FSR_DIDFREE; |
2889 | 916 | } | 928 | } |
2890 | 917 | 929 | ||
2891 | 918 | /* Send a persistent search response */ | 930 | /* Send a persistent search response */ |
2892 | @@ -1027,6 +1039,9 @@ syncprov_qplay( Operation *op, syncops *so ) | |||
2893 | 1027 | } else { | 1039 | } else { |
2894 | 1028 | rc = syncprov_sendresp( op, sr->s_info, so, sr->s_mode ); | 1040 | rc = syncprov_sendresp( op, sr->s_info, so, sr->s_mode ); |
2895 | 1029 | } | 1041 | } |
2896 | 1042 | } else { | ||
2897 | 1043 | /* set rc so we don't do a new qstart */ | ||
2898 | 1044 | rc = 1; | ||
2899 | 1030 | } | 1045 | } |
2900 | 1031 | 1046 | ||
2901 | 1032 | free_resinfo( sr ); | 1047 | free_resinfo( sr ); |
2902 | @@ -1053,6 +1068,9 @@ syncprov_qplay( Operation *op, syncops *so ) | |||
2903 | 1053 | return rc; | 1068 | return rc; |
2904 | 1054 | } | 1069 | } |
2905 | 1055 | 1070 | ||
2906 | 1071 | static int | ||
2907 | 1072 | syncprov_drop_psearch( syncops *so, int lock ); | ||
2908 | 1073 | |||
2909 | 1056 | /* task for playing back queued responses */ | 1074 | /* task for playing back queued responses */ |
2910 | 1057 | static void * | 1075 | static void * |
2911 | 1058 | syncprov_qtask( void *ctx, void *arg ) | 1076 | syncprov_qtask( void *ctx, void *arg ) |
2912 | @@ -1061,7 +1079,7 @@ syncprov_qtask( void *ctx, void *arg ) | |||
2913 | 1061 | OperationBuffer opbuf; | 1079 | OperationBuffer opbuf; |
2914 | 1062 | Operation *op; | 1080 | Operation *op; |
2915 | 1063 | BackendDB be; | 1081 | BackendDB be; |
2917 | 1064 | int rc; | 1082 | int rc, flag, frc; |
2918 | 1065 | 1083 | ||
2919 | 1066 | op = &opbuf.ob_op; | 1084 | op = &opbuf.ob_op; |
2920 | 1067 | *op = *so->s_op; | 1085 | *op = *so->s_op; |
2921 | @@ -1090,14 +1108,24 @@ syncprov_qtask( void *ctx, void *arg ) | |||
2922 | 1090 | if ( !rc && !so->s_res ) | 1108 | if ( !rc && !so->s_res ) |
2923 | 1091 | rc = 1; | 1109 | rc = 1; |
2924 | 1092 | 1110 | ||
2925 | 1111 | flag = FS_UNLINK; | ||
2926 | 1112 | if ( rc && op->o_abandon ) | ||
2927 | 1113 | flag = FS_DEFER; | ||
2928 | 1114 | |||
2929 | 1093 | /* decrement use count... */ | 1115 | /* decrement use count... */ |
2931 | 1094 | if ( !syncprov_free_syncop( so, FS_UNLINK )) { | 1116 | frc = syncprov_free_syncop( so, flag ); |
2932 | 1117 | if ( frc == FSR_NOTFREE ) { | ||
2933 | 1095 | if ( rc ) | 1118 | if ( rc ) |
2934 | 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 */ |
2935 | 1097 | so->s_flags ^= PS_TASK_QUEUED; | 1120 | so->s_flags ^= PS_TASK_QUEUED; |
2936 | 1098 | ldap_pvt_thread_mutex_unlock( &so->s_mutex ); | 1121 | ldap_pvt_thread_mutex_unlock( &so->s_mutex ); |
2937 | 1099 | } | 1122 | } |
2938 | 1100 | 1123 | ||
2939 | 1124 | /* if we got abandoned while processing, cleanup now */ | ||
2940 | 1125 | if ( frc == FSR_CANFREE ) { | ||
2941 | 1126 | syncprov_drop_psearch( so, 1 ); | ||
2942 | 1127 | } | ||
2943 | 1128 | |||
2944 | 1101 | return NULL; | 1129 | return NULL; |
2945 | 1102 | } | 1130 | } |
2946 | 1103 | 1131 | ||
2947 | @@ -1272,7 +1300,9 @@ syncprov_op_abandon( Operation *op, SlapReply *rs ) | |||
2948 | 1272 | return SLAP_CB_CONTINUE; | 1300 | return SLAP_CB_CONTINUE; |
2949 | 1273 | } | 1301 | } |
2950 | 1274 | } | 1302 | } |
2952 | 1275 | syncprov_drop_psearch( so, 0 ); | 1303 | /* if task is active, it must drop itself */ |
2953 | 1304 | if ( !( so->s_flags & PS_TASK_QUEUED )) | ||
2954 | 1305 | syncprov_drop_psearch( so, 0 ); | ||
2955 | 1276 | } | 1306 | } |
2956 | 1277 | return SLAP_CB_CONTINUE; | 1307 | return SLAP_CB_CONTINUE; |
2957 | 1278 | } | 1308 | } |
2958 | diff --git a/servers/slapd/overlays/translucent.c b/servers/slapd/overlays/translucent.c | |||
2959 | index 2d31bb0..09b12dc 100644 | |||
2960 | --- a/servers/slapd/overlays/translucent.c | |||
2961 | +++ b/servers/slapd/overlays/translucent.c | |||
2962 | @@ -176,9 +176,9 @@ translucent_cfadd( Operation *op, SlapReply *rs, Entry *e, ConfigArgs *ca ) | |||
2963 | 176 | 176 | ||
2964 | 177 | /* We can only create this entry if the database is table-driven | 177 | /* We can only create this entry if the database is table-driven |
2965 | 178 | */ | 178 | */ |
2967 | 179 | if ( ov->db.bd_info->bi_cf_ocs ) | 179 | if ( ov->db.be_cf_ocs ) |
2968 | 180 | config_build_entry( op, rs, cei, ca, &bv, | 180 | config_build_entry( op, rs, cei, ca, &bv, |
2970 | 181 | ov->db.bd_info->bi_cf_ocs, | 181 | ov->db.be_cf_ocs, |
2971 | 182 | &translucentocs[1] ); | 182 | &translucentocs[1] ); |
2972 | 183 | 183 | ||
2973 | 184 | return 0; | 184 | return 0; |
2974 | diff --git a/servers/slapd/overlays/unique.c b/servers/slapd/overlays/unique.c | |||
2975 | index 7a7c8fb..7ff128a 100644 | |||
2976 | --- a/servers/slapd/overlays/unique.c | |||
2977 | +++ b/servers/slapd/overlays/unique.c | |||
2978 | @@ -1073,7 +1073,7 @@ unique_add( | |||
2979 | 1073 | Debug(LDAP_DEBUG_TRACE, "==> unique_add <%s>\n", | 1073 | Debug(LDAP_DEBUG_TRACE, "==> unique_add <%s>\n", |
2980 | 1074 | op->o_req_dn.bv_val ); | 1074 | op->o_req_dn.bv_val ); |
2981 | 1075 | 1075 | ||
2983 | 1076 | if ( SLAPD_SYNC_IS_SYNCCONN( op->o_connid ) || ( | 1076 | if ( be_shadow_update( op ) || ( |
2984 | 1077 | get_relax(op) > SLAP_CONTROL_IGNORED | 1077 | get_relax(op) > SLAP_CONTROL_IGNORED |
2985 | 1078 | && access_allowed( op, op->ora_e, | 1078 | && access_allowed( op, op->ora_e, |
2986 | 1079 | slap_schema.si_ad_entry, NULL, | 1079 | slap_schema.si_ad_entry, NULL, |
2987 | @@ -1225,7 +1225,7 @@ unique_modify( | |||
2988 | 1225 | return rc; | 1225 | return rc; |
2989 | 1226 | } | 1226 | } |
2990 | 1227 | 1227 | ||
2992 | 1228 | if ( SLAPD_SYNC_IS_SYNCCONN( op->o_connid ) ) { | 1228 | if ( be_shadow_update( op ) ) { |
2993 | 1229 | return rc; | 1229 | return rc; |
2994 | 1230 | } | 1230 | } |
2995 | 1231 | if ( get_relax(op) > SLAP_CONTROL_IGNORED | 1231 | if ( get_relax(op) > SLAP_CONTROL_IGNORED |
2996 | @@ -1365,7 +1365,7 @@ unique_modrdn( | |||
2997 | 1365 | Debug(LDAP_DEBUG_TRACE, "==> unique_modrdn <%s> <%s>\n", | 1365 | Debug(LDAP_DEBUG_TRACE, "==> unique_modrdn <%s> <%s>\n", |
2998 | 1366 | op->o_req_dn.bv_val, op->orr_newrdn.bv_val ); | 1366 | op->o_req_dn.bv_val, op->orr_newrdn.bv_val ); |
2999 | 1367 | 1367 | ||
3001 | 1368 | if ( SLAPD_SYNC_IS_SYNCCONN( op->o_connid ) ) { | 1368 | if ( be_shadow_update( op ) ) { |
3002 | 1369 | return rc; | 1369 | return rc; |
3003 | 1370 | } | 1370 | } |
3004 | 1371 | if ( get_relax(op) > SLAP_CONTROL_IGNORED | 1371 | if ( get_relax(op) > SLAP_CONTROL_IGNORED |
3005 | diff --git a/servers/slapd/passwd.c b/servers/slapd/passwd.c | |||
3006 | index eef5b09..b6b1ddb 100644 | |||
3007 | --- a/servers/slapd/passwd.c | |||
3008 | +++ b/servers/slapd/passwd.c | |||
3009 | @@ -291,6 +291,8 @@ old_good: | |||
3010 | 291 | } else { | 291 | } else { |
3011 | 292 | slap_callback **sc; | 292 | slap_callback **sc; |
3012 | 293 | 293 | ||
3013 | 294 | cb.sc_next = op->o_callback; | ||
3014 | 295 | |||
3015 | 294 | op->o_tag = LDAP_REQ_MODIFY; | 296 | op->o_tag = LDAP_REQ_MODIFY; |
3016 | 295 | op->o_callback = &cb; | 297 | op->o_callback = &cb; |
3017 | 296 | op->orm_modlist = qpw->rs_mods; | 298 | op->orm_modlist = qpw->rs_mods; |
3018 | diff --git a/servers/slapd/pwmods/README.argon2 b/servers/slapd/pwmods/README.argon2 | |||
3019 | index 595c50d..33c562b 100644 | |||
3020 | --- a/servers/slapd/pwmods/README.argon2 | |||
3021 | +++ b/servers/slapd/pwmods/README.argon2 | |||
3022 | @@ -15,28 +15,16 @@ Both hash the password "secret", the first using the salt "saltsalt", the second | |||
3023 | 15 | Building | 15 | Building |
3024 | 16 | -------- | 16 | -------- |
3025 | 17 | 17 | ||
3043 | 18 | 1) Customize the OPENLDAP variable in Makefile to point to the OpenLDAP | 18 | This module is now part of regular OpenLDAP build process and enabled if |
3044 | 19 | source root. | 19 | libsodium or libargon2 library and the corresponding development headers are |
3045 | 20 | 20 | present. You can also choose the library to build against if you prefer by | |
3046 | 21 | For initial testing you might also want to edit DEFS to define | 21 | passing --enable-argon2=<libsodium|libargon2> to your configure invocation. |
3030 | 22 | SLAPD_ARGON2_DEBUG, which enables logging to stderr (don't leave this on | ||
3031 | 23 | in production, as it prints passwords in cleartext). | ||
3032 | 24 | |||
3033 | 25 | 2) Run 'make' to produce argon2.so | ||
3034 | 26 | |||
3035 | 27 | 3) Copy argon2.so somewhere permanent. | ||
3036 | 28 | |||
3037 | 29 | 4) Edit your slapd.conf (eg. /etc/ldap/slapd.conf), and add: | ||
3038 | 30 | |||
3039 | 31 | moduleload ...path/to/argon2.so | ||
3040 | 32 | |||
3041 | 33 | 5) Restart slapd. | ||
3042 | 34 | |||
3047 | 35 | 22 | ||
3048 | 36 | Configuring | 23 | Configuring |
3049 | 37 | ----------- | 24 | ----------- |
3050 | 38 | 25 | ||
3052 | 39 | The {ARGON2} password scheme should now be recognised. | 26 | Load the argon2 module (e.g. with olcModuleLoad or moduleload) and the |
3053 | 27 | {ARGON2} password scheme should now be recognised. | ||
3054 | 40 | 28 | ||
3055 | 41 | You can also tell OpenLDAP to use one of this scheme when processing LDAP | 29 | You can also tell OpenLDAP to use one of this scheme when processing LDAP |
3056 | 42 | Password Modify Extended Operations, thanks to the password-hash option in | 30 | Password Modify Extended Operations, thanks to the password-hash option in |
3057 | diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c | |||
3058 | index 5fceb63..3b02a3b 100644 | |||
3059 | --- a/servers/slapd/syncrepl.c | |||
3060 | +++ b/servers/slapd/syncrepl.c | |||
3061 | @@ -604,8 +604,10 @@ ldap_sync_search( | |||
3062 | 604 | lattrs[2] = NULL; | 604 | lattrs[2] = NULL; |
3063 | 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, |
3064 | 606 | NULL, NULL, NULL, si->si_slimit, &res ); | 606 | NULL, NULL, NULL, si->si_slimit, &res ); |
3066 | 607 | if ( rc ) | 607 | if ( rc ) { |
3067 | 608 | ldap_msgfree( res ); | ||
3068 | 608 | return rc; | 609 | return rc; |
3069 | 610 | } | ||
3070 | 609 | msg = ldap_first_message( si->si_ld, res ); | 611 | msg = ldap_first_message( si->si_ld, res ); |
3071 | 610 | if ( msg && ldap_msgtype( msg ) == LDAP_RES_SEARCH_ENTRY ) { | 612 | if ( msg && ldap_msgtype( msg ) == LDAP_RES_SEARCH_ENTRY ) { |
3072 | 611 | BerElement *ber = NULL; | 613 | BerElement *ber = NULL; |
3073 | diff --git a/servers/slapd/syslog.c b/servers/slapd/syslog.c | |||
3074 | index 47ea1c6..50f3053 100644 | |||
3075 | --- a/servers/slapd/syslog.c | |||
3076 | +++ b/servers/slapd/syslog.c | |||
3077 | @@ -209,7 +209,7 @@ openlog(const char *ident, int logstat, int logfac) | |||
3078 | 209 | } | 209 | } |
3079 | 210 | 210 | ||
3080 | 211 | void | 211 | void |
3082 | 212 | closelog() | 212 | closelog(void) |
3083 | 213 | { | 213 | { |
3084 | 214 | (void)close(LogFile); | 214 | (void)close(LogFile); |
3085 | 215 | LogFile = -1; | 215 | LogFile = -1; |
3086 | diff --git a/tests/progs/slapd-mtread.c b/tests/progs/slapd-mtread.c | |||
3087 | index 587d3cf..bf6014a 100644 | |||
3088 | --- a/tests/progs/slapd-mtread.c | |||
3089 | +++ b/tests/progs/slapd-mtread.c | |||
3090 | @@ -528,6 +528,7 @@ do_random( LDAP *ld, | |||
3091 | 528 | if ( rc ) { | 528 | if ( rc ) { |
3092 | 529 | tester_ldap_error( ld, "ldap_search_ext_s", NULL ); | 529 | tester_ldap_error( ld, "ldap_search_ext_s", NULL ); |
3093 | 530 | } | 530 | } |
3094 | 531 | ldap_msgfree( res ); | ||
3095 | 531 | break; | 532 | break; |
3096 | 532 | } | 533 | } |
3097 | 533 | 534 | ||
3098 | @@ -566,6 +567,7 @@ do_random( LDAP *ld, | |||
3099 | 566 | 567 | ||
3100 | 567 | default: | 568 | default: |
3101 | 568 | tester_ldap_error( ld, "ldap_search_ext_s", NULL ); | 569 | tester_ldap_error( ld, "ldap_search_ext_s", NULL ); |
3102 | 570 | ldap_msgfree( res ); | ||
3103 | 569 | break; | 571 | break; |
3104 | 570 | } | 572 | } |
3105 | 571 | 573 | ||
3106 | diff --git a/tests/progs/slapd-search.c b/tests/progs/slapd-search.c | |||
3107 | index 13a2818..f849199 100644 | |||
3108 | --- a/tests/progs/slapd-search.c | |||
3109 | +++ b/tests/progs/slapd-search.c | |||
3110 | @@ -214,6 +214,7 @@ do_random( struct tester_conn_args *config, | |||
3111 | 214 | if ( rc ) { | 214 | if ( rc ) { |
3112 | 215 | tester_ldap_error( ld, "ldap_search_ext_s", NULL ); | 215 | tester_ldap_error( ld, "ldap_search_ext_s", NULL ); |
3113 | 216 | } | 216 | } |
3114 | 217 | ldap_msgfree( res ); | ||
3115 | 217 | break; | 218 | break; |
3116 | 218 | } | 219 | } |
3117 | 219 | 220 | ||
3118 | @@ -270,6 +271,7 @@ do_random( struct tester_conn_args *config, | |||
3119 | 270 | 271 | ||
3120 | 271 | default: | 272 | default: |
3121 | 272 | tester_ldap_error( ld, "ldap_search_ext_s", NULL ); | 273 | tester_ldap_error( ld, "ldap_search_ext_s", NULL ); |
3122 | 274 | ldap_msgfree( res ); | ||
3123 | 273 | break; | 275 | break; |
3124 | 274 | } | 276 | } |
3125 | 275 | 277 | ||
3126 | diff --git a/tests/progs/slapd-watcher.c b/tests/progs/slapd-watcher.c | |||
3127 | index 0fed11f..3c315d7 100644 | |||
3128 | --- a/tests/progs/slapd-watcher.c | |||
3129 | +++ b/tests/progs/slapd-watcher.c | |||
3130 | @@ -537,7 +537,6 @@ setup_server( struct tester_conn_args *config, server *sv, int first ) | |||
3131 | 537 | } | 537 | } |
3132 | 538 | } | 538 | } |
3133 | 539 | } | 539 | } |
3134 | 540 | ldap_msgfree( res ); | ||
3135 | 541 | break; | 540 | break; |
3136 | 542 | 541 | ||
3137 | 543 | default: | 542 | default: |
3138 | @@ -545,6 +544,7 @@ setup_server( struct tester_conn_args *config, server *sv, int first ) | |||
3139 | 545 | if ( first ) | 544 | if ( first ) |
3140 | 546 | exit( EXIT_FAILURE ); | 545 | exit( EXIT_FAILURE ); |
3141 | 547 | } | 546 | } |
3142 | 547 | ldap_msgfree( res ); | ||
3143 | 548 | } | 548 | } |
3144 | 549 | } | 549 | } |
3145 | 550 | 550 | ||
3146 | diff --git a/tests/scripts/lloadd/test001-backend-issues b/tests/scripts/lloadd/test001-backend-issues | |||
3147 | index 9b0b0b2..b7f99fc 100755 | |||
3148 | --- a/tests/scripts/lloadd/test001-backend-issues | |||
3149 | +++ b/tests/scripts/lloadd/test001-backend-issues | |||
3150 | @@ -55,6 +55,7 @@ $SLAPADD -f $CONF3 -l $LDIFORDERED | |||
3151 | 55 | RC=$? | 55 | RC=$? |
3152 | 56 | if test $RC != 0 ; then | 56 | if test $RC != 0 ; then |
3153 | 57 | echo "slapadd failed ($RC)!" | 57 | echo "slapadd failed ($RC)!" |
3154 | 58 | test $KILLSERVERS != no && kill -HUP $KILLPIDS | ||
3155 | 58 | exit $RC | 59 | exit $RC |
3156 | 59 | fi | 60 | fi |
3157 | 60 | 61 | ||
3158 | diff --git a/tests/scripts/lloadd/test002-load b/tests/scripts/lloadd/test002-load | |||
3159 | index 942f6bc..2de04d6 100755 | |||
3160 | --- a/tests/scripts/lloadd/test002-load | |||
3161 | +++ b/tests/scripts/lloadd/test002-load | |||
3162 | @@ -74,6 +74,7 @@ $SLAPADD -f $CONF3 -l $LDIFORDERED | |||
3163 | 74 | RC=$? | 74 | RC=$? |
3164 | 75 | if test $RC != 0 ; then | 75 | if test $RC != 0 ; then |
3165 | 76 | echo "slapadd failed ($RC)!" | 76 | echo "slapadd failed ($RC)!" |
3166 | 77 | test $KILLSERVERS != no && kill -HUP $KILLPIDS | ||
3167 | 77 | exit $RC | 78 | exit $RC |
3168 | 78 | fi | 79 | fi |
3169 | 79 | 80 | ||
3170 | diff --git a/tests/scripts/lloadd/test003-cnconfig b/tests/scripts/lloadd/test003-cnconfig | |||
3171 | index edf5801..b578b96 100755 | |||
3172 | --- a/tests/scripts/lloadd/test003-cnconfig | |||
3173 | +++ b/tests/scripts/lloadd/test003-cnconfig | |||
3174 | @@ -75,6 +75,7 @@ $SLAPADD -f $CONF3 -l $LDIFORDERED | |||
3175 | 75 | RC=$? | 75 | RC=$? |
3176 | 76 | if test $RC != 0 ; then | 76 | if test $RC != 0 ; then |
3177 | 77 | echo "slapadd failed ($RC)!" | 77 | echo "slapadd failed ($RC)!" |
3178 | 78 | test $KILLSERVERS != no && kill -HUP $KILLPIDS | ||
3179 | 78 | exit $RC | 79 | exit $RC |
3180 | 79 | fi | 80 | fi |
3181 | 80 | 81 | ||
3182 | diff --git a/tests/scripts/lloadd/test004-monitor b/tests/scripts/lloadd/test004-monitor | |||
3183 | index d1db7c1..5fe9276 100755 | |||
3184 | --- a/tests/scripts/lloadd/test004-monitor | |||
3185 | +++ b/tests/scripts/lloadd/test004-monitor | |||
3186 | @@ -87,6 +87,7 @@ $SLAPADD -f $CONF3 -l $LDIFORDERED | |||
3187 | 87 | RC=$? | 87 | RC=$? |
3188 | 88 | if test $RC != 0 ; then | 88 | if test $RC != 0 ; then |
3189 | 89 | echo "slapadd failed ($RC)!" | 89 | echo "slapadd failed ($RC)!" |
3190 | 90 | test $KILLSERVERS != no && kill -HUP $KILLPIDS | ||
3191 | 90 | exit $RC | 91 | exit $RC |
3192 | 91 | fi | 92 | fi |
3193 | 92 | 93 | ||
3194 | diff --git a/tests/scripts/test049-sync-config b/tests/scripts/test049-sync-config | |||
3195 | index 88a57b9..b05e041 100755 | |||
3196 | --- a/tests/scripts/test049-sync-config | |||
3197 | +++ b/tests/scripts/test049-sync-config | |||
3198 | @@ -61,6 +61,12 @@ esac | |||
3199 | 61 | echo "Starting provider slapd on TCP/IP port $PORT1..." | 61 | echo "Starting provider slapd on TCP/IP port $PORT1..." |
3200 | 62 | . $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF | 62 | . $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF |
3201 | 63 | $SLAPADD -F $CFPRO -n 0 -l $CONFLDIF | 63 | $SLAPADD -F $CFPRO -n 0 -l $CONFLDIF |
3202 | 64 | RC=$? | ||
3203 | 65 | if test $RC != 0 ; then | ||
3204 | 66 | echo "slapadd failed ($RC)!" | ||
3205 | 67 | exit $RC | ||
3206 | 68 | fi | ||
3207 | 69 | |||
3208 | 64 | cd $PRODIR | 70 | cd $PRODIR |
3209 | 65 | $SLAPD -F ./slapd.d -h $URI1 -d $LVL > $LOG1 2>&1 & | 71 | $SLAPD -F ./slapd.d -h $URI1 -d $LVL > $LOG1 2>&1 & |
3210 | 66 | PID=$! | 72 | PID=$! |
3211 | @@ -134,6 +140,13 @@ fi | |||
3212 | 134 | 140 | ||
3213 | 135 | echo "Starting consumer slapd on TCP/IP port $PORT2..." | 141 | echo "Starting consumer slapd on TCP/IP port $PORT2..." |
3214 | 136 | $SLAPADD -F $CFCON -n 0 -l $CONFLDIF | 142 | $SLAPADD -F $CFCON -n 0 -l $CONFLDIF |
3215 | 143 | RC=$? | ||
3216 | 144 | if test $RC != 0 ; then | ||
3217 | 145 | echo "slapadd failed ($RC)!" | ||
3218 | 146 | test $KILLSERVERS != no && kill -HUP $KILLPIDS | ||
3219 | 147 | exit $RC | ||
3220 | 148 | fi | ||
3221 | 149 | |||
3222 | 137 | cd $CONDIR | 150 | cd $CONDIR |
3223 | 138 | $SLAPD -F ./slapd.d -h $URI2 -d $LVL > $LOG2 2>&1 & | 151 | $SLAPD -F ./slapd.d -h $URI2 -d $LVL > $LOG2 2>&1 & |
3224 | 139 | CONSUMERPID=$! | 152 | CONSUMERPID=$! |
3225 | diff --git a/tests/scripts/test050-syncrepl-multiprovider b/tests/scripts/test050-syncrepl-multiprovider | |||
3226 | index d32ae66..065c86a 100755 | |||
3227 | --- a/tests/scripts/test050-syncrepl-multiprovider | |||
3228 | +++ b/tests/scripts/test050-syncrepl-multiprovider | |||
3229 | @@ -79,6 +79,11 @@ objectClass: olcDatabaseConfig | |||
3230 | 79 | olcDatabase: {0}config | 79 | olcDatabase: {0}config |
3231 | 80 | olcRootPW:< file://$CONFIGPWF | 80 | olcRootPW:< file://$CONFIGPWF |
3232 | 81 | EOF | 81 | EOF |
3233 | 82 | RC=$? | ||
3234 | 83 | if test $RC != 0 ; then | ||
3235 | 84 | echo "slapadd failed ($RC)!" | ||
3236 | 85 | exit $RC | ||
3237 | 86 | fi | ||
3238 | 82 | 87 | ||
3239 | 83 | n=`expr $n + 1` | 88 | n=`expr $n + 1` |
3240 | 84 | done | 89 | done |
3241 | diff --git a/tests/scripts/test053-syncprov-glue b/tests/scripts/test053-syncprov-glue | |||
3242 | index a75a318..3caa0d4 100755 | |||
3243 | --- a/tests/scripts/test053-syncprov-glue | |||
3244 | +++ b/tests/scripts/test053-syncprov-glue | |||
3245 | @@ -74,6 +74,11 @@ olcDatabase: {0}config | |||
3246 | 74 | olcRootPW:< file://$CONFIGPWF | 74 | olcRootPW:< file://$CONFIGPWF |
3247 | 75 | 75 | ||
3248 | 76 | EOF | 76 | EOF |
3249 | 77 | RC=$? | ||
3250 | 78 | if test $RC != 0 ; then | ||
3251 | 79 | echo "slapadd failed ($RC)!" | ||
3252 | 80 | exit $RC | ||
3253 | 81 | fi | ||
3254 | 77 | 82 | ||
3255 | 78 | echo "Initializing provider2 configurations..." | 83 | echo "Initializing provider2 configurations..." |
3256 | 79 | $SLAPADD -F $CFPRO2 -n 0 <<EOF | 84 | $SLAPADD -F $CFPRO2 -n 0 <<EOF |
3257 | @@ -87,6 +92,11 @@ olcDatabase: {0}config | |||
3258 | 87 | olcRootPW:< file://$CONFIGPWF | 92 | olcRootPW:< file://$CONFIGPWF |
3259 | 88 | 93 | ||
3260 | 89 | EOF | 94 | EOF |
3261 | 95 | RC=$? | ||
3262 | 96 | if test $RC != 0 ; then | ||
3263 | 97 | echo "slapadd failed ($RC)!" | ||
3264 | 98 | exit $RC | ||
3265 | 99 | fi | ||
3266 | 90 | 100 | ||
3267 | 91 | $SLAPADD -F $CFCONS -n 0 <<EOF | 101 | $SLAPADD -F $CFCONS -n 0 <<EOF |
3268 | 92 | dn: cn=config | 102 | dn: cn=config |
3269 | @@ -98,6 +108,11 @@ objectClass: olcDatabaseConfig | |||
3270 | 98 | olcDatabase: {0}config | 108 | olcDatabase: {0}config |
3271 | 99 | olcRootPW:< file://$CONFIGPWF | 109 | olcRootPW:< file://$CONFIGPWF |
3272 | 100 | EOF | 110 | EOF |
3273 | 111 | RC=$? | ||
3274 | 112 | if test $RC != 0 ; then | ||
3275 | 113 | echo "slapadd failed ($RC)!" | ||
3276 | 114 | exit $RC | ||
3277 | 115 | fi | ||
3278 | 101 | 116 | ||
3279 | 102 | echo "Starting provider slapd on TCP/IP port $PORT1..." | 117 | echo "Starting provider slapd on TCP/IP port $PORT1..." |
3280 | 103 | cd $PRODDIR | 118 | cd $PRODDIR |
3281 | diff --git a/tests/scripts/test058-syncrepl-asymmetric b/tests/scripts/test058-syncrepl-asymmetric | |||
3282 | index 22015a7..f950761 100755 | |||
3283 | --- a/tests/scripts/test058-syncrepl-asymmetric | |||
3284 | +++ b/tests/scripts/test058-syncrepl-asymmetric | |||
3285 | @@ -175,6 +175,12 @@ olcDatabase: {0}config | |||
3286 | 175 | olcRootPW:< file://$CONFIGPWF | 175 | olcRootPW:< file://$CONFIGPWF |
3287 | 176 | 176 | ||
3288 | 177 | EOF | 177 | EOF |
3289 | 178 | RC=$? | ||
3290 | 179 | if test $RC != 0 ; then | ||
3291 | 180 | echo "slapadd failed ($RC)!" | ||
3292 | 181 | exit $RC | ||
3293 | 182 | fi | ||
3294 | 183 | |||
3295 | 178 | ID=`expr $ID + 1` | 184 | ID=`expr $ID + 1` |
3296 | 179 | done | 185 | done |
3297 | 180 | 186 | ||
3298 | @@ -191,6 +197,12 @@ olcDatabase: {0}config | |||
3299 | 191 | olcRootPW:< file://$CONFIGPWF | 197 | olcRootPW:< file://$CONFIGPWF |
3300 | 192 | 198 | ||
3301 | 193 | EOF | 199 | EOF |
3302 | 200 | |||
3303 | 201 | RC=$? | ||
3304 | 202 | if test $RC != 0 ; then | ||
3305 | 203 | echo "slapadd failed ($RC)!" | ||
3306 | 204 | exit $RC | ||
3307 | 205 | fi | ||
3308 | 194 | done | 206 | done |
3309 | 195 | 207 | ||
3310 | 196 | echo "Starting central provider slapd on TCP/IP port $PORT1..." | 208 | echo "Starting central provider slapd on TCP/IP port $PORT1..." |
3311 | diff --git a/tests/scripts/test059-consumer-config b/tests/scripts/test059-consumer-config | |||
3312 | index 56848db..30e87e4 100755 | |||
3313 | --- a/tests/scripts/test059-consumer-config | |||
3314 | +++ b/tests/scripts/test059-consumer-config | |||
3315 | @@ -57,6 +57,12 @@ esac | |||
3316 | 57 | echo "Starting provider slapd on TCP/IP port $PORT1..." | 57 | echo "Starting provider slapd on TCP/IP port $PORT1..." |
3317 | 58 | . $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF | 58 | . $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF |
3318 | 59 | $SLAPADD -F $CFPRO -n 0 -l $CONFLDIF | 59 | $SLAPADD -F $CFPRO -n 0 -l $CONFLDIF |
3319 | 60 | RC=$? | ||
3320 | 61 | if test $RC != 0 ; then | ||
3321 | 62 | echo "slapadd failed ($RC)!" | ||
3322 | 63 | exit $RC | ||
3323 | 64 | fi | ||
3324 | 65 | |||
3325 | 60 | $SLAPD -F $CFPRO -h $URI1 -d $LVL > $LOG1 2>&1 & | 66 | $SLAPD -F $CFPRO -h $URI1 -d $LVL > $LOG1 2>&1 & |
3326 | 61 | PID=$! | 67 | PID=$! |
3327 | 62 | if test $WAIT != 0 ; then | 68 | if test $WAIT != 0 ; then |
3328 | @@ -182,6 +188,13 @@ fi | |||
3329 | 182 | 188 | ||
3330 | 183 | echo "Starting consumer slapd on TCP/IP port $PORT2..." | 189 | echo "Starting consumer slapd on TCP/IP port $PORT2..." |
3331 | 184 | $SLAPADD -F $CFCON -n 0 -l $CONFLDIF | 190 | $SLAPADD -F $CFCON -n 0 -l $CONFLDIF |
3332 | 191 | RC=$? | ||
3333 | 192 | if test $RC != 0 ; then | ||
3334 | 193 | echo "slapadd failed ($RC)!" | ||
3335 | 194 | test $KILLSERVERS != no && kill -HUP $KILLPIDS | ||
3336 | 195 | exit $RC | ||
3337 | 196 | fi | ||
3338 | 197 | |||
3339 | 185 | $SLAPD -F $CFCON -h $URI2 -d $LVL > $LOG2 2>&1 & | 198 | $SLAPD -F $CFCON -h $URI2 -d $LVL > $LOG2 2>&1 & |
3340 | 186 | CONSUMERPID=$! | 199 | CONSUMERPID=$! |
3341 | 187 | if test $WAIT != 0 ; then | 200 | if test $WAIT != 0 ; then |
3342 | diff --git a/tests/scripts/test061-syncreplication-initiation b/tests/scripts/test061-syncreplication-initiation | |||
3343 | index a8ce51c..3e3b973 100755 | |||
3344 | --- a/tests/scripts/test061-syncreplication-initiation | |||
3345 | +++ b/tests/scripts/test061-syncreplication-initiation | |||
3346 | @@ -82,6 +82,12 @@ olcDatabase: {0}config | |||
3347 | 82 | olcRootPW:< file://$CONFIGPWF | 82 | olcRootPW:< file://$CONFIGPWF |
3348 | 83 | 83 | ||
3349 | 84 | EOF | 84 | EOF |
3350 | 85 | |||
3351 | 86 | RC=$? | ||
3352 | 87 | if test $RC != 0 ; then | ||
3353 | 88 | echo "slapadd failed ($RC)!" | ||
3354 | 89 | exit $RC | ||
3355 | 90 | fi | ||
3356 | 85 | done | 91 | done |
3357 | 86 | 92 | ||
3358 | 87 | echo "Starting provider slapd on $PROV_URI" | 93 | echo "Starting provider slapd on $PROV_URI" |
3359 | diff --git a/tests/scripts/test062-config-delete b/tests/scripts/test062-config-delete | |||
3360 | index dde8acd..afb87c4 100755 | |||
3361 | --- a/tests/scripts/test062-config-delete | |||
3362 | +++ b/tests/scripts/test062-config-delete | |||
3363 | @@ -39,6 +39,12 @@ $SLAPPASSWD -g -n >$CONFIGPWF | |||
3364 | 39 | echo "Starting slapd on TCP/IP port $PORT1... $PWD" | 39 | echo "Starting slapd on TCP/IP port $PORT1... $PWD" |
3365 | 40 | . $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF | 40 | . $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF |
3366 | 41 | $SLAPADD -F $CONFDIR -n 0 -l $CONFLDIF | 41 | $SLAPADD -F $CONFDIR -n 0 -l $CONFLDIF |
3367 | 42 | RC=$? | ||
3368 | 43 | if test $RC != 0 ; then | ||
3369 | 44 | echo "slapadd failed ($RC)!" | ||
3370 | 45 | exit $RC | ||
3371 | 46 | fi | ||
3372 | 47 | |||
3373 | 42 | cd $TESTDIR | 48 | cd $TESTDIR |
3374 | 43 | $SLAPD -F ./slapd.d -h $URI1 -d $LVL > $LOG1 2>&1 & | 49 | $SLAPD -F ./slapd.d -h $URI1 -d $LVL > $LOG1 2>&1 & |
3375 | 44 | PID=$! | 50 | PID=$! |
3376 | diff --git a/tests/scripts/test063-delta-multiprovider b/tests/scripts/test063-delta-multiprovider | |||
3377 | index df4bdd1..8ce5906 100755 | |||
3378 | --- a/tests/scripts/test063-delta-multiprovider | |||
3379 | +++ b/tests/scripts/test063-delta-multiprovider | |||
3380 | @@ -214,6 +214,12 @@ olcDatabase: {3}monitor | |||
3381 | 214 | EOF | 214 | EOF |
3382 | 215 | 215 | ||
3383 | 216 | $SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1 | 216 | $SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1 |
3384 | 217 | RC=$? | ||
3385 | 218 | if test $RC != 0 ; then | ||
3386 | 219 | echo "slapadd failed ($RC)!" | ||
3387 | 220 | exit $RC | ||
3388 | 221 | fi | ||
3389 | 222 | |||
3390 | 217 | PORT=`eval echo '$PORT'$n` | 223 | PORT=`eval echo '$PORT'$n` |
3391 | 218 | echo "Starting server $n on TCP/IP port $PORT..." | 224 | echo "Starting server $n on TCP/IP port $PORT..." |
3392 | 219 | cd ${XDIR}${n} | 225 | cd ${XDIR}${n} |
3393 | diff --git a/tests/scripts/test064-constraint b/tests/scripts/test064-constraint | |||
3394 | index c263cf9..5519123 100755 | |||
3395 | --- a/tests/scripts/test064-constraint | |||
3396 | +++ b/tests/scripts/test064-constraint | |||
3397 | @@ -120,6 +120,11 @@ olcConstraintAttribute: uid | |||
3398 | 120 | EOF | 120 | EOF |
3399 | 121 | 121 | ||
3400 | 122 | $SLAPADD -F $CONFDIR -n 0 -l $TESTDIR/config.ldif | 122 | $SLAPADD -F $CONFDIR -n 0 -l $TESTDIR/config.ldif |
3401 | 123 | RC=$? | ||
3402 | 124 | if test $RC != 0 ; then | ||
3403 | 125 | echo "slapadd failed ($RC)!" | ||
3404 | 126 | exit $RC | ||
3405 | 127 | fi | ||
3406 | 123 | 128 | ||
3407 | 124 | echo "Starting slapd on TCP/IP port $PORT1..." | 129 | echo "Starting slapd on TCP/IP port $PORT1..." |
3408 | 125 | $SLAPD -F $CONFDIR -h $URI1 -d $LVL > $LOG1 2>&1 & | 130 | $SLAPD -F $CONFDIR -h $URI1 -d $LVL > $LOG1 2>&1 & |
3409 | diff --git a/tests/scripts/test066-autoca b/tests/scripts/test066-autoca | |||
3410 | index fd23140..dd8b502 100755 | |||
3411 | --- a/tests/scripts/test066-autoca | |||
3412 | +++ b/tests/scripts/test066-autoca | |||
3413 | @@ -47,6 +47,12 @@ $SLAPPASSWD -g -n >$CONFIGPWF | |||
3414 | 47 | echo "Starting slapd on TCP/IP port $PORT1..." | 47 | echo "Starting slapd on TCP/IP port $PORT1..." |
3415 | 48 | . $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF | 48 | . $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF |
3416 | 49 | $SLAPADD -F $CFDIR -n 0 -l $CONFLDIF | 49 | $SLAPADD -F $CFDIR -n 0 -l $CONFLDIF |
3417 | 50 | RC=$? | ||
3418 | 51 | if test $RC != 0 ; then | ||
3419 | 52 | echo "slapadd failed ($RC)!" | ||
3420 | 53 | exit $RC | ||
3421 | 54 | fi | ||
3422 | 55 | |||
3423 | 50 | $SLAPD -F $CFDIR -h $URIP1 -d $LVL > $LOG1 2>&1 & | 56 | $SLAPD -F $CFDIR -h $URIP1 -d $LVL > $LOG1 2>&1 & |
3424 | 51 | PID=$! | 57 | PID=$! |
3425 | 52 | if test $WAIT != 0 ; then | 58 | if test $WAIT != 0 ; then |
3426 | diff --git a/tests/scripts/test069-delta-multiprovider-starttls b/tests/scripts/test069-delta-multiprovider-starttls | |||
3427 | index 2f5a0d3..277c0a7 100755 | |||
3428 | --- a/tests/scripts/test069-delta-multiprovider-starttls | |||
3429 | +++ b/tests/scripts/test069-delta-multiprovider-starttls | |||
3430 | @@ -195,7 +195,14 @@ olcAccessLogOps: writes | |||
3431 | 195 | olcAccessLogSuccess: TRUE | 195 | olcAccessLogSuccess: TRUE |
3432 | 196 | 196 | ||
3433 | 197 | EOF | 197 | EOF |
3434 | 198 | |||
3435 | 198 | $SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1 | 199 | $SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1 |
3436 | 200 | RC=$? | ||
3437 | 201 | if test $RC != 0 ; then | ||
3438 | 202 | echo "slapadd failed ($RC)!" | ||
3439 | 203 | exit $RC | ||
3440 | 204 | fi | ||
3441 | 205 | |||
3442 | 199 | PORT=`eval echo '$PORT'$n` | 206 | PORT=`eval echo '$PORT'$n` |
3443 | 200 | echo "Starting server $n on TCP/IP port $PORT..." | 207 | echo "Starting server $n on TCP/IP port $PORT..." |
3444 | 201 | cd ${XDIR}${n} | 208 | cd ${XDIR}${n} |
3445 | diff --git a/tests/scripts/test070-delta-multiprovider-ldaps b/tests/scripts/test070-delta-multiprovider-ldaps | |||
3446 | index 18869d1..3fb96cc 100755 | |||
3447 | --- a/tests/scripts/test070-delta-multiprovider-ldaps | |||
3448 | +++ b/tests/scripts/test070-delta-multiprovider-ldaps | |||
3449 | @@ -195,6 +195,12 @@ olcAccessLogSuccess: TRUE | |||
3450 | 195 | 195 | ||
3451 | 196 | EOF | 196 | EOF |
3452 | 197 | $SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1 | 197 | $SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1 |
3453 | 198 | RC=$? | ||
3454 | 199 | if test $RC != 0 ; then | ||
3455 | 200 | echo "slapadd failed ($RC)!" | ||
3456 | 201 | exit $RC | ||
3457 | 202 | fi | ||
3458 | 203 | |||
3459 | 198 | PORT=`eval echo '$PORT'$n` | 204 | PORT=`eval echo '$PORT'$n` |
3460 | 199 | echo "Starting server $n on TCP/IP port $PORT..." | 205 | echo "Starting server $n on TCP/IP port $PORT..." |
3461 | 200 | cd ${XDIR}${n} | 206 | cd ${XDIR}${n} |
3462 | diff --git a/tests/scripts/test071-dirsync b/tests/scripts/test071-dirsync | |||
3463 | index 9f5aede..455629b 100755 | |||
3464 | --- a/tests/scripts/test071-dirsync | |||
3465 | +++ b/tests/scripts/test071-dirsync | |||
3466 | @@ -88,6 +88,13 @@ objectclass: dcObject | |||
3467 | 88 | o: OpenLDAP Testing | 88 | o: OpenLDAP Testing |
3468 | 89 | 89 | ||
3469 | 90 | EOMODS | 90 | EOMODS |
3470 | 91 | RC=$? | ||
3471 | 92 | if test $RC != 0 ; then | ||
3472 | 93 | echo "slapadd failed ($RC)!" | ||
3473 | 94 | test $KILLSERVERS != no && kill -HUP $KILLPIDS | ||
3474 | 95 | exit $RC | ||
3475 | 96 | fi | ||
3476 | 97 | |||
3477 | 91 | $SLAPD -f $CONF2 -h $URI2 -d $LVL > $LOG2 2>&1 & | 98 | $SLAPD -f $CONF2 -h $URI2 -d $LVL > $LOG2 2>&1 & |
3478 | 92 | CONSUMERPID=$! | 99 | CONSUMERPID=$! |
3479 | 93 | if test $WAIT != 0 ; then | 100 | if test $WAIT != 0 ; then |
3480 | diff --git a/tests/scripts/test076-authid-rewrite b/tests/scripts/test076-authid-rewrite | |||
3481 | index 7799d88..383e4c3 100755 | |||
3482 | --- a/tests/scripts/test076-authid-rewrite | |||
3483 | +++ b/tests/scripts/test076-authid-rewrite | |||
3484 | @@ -31,6 +31,12 @@ $SLAPPASSWD -g -n >$CONFIGPWF | |||
3485 | 31 | echo "Starting slapd on TCP/IP port $PORT1... $PWD" | 31 | echo "Starting slapd on TCP/IP port $PORT1... $PWD" |
3486 | 32 | . $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF | 32 | . $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF |
3487 | 33 | $SLAPADD -F $CONFDIR -n 0 -l $CONFLDIF | 33 | $SLAPADD -F $CONFDIR -n 0 -l $CONFLDIF |
3488 | 34 | RC=$? | ||
3489 | 35 | if test $RC != 0 ; then | ||
3490 | 36 | echo "slapadd failed ($RC)!" | ||
3491 | 37 | exit $RC | ||
3492 | 38 | fi | ||
3493 | 39 | |||
3494 | 34 | cd $TESTDIR | 40 | cd $TESTDIR |
3495 | 35 | $SLAPD -F ./slapd.d -h $URI1 -d $LVL > $LOG1 2>&1 & | 41 | $SLAPD -F ./slapd.d -h $URI1 -d $LVL > $LOG1 2>&1 & |
3496 | 36 | PID=$! | 42 | PID=$! |
3497 | diff --git a/tests/scripts/test078-persistent-sessionlog b/tests/scripts/test078-persistent-sessionlog | |||
3498 | index acb8fad..8f3d07f 100755 | |||
3499 | --- a/tests/scripts/test078-persistent-sessionlog | |||
3500 | +++ b/tests/scripts/test078-persistent-sessionlog | |||
3501 | @@ -185,6 +185,12 @@ olcAccessLogSuccess: TRUE | |||
3502 | 185 | 185 | ||
3503 | 186 | EOF | 186 | EOF |
3504 | 187 | $SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1 | 187 | $SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1 |
3505 | 188 | RC=$? | ||
3506 | 189 | if test $RC != 0 ; then | ||
3507 | 190 | echo "slapadd failed ($RC)!" | ||
3508 | 191 | exit $RC | ||
3509 | 192 | fi | ||
3510 | 193 | |||
3511 | 188 | PORT=`eval echo '$PORT'$n` | 194 | PORT=`eval echo '$PORT'$n` |
3512 | 189 | echo "Starting server $n on TCP/IP port $PORT..." | 195 | echo "Starting server $n on TCP/IP port $PORT..." |
3513 | 190 | cd ${XDIR}${n} | 196 | cd ${XDIR}${n} |
3514 | diff --git a/tests/scripts/test083-argon2 b/tests/scripts/test083-argon2 | |||
3515 | index 9700f1a..01803b3 100755 | |||
3516 | --- a/tests/scripts/test083-argon2 | |||
3517 | +++ b/tests/scripts/test083-argon2 | |||
3518 | @@ -97,6 +97,11 @@ EOF | |||
3519 | 97 | fi | 97 | fi |
3520 | 98 | 98 | ||
3521 | 99 | $SLAPADD -F $CONFDIR -n 0 -l $TESTDIR/config.ldif | 99 | $SLAPADD -F $CONFDIR -n 0 -l $TESTDIR/config.ldif |
3522 | 100 | RC=$? | ||
3523 | 101 | if test $RC != 0 ; then | ||
3524 | 102 | echo "slapadd failed ($RC)!" | ||
3525 | 103 | exit $RC | ||
3526 | 104 | fi | ||
3527 | 100 | 105 | ||
3528 | 101 | echo "Starting slapd on TCP/IP port $PORT1..." | 106 | echo "Starting slapd on TCP/IP port $PORT1..." |
3529 | 102 | $SLAPD -F $CONFDIR -h $URI1 -d $LVL > $LOG1 2>&1 & | 107 | $SLAPD -F $CONFDIR -h $URI1 -d $LVL > $LOG1 2>&1 & |
3530 | diff --git a/tests/scripts/test086-delta-consumer-config b/tests/scripts/test086-delta-consumer-config | |||
3531 | index b8f08cf..d89af3f 100755 | |||
3532 | --- a/tests/scripts/test086-delta-consumer-config | |||
3533 | +++ b/tests/scripts/test086-delta-consumer-config | |||
3534 | @@ -61,6 +61,12 @@ esac | |||
3535 | 61 | echo "Starting provider slapd on TCP/IP port $PORT1..." | 61 | echo "Starting provider slapd on TCP/IP port $PORT1..." |
3536 | 62 | . $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF | 62 | . $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF |
3537 | 63 | $SLAPADD -F $CFPRO -n 0 -l $CONFLDIF | 63 | $SLAPADD -F $CFPRO -n 0 -l $CONFLDIF |
3538 | 64 | RC=$? | ||
3539 | 65 | if test $RC != 0 ; then | ||
3540 | 66 | echo "slapadd failed ($RC)!" | ||
3541 | 67 | exit $RC | ||
3542 | 68 | fi | ||
3543 | 69 | |||
3544 | 64 | $SLAPD -F $CFPRO -h $URI1 -d $LVL > $LOG1 2>&1 & | 70 | $SLAPD -F $CFPRO -h $URI1 -d $LVL > $LOG1 2>&1 & |
3545 | 65 | PID=$! | 71 | PID=$! |
3546 | 66 | if test $WAIT != 0 ; then | 72 | if test $WAIT != 0 ; then |
3547 | @@ -324,6 +330,13 @@ fi | |||
3548 | 324 | 330 | ||
3549 | 325 | echo "Starting consumer slapd on TCP/IP port $PORT2..." | 331 | echo "Starting consumer slapd on TCP/IP port $PORT2..." |
3550 | 326 | $SLAPADD -F $CFCON -n 0 -l $CONFLDIF | 332 | $SLAPADD -F $CFCON -n 0 -l $CONFLDIF |
3551 | 333 | RC=$? | ||
3552 | 334 | if test $RC != 0 ; then | ||
3553 | 335 | echo "slapadd failed ($RC)!" | ||
3554 | 336 | test $KILLSERVERS != no && kill -HUP $KILLPIDS | ||
3555 | 337 | exit $RC | ||
3556 | 338 | fi | ||
3557 | 339 | |||
3558 | 327 | $SLAPD -F $CFCON -h $URI2 -d $LVL > $LOG2 2>&1 & | 340 | $SLAPD -F $CFCON -h $URI2 -d $LVL > $LOG2 2>&1 & |
3559 | 328 | CONSUMERPID=$! | 341 | CONSUMERPID=$! |
3560 | 329 | if test $WAIT != 0 ; then | 342 | if test $WAIT != 0 ; then |
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.