Commit Graph

12422 Commits

Author SHA1 Message Date
Quanah Gibson-Mount
891fc1e117 ITS#9481 - Fix cases when IPv6 support is disabled 2021-03-08 18:10:41 +00:00
Paul B. Henson
b91491a8ee ITS#9481 - fix proxyp when IPv6 disabled 2021-03-08 18:10:41 +00:00
Konstantin Andreev
f2481c8d88 ITS#9446 - Correctly parse gecos field 2021-03-04 19:05:23 +00:00
Howard Chu
17abe7e710 ITS#9491 plug memctx leak - frontend already clears it 2021-03-04 17:03:20 +00:00
Ondřej Kuzník
99efeda06f ITS#9288 Do no change tainted status on failed retry
It seems refcnt == 0 connections are tainted only if they were just
removed from cache.
2021-03-02 20:00:55 +00:00
Ondřej Kuzník
6bfdb0342d ITS#8215 Some more slapmodify manpage tweaks 2021-03-02 19:08:50 +00:00
Quanah Gibson-Mount
05b1b4688c ITS#9480 - Update example configurations to include monitor db 2021-03-02 16:12:05 +00:00
Ondřej Kuzník
34b95c520e ITS#9438 Add remoteauth overlay 2021-02-25 22:11:39 +00:00
Ondřej Kuzník
38ea26b35f ITS#7262 Retrieve the policy from the correct backend 2021-02-24 22:15:48 +00:00
Tero Saarni
0eacc4a793 ITS#9197 back-ldap: added task that prunes expired connections 2021-02-24 22:07:48 +00:00
Howard Chu
22fd5a8924 ITS#9477 fix regression from #9339
Must provide plain IP address for TCP wrapper
2021-02-24 19:59:51 +00:00
Paul B. Henson
146889f205 ITS#9419 Add support for HAProxy proxy protocol v2 2021-02-24 18:11:09 +00:00
Paul B. Henson
dcca73370b Move slap_sockaddrstr into liblutil 2021-02-24 18:11:09 +00:00
Ondřej Kuzník
a3c49b8709 ITS#9293 Store microseconds in pwdGraceUseTime 2021-02-24 17:03:22 +00:00
Ondřej Kuzník
d1799a5023 ITS#7596 Report correct number of grace authentications left 2021-02-24 17:03:22 +00:00
Ondřej Kuzník
ee564399df ITS#9282 Check all csns 2021-02-18 17:31:32 +00:00
Quanah Gibson-Mount
ce2c5173bd ITS#9161 - Fix various typos
Fix a number of different typos across the code base
2021-02-17 18:42:46 +00:00
Howard Chu
e5bd309fb2 ITS#9458 must alloc new conn->c_sb after freeing old one 2021-02-08 00:46:58 +00:00
Howard Chu
3539fc3321 ITS#9454 fix issuerAndThisUpdateCheck 2021-02-06 20:52:06 +00:00
Howard Chu
c0c1bd319e ITS#9456 fix prev commit
No need to reschedule the task inside asyncmeta_timeout_loop.
Frontend already does it if task was init'd with a valid interval.
2021-02-06 15:45:22 +00:00
Howard Chu
7c129c8d62 ITS#9456 fix asyncmeta_timeout_loop() 2021-02-06 13:47:55 +00:00
Howard Chu
e3fd030aef Fixup debug msgs 2021-02-05 23:55:27 +00:00
Quanah Gibson-Mount
6c469f0793 ITS#7790 - Rename config.h
Rename slapd/config.h to slap-config.h and update accordingly
Rename lloadd/config.h to lload-config.h and update accordingly
2021-02-02 21:26:39 +00:00
Ondřej Kuzník
1aecfe0b8f ITS#6518 Only remove proxyauthz control if we generated one ourselves 2021-02-01 17:22:35 +00:00
Ondřej Kuzník
4da575d451 ITS#7766 Fix previous commit 2021-02-01 16:51:56 +00:00
Ondřej Kuzník
ac70b01bc4 ITS#6518 When using proxyauthz, replace existing control - (async)meta 2021-02-01 16:43:06 +00:00
Ondřej Kuzník
4a02ae132d ITS#6518 When using proxyauthz, replace existing control 2021-02-01 16:04:52 +00:00
Ondřej Kuzník
20ec128916 ITS#9179 Always use effective identity when proxying 2021-02-01 14:22:45 +00:00
Howard Chu
0da38889e1 ITS#8541 fix data race in syncprov removal 2021-01-31 15:23:22 +00:00
Ondřej Kuzník
84db7cb21f ITS#7766 Include all relevant attributes in diff 2021-01-28 20:59:17 +00:00
David Barchiesi
0799f58533 ITS#9442 Add negregex constraint type for not allowing values based on a regex. 2021-01-28 18:54:03 +00:00
Howard Chu
b979b57dcf ITS#7468 slapd-relay: set real op->o_bd on successful bind 2021-01-21 13:23:34 +00:00
Ondřej Kuzník
58dfef012c ITS#7439 Do not free parts of original filter 2021-01-20 11:39:17 +00:00
Ondřej Kuzník
a99e435200 Return success in glue destroy 2021-01-20 11:37:01 +00:00
Ondřej Kuzník
fc1bcaf9de ITS#5941 manage callbacks to coexist with other overlays 2021-01-18 14:36:16 +00:00
Howard Chu
9d440e3d28 ITS#8307 slapo-accesslog additional check 2021-01-13 16:58:42 +00:00
Howard Chu
85b68aa5e2 ITS#8307 slapo-dds: mark internal searches as do_not_cache 2021-01-13 16:39:24 +00:00
Howard Chu
eefe12366c ITS#8307 fix slapo-accesslog: noop if logDB isn't open yet
Add be_flag for DB OPEN status
2021-01-13 16:35:43 +00:00
Quanah Gibson-Mount
efaf9a4a17 Happy New Year! 2021-01-11 19:25:53 +00:00
Howard Chu
dfe1f6494d ITS#9428 fix cancel exop 2020-12-20 21:31:15 +00:00
Howard Chu
27428b96f5 ITS#9427 fix issuerAndThisUpdateCheck 2020-12-16 18:52:42 +00:00
Howard Chu
354e678ce9 ITS#9426 dynlist: don't add unexpanded groups at end of search
if pagedResults is in use
2020-12-15 22:55:47 +00:00
Howard Chu
777098aa9d ITS#9424 fix serialNumberAndIssuerSerialCheck 2020-12-14 19:03:27 +00:00
Ondřej Kuzník
d9f20cc09e ITS#9363 Set appropriate defaults where needed 2020-12-08 19:11:22 +00:00
Ondřej Kuzník
0c3b8a3524 ITS#9363 Store defaults in ArgConf 2020-12-08 19:11:22 +00:00
Ondřej Kuzník
356715fd08 ITS#9363 Zero out values on config delete 2020-12-08 19:11:22 +00:00
Ondřej Kuzník
a44ba27410 ITS#9363 Unset readonly on delete 2020-12-08 19:11:22 +00:00
Quanah Gibson-Mount
d28e231a69 ITS#9420 - Fix memory leak in modrdn
Fix provided by grapvar@gmail.com
2020-12-08 16:05:35 +00:00
Howard Chu
4e801a9aaf ITS#9416 more componentFilterMatch garbage 2020-12-03 19:30:53 +00:00
Howard Chu
6ae9bf167d ITS#9014 fix component match parsing errors 2020-12-01 21:29:19 +00:00
Howard Chu
e394bcfa76 ITS#9413 fix slap_parse_user 2020-12-01 19:05:06 +00:00
Howard Chu
42d42421a8 ITS#9412 fix AVA_Sort on invalid RDN 2020-12-01 19:04:54 +00:00
Howard Chu
2aef56cd24 ITS#9411 fix thisUpdate check 2020-12-01 19:04:46 +00:00
Howard Chu
0c856f1b64 ITS#9410 remove assert in csnValidate 2020-11-30 16:42:17 +00:00
Howard Chu
b1c1a5eb51 ITS#9409 saslauthz: use slap_sl_free in prev commit 2020-11-30 16:20:18 +00:00
Howard Chu
0e09c857b6 ITS#9409 saslauthz: use ch_free on normalized DN 2020-11-30 11:45:46 +00:00
Howard Chu
a11b719c96 ITS#9408 fix vrfilter double-free 2020-11-28 15:54:17 +00:00
Howard Chu
5c27f9569f ITS#9406 fix debug msg 2020-11-27 14:48:26 +00:00
Howard Chu
fa0f97545c ITS#9406, #9407 remove saslauthz asserts 2020-11-27 14:37:10 +00:00
Howard Chu
12523b0f29 ITS#9400 back-ldap: fix prev commit 2020-11-24 16:08:29 +00:00
Howard Chu
dbe69684a1 ITS#9404 fix serialNumberAndIssuerCheck
Tighten validity checks
2020-11-23 17:14:00 +00:00
Howard Chu
1ea12260d5 ITS#9400 back-ldap: fix retry binds
Regression from fix for ITS#7403
2020-11-23 05:14:30 +00:00
Nadezhda Ivanova
2d33032504 Lload cn=monitor initial implementation 2020-11-17 17:58:14 +00:00
Ondřej Kuzník
46ddb4039c lloadd ahoy 2020-11-17 17:15:40 +00:00
Howard Chu
a87ae275e1 ITS#9394 syncprov: ignore duplicate sessionlog entries 2020-11-17 00:31:56 +00:00
Quanah Gibson-Mount
6492012e00 Remove various unused variables 2020-11-12 18:05:59 +00:00
Howard Chu
9eb948529b ITS#9391 remove asserts in UUIDNormalize() 2020-11-11 18:25:31 +00:00
Ondřej Kuzník
ee49c83976 Cleanup use of *alloc() in daemon.c 2020-11-09 16:57:21 +00:00
Ondřej Kuzník
727ec3ae14 ITS#9386 State change issues are still ignored, but at least log them 2020-11-09 11:51:20 +00:00
Ondřej Kuzník
123001c89d ITS#9386 Address compiler warnings 2020-11-09 11:50:37 +00:00
Howard Chu
6b0fc9e034 ITS#9121 fix filtered memberOf
Broken in 2c0499ae4e adding nesting
2020-11-03 01:18:32 +00:00
Howard Chu
c0eeb2b9b8 ITS#9384 remove assert in obsolete csnNormalize23() 2020-11-02 16:01:14 +00:00
Howard Chu
265d362f27 ITS#9383 remove assert in certificateListValidate 2020-11-02 13:12:10 +00:00
Howard Chu
87158469eb ITS#9121 fix dynlist_filter_dup for substring filter 2020-10-30 23:30:28 +00:00
Quanah Gibson-Mount
2f0883d161 ITS#9380 - Fix return type for connection_write_resume 2020-10-29 19:55:37 +00:00
Howard Chu
db46f88853 ITS#9379 reject listener URLs with non-empty DNs 2020-10-28 16:50:23 +00:00
Ondřej Kuzník
98a0029dae ITS#9366 Check ldap_install_tls return and remove connection if failed 2020-10-23 20:38:21 +00:00
Howard Chu
6abfd60078 ITS#9370 revert previous commit, alternate fix
Just skip normalization if there's no equality rule. We accept
DNs without equality rules already.
2020-10-19 14:14:54 +01:00
Howard Chu
a08a2db406 ITS#9370 check for equality rule on old_rdn
We should probably just check in dnNormalize instead, and catch
this everywhere DNs are received. It might make us reject some
DNs that are already in use, though (e.g. received from other
directory servers that don't do schema checking).
2020-10-19 14:03:41 +01:00
Howard Chu
c1912fb7af ITS#9121 don't process nested memberOf if memberOf wasn't requested 2020-10-13 22:11:44 +01:00
Howard Chu
fb587d3d58 ITS#9361 prevent CSN from being generated for purge deletes 2020-10-02 13:25:52 +01:00
Howard Chu
56860fc405 ITS#9342 delta-syncL ignore add of already existing entry
if the entryCSN is older. Previous patch breaks if writes are
received out of order, e.g. during a refresh.
2020-10-01 14:27:24 +01:00
Ondřej Kuzník
efc23cddc3 ITS#9295 Do not replace 'op' 2020-09-30 18:55:34 +00:00
Ondřej Kuzník
20024d5ba8 ITS#9359 Do not create an empty add 2020-09-30 19:25:56 +01:00
Howard Chu
ed949bf287 ITS#9342 delta-sync: ignore add if entryCSN is too old
This check is only needed for ops received without a CSN in their cookie.
This only occurs when the ops completed out of order on the provider.
2020-09-30 15:45:04 +00:00
Howard Chu
80a545b5ed Partially Revert "ITS#8486 use kbtree for sessionlog"
This mostly reverts commit 1915cb968a.
Too many concurrency issues. Retains the improvement to
syncprov_sessionlog_cmp
2020-09-30 15:11:31 +00:00
Howard Chu
2bbb51e20b ITS#9358 Fix reqStart normalizer
Don't truncate trailing zeroes in reqStart/reqEnd timestamps
2020-09-29 09:43:37 +01:00
Ondřej Kuzník
67d005ee65 ITS#9348 Stop using plain strerror() 2020-09-25 12:47:46 +01:00
Quanah Gibson-Mount
f3e86d3d93 ITS#8636 - Fix DESC for deltaCRL attribute 2020-09-25 04:29:59 +00:00
Quanah Gibson-Mount
fe3636df9d ITS#8341 - Add matching rule to the namingContexts attr 2020-09-25 02:05:55 +00:00
Howard Chu
1915cb968a ITS#8486 use kbtree for sessionlog
Saves about 20% CPU time and RAM
2020-09-25 00:07:50 +00:00
Ondřej Kuzník
98d5c5c6ce ITS#8486 Protect tavl_* calls in play_sessionlog 2020-09-25 00:07:50 +00:00
Howard Chu
8f8774c0b1 ITS#8486 Minor play_sessionlog cleanup
Fix logmsg uuidstr.
Shortcut finding start of playback.
Allow dup CSNs in log, but with different UUIDs. All
non-present deletes in a refresh use the same CSN.
2020-09-25 00:07:50 +00:00
Ondřej Kuzník
d2036cec90 ITS#8486 Switch sessionlog to use TAVL 2020-09-25 00:07:50 +00:00
Ondřej Kuzník
3f5293e145 ITS#5422 Save errno before passing it to Debug() 2020-09-24 23:34:36 +00:00
Howard Chu
c3131eb5a3 ITS#9348 replace all uses of STRERROR with AC_STRERROR_R
Avoid using sys_errlist unless there's no other choice
2020-09-24 23:34:36 +00:00
Ondřej Kuzník
1b8e6b944b ITS#9355 Propagate errors from overlay_entry_get_ov 2020-09-23 11:10:29 +01:00
Howard Chu
62ecd38bc4 ITS#8102 syncrepl: only use trylock on the cn=config DB 2020-09-22 21:27:15 +01:00
Quanah Gibson-Mount
a3f186880c ITS#9351 - Always build back-monitor as a static backend 2020-09-21 16:52:33 +00:00
Howard Chu
dd82fa5393 ITS#9353 fix monitor_back_register_database for empty suffix DB
Use the correct database entry instead of the frontendDB entry
2020-09-20 16:29:38 +01:00
Quanah Gibson-Mount
bc021bb244 ITS#6749 - Change configure monitor warning to DEBUG CONFIG instead of DEBUG ANY 2020-09-18 14:56:43 +00:00
Howard Chu
331e587754 ITS#9352 syncrepl: fix syncrepl_op_modify on entry with no entryCSN 2020-09-17 20:18:20 +01:00
Gabriel Buades
984ecd113a ITS#9349 slapd-mdb: optimize index delete
Performance improvement for indexed attributes removal
2020-09-17 18:21:53 +01:00
Howard Chu
2b512ea79c ITS#9339 Fix syncrepl_monitor_init for dynamic monitor backend
Calling from backend.c only works if back-monitor is a static backend
2020-09-17 15:22:01 +01:00
Howard Chu
3e181b8453 Silence stupid warnings 2020-09-16 23:27:45 +01:00
Quanah Gibson-Mount
947b8ed9d6 Fix code indentation for recent changes 2020-09-16 21:13:28 +00:00
Howard Chu
d63287e2f4 ITS#9345 fix for cmdline cookie
Previous commit could cause cmdline cookie to be ignored
2020-09-15 15:00:57 +00:00
Howard Chu
afc970b11d ITS#9015 syncprov: fix for zero-length suffix
If the "" glue entry exists and lacks a contextCSN, must perform
an additional search to be sure the DB is otherwise empty. If so,
skip creating the contextCSN.
2020-09-15 12:08:22 +01:00
Howard Chu
9a3e63ba00 ITS#9338 alternate fix
Don't resume pending ops unless there are no other threads
waiting to write
2020-09-13 08:05:31 +00:00
Howard Chu
57643b4347 ITS#9345 syncrepl: call check_syncprov on freshly started consumer 2020-09-12 21:44:31 +01:00
Howard Chu
ef2b505b20 ITS#9043 Fix new log msg crashes
Solaris stdio hates NULL pointers
2020-09-11 23:36:41 +00:00
Howard Chu
fdf6ee5059 ITS#8054 fix etime calculation
Was overlooked in a0cc1d9655
2020-09-11 23:01:16 +00:00
Howard Chu
72bfa9d488 ITS#9339 fix connection address handling
valgrind didn't like accesses to si->si_connaddr
Also fix an array bounds check in ITS#9282 merge_state
2020-09-10 17:03:32 +00:00
Howard Chu
490273fb97 ITS#8102, #9330 partially revert
Fix a regression in delta-sync, was returning error on old
CSNs instead of ignoring them
2020-09-10 16:17:13 +00:00
Ondřej Kuzník
eb5f138650 ITS#9043 Only print sessionlog entries we think will apply 2020-09-10 11:04:29 +01:00
Ondřej Kuzník
fdbeb69fd8 ITS#9043 Nul-terminate csn string 2020-09-10 11:03:37 +01:00
Howard Chu
1748ec59a6 ITS#9339 Add syncrepl status to cn=monitor
Shows connection address, refresh/persist state, time of last
connect attempt and received data, and last sent and
received cookies per consumer.
2020-09-10 02:29:19 +00:00
Howard Chu
d1283f8161 ITS#9339 slapd-monitor: Add schema arc for overlays
Not directly related to syncrepl, but adds a necessary schema arc.
Also add a convenience function for obtaining an entry with known ndn.
Also fix to ignore outbound connections.
2020-09-10 02:29:19 +00:00
Howard Chu
bf40306581 ITS#9043 tweak syncprov play_sessionlog logging
Don't log cookiecsn at top, it was already logged on receipt.
Only log the "control csn" and "too old" message once for each sid.
2020-09-09 18:02:49 +01:00
Howard Chu
e02b1d94ca ITS#8102 serialize plain syncrepl
Using cs_pmutex. Reverts the addition of cs_modmutex in ITS#9330,
use cs_pmutex for both delta and plain writes.

Note that plain syncrepl already used cs_pmutex when a cookie CSN
was present in the op. Now it is used for all writes, regardless
of presence of cookie.
2020-09-09 15:35:59 +00:00
Howard Chu
8bd2d1fee8 ITS#9342 delta-sync: ignore error if deleting an already deleted entry 2020-09-09 00:19:35 +01:00
Howard Chu
95c5a1698b ITS#9338 Make sure connection gets rescheduled after write blockage clears up 2020-09-04 18:22:40 +01:00
Howard Chu
0b20b92ec1 ITS#9338 syncrepl: Don't reuse existing connection on Refresh fallback 2020-09-04 18:22:32 +01:00
Howard Chu
ed356c55d9 ITS#9334 slapo-ppolicy re-fix ITS#9302
The mutex_lock was being skipped in the lockout case,
but still calling mutex_unlock at the end.
2020-09-03 21:30:35 +01:00
Howard Chu
b24ca75993 ITS#9201 fix LDAP_THREAD_DEBUG
Add missing defs to ldap_thr_debug.h.
slap tools must init libldap so internal mutexes get inited.
2020-09-03 12:37:32 +01:00
Quanah Gibson-Mount
b51faa5cf0 Revert "Tweak prev commit for RE24 style debug"
This reverts commit d224e576a9.

Revert, wrong branch
2020-09-02 19:33:03 +00:00
Quanah Gibson-Mount
d224e576a9 Tweak prev commit for RE24 style debug 2020-09-02 19:31:59 +00:00
Howard Chu
4c7787303c ITS#9121 fix for URLs with no filter 2020-09-02 01:34:07 +01:00
Howard Chu
41396248a2 ITS#9282 more for merge_state
Don't assume si_cookieState is always newer
2020-08-31 20:09:52 +01:00
Howard Chu
8699e5f32e ITS#9282 fix crash in nonpresent_callback
In a standard Refresh present phase, the provider sends no cookie
since it is only listing the entries that existed as of the time
in the cookie the consumer sent. In this case the consumer only
needs to check entryCSNs against its last sent cookie.
2020-08-31 19:36:10 +01:00
Howard Chu
0ce83b26af ITS#9330 Fully serialize delta-sync
Don't depend on accesslog overlay's serialization
2020-08-29 01:13:04 +00:00
Howard Chu
edc94862b7 ITS#7639 fix crash in config_delete
Additional fix to 41352ea34d
The overlay must be deleted from the backend before the
callback can execute. In particular, it must be done before
the threadpool is unpaused.
2020-08-29 00:13:19 +00:00
Howard Chu
f883a57593 ITS#8427 don't set tls_ctx if TLS wasn't requested
Also, set any remaining TLS options that weren't carried along
in the TLS ctx.
2020-08-28 18:44:35 +01:00
Quanah Gibson-Mount
8d31219647 More for ITS#8845, skip cleanup on async op with extended operations 2020-08-26 21:55:39 +00:00
Howard Chu
9900794af1 ITS#9329 Re-fix merge_state
A bit uglier but more straightforward.
2020-08-26 21:00:00 +01:00
Quanah Gibson-Mount
c1411b8199 ITS#9323 - Limit to OpenSSL 1.0.2 or later 2020-08-25 21:52:04 +00:00
Howard Chu
9666306d86 ITS#9329 syncrepl: fix regression from ITS#9282 2020-08-25 21:13:22 +00:00
Fabrice Fontaine
8df03b435e ITS#9327 - Fix stripping when cross-compiling
Probably-Signed-off-by: Dave Bender <bender@benegon.com>
[yann.morin.1998@free.fr: patch was made by Dave, but he
 forgot his SoB line, so I added it]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[Retrieved from:
https://git.buildroot.net/buildroot/tree/package/openldap/0001-fix_cross_strip.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-08-25 19:54:59 +00:00
Howard Chu
5aa7e0f69b ITS#9324 syncrepl: don't wait forever in Refresh mode
Just poll for available data, same as Persist mode.
Clarify retry/return states from do_syncrep2
2020-08-24 15:12:24 +00:00
Howard Chu
88e569d857 ITS#9249 librewrite: fix malloc/free corruption
If substitution parsing fails, would attempt to free a mapping
that hadn't been allocated yet.

Also, on failure, caller in saslauthz would attempt to free a
rwinfo struct that hadn't been allocated.
2020-08-23 19:32:51 +00:00
Fredrik Roubert
8a521c17aa ITS#9232 - Implement caseIgnoreListSubstringsMatch. 2020-08-21 21:45:19 +00:00
Quanah Gibson-Mount
aa78299346 ITS#9311 - Correctly mark overlays as singular 2020-08-21 19:34:27 +00:00
Howard Chu
650b1404c2 ITS#9054, #9318 add new TLS options to slapd bindconf
For use with back-ldap/back-meta/syncrepl/etc
2020-08-21 20:06:56 +01:00
Howard Chu
12e11c9b84 ITS#9121 slapo-dynlist, -memberof: define memberOf if needed
Ignore if it's defined already. Make it no-user-mod.
2020-08-18 23:49:26 +00:00
Howard Chu
9d2f15307d ITS#7926 dynamic changes to olcListenerThreads
Reallocates sockets from old to new listener threads
2020-08-18 22:37:50 +01:00
Howard Chu
2f94318f06 ITS#7926 support multiple config cleanup functions per op
Prep for main changes
2020-08-18 22:00:58 +01:00
Howard Chu
b0d7308371 ITS#9135 fix index error on collapsed range 2020-08-13 18:18:45 +01:00
Quanah Gibson-Mount
00b14b1e28 ITS#9133 - Fix syncprov to be singular. 2020-08-10 23:41:07 +00:00
Howard Chu
633d40b0ac For ITS#9309 fix check for duplicate overlays
and pass error message back to frontend
2020-08-10 16:40:54 +01:00
Howard Chu
c8c39b8468 ITS#9309 don't allow ppolicy to be configured more than once on a backend 2020-08-10 16:07:39 +01:00