Commit graph

13130 commits

Author SHA1 Message Date
Howard Chu
cc79020b42 ITS#9929: more performance tweaks
For simple (non-nested) member compares, avoid unnecessary fetches
of dyngroups that can't match the filter.
cache filter/entry instance info across multiple dyn entries to
avoid refetching each filter entry for each dyngruop test.
2022-12-01 15:39:03 +00:00
Howard Chu
d337ae751f ITS#9929 slapo-dynlist: more performance tweaks
Minimize cost of dynamic lists while still making them filterable:
require their attrs to be explicitly mapped if filtering is to be supported.

Also check config scope in compare op
2022-12-01 15:39:03 +00:00
Ondřej Kuzník
512a99b054 ITS#9951 Postpone releasing a connection reference while in cn=monitor 2022-11-24 10:04:42 +00:00
Ondřej Kuzník
e45869dd7e ITS#9947 Fix race in epoch.c and simplify 2022-11-07 10:00:10 +00:00
Howard Chu
5e2fa8a213 ITS#9940 back-mdb: fully init empty DN in tool_entry_get 2022-11-01 17:13:23 +00:00
Ondřej Kuzník
a6f3106afc ITS#9045 Do not share cn=config entries with outside code
config_back_entry_get currently returns the entry directly without
securing the rwlock, which is unsafe. However we can't keep holding it
on return in case the caller decides to hold onto the entry
indefinitely, hence rlock+entry_dup+runlock.
2022-10-31 18:16:42 +00:00
Howard Chu
2316927dc9 ITS#9942 back-mdb: always release entries from Add ops 2022-10-31 17:30:02 +00:00
Howard Chu
cbdeb374cf ITS#9936 slapcat/slapschema: fix free of subtree cmdline option
Must dup arg since subtree may also come from parsed URL.
2022-10-20 12:27:01 +01:00
Howard Chu
3991a0d191 ITS#9935 slapd UTF8StringValidate: fix read past end of string
Harmless, length check at end of routine would have returned an
error anyway.
2022-10-20 12:20:00 +01:00
Howard Chu
04eded74fe ITS#9930 fix cn=config / write_waiter deadlock
If a writer is blocked and a config pause is pending, just
close the blocked connection. Don't wait around for a slow
client to catch up.
2022-10-14 15:22:24 +01:00
Ondřej Kuzník
13d9c925dd ITS#9907 Move TLS context cleanup into lload_global_destroy 2022-10-12 17:36:12 +00:00
Howard Chu
01cf74be02 ITS#9929 more for prev commit
Don't prevent returning dynamic lists if dynamic groups were part of search.
2022-10-09 16:41:04 +01:00
Howard Chu
a3c7e5076a ITS#9929 dynlist: more for prev commit
Was broken if only dynamic lists were configured, and not groups.
Also, optional config URIs were being ignored.
2022-10-09 15:04:31 +01:00
Howard Chu
a64320d8ab ITS#9929 dynlist: avoid unnecessary search for dynamic lists 2022-10-09 11:51:54 +01:00
Ondřej Kuzník
d8f4b1a492 ITS#9926 Drop unneeded symlinks from source 2022-10-06 14:50:55 +01:00
Howard Chu
e640ce282a ITS#9924 slapo-deref: plug memleak
memory alloc'd by bvarray_dup must be freed by bvarray_free, not regular free.
2022-09-29 21:44:25 +00:00
Ondřej Kuzník
a779f148a0 ITS#9878 Have refint use interval 0 to schedule its task
Since the task is not rescheduled until a new operation comes in, close
a race where the reschedule chooses to stop it while the new item is
being added.
2022-09-26 17:34:21 +00:00
Ondřej Kuzník
148204839f ITS#9886 Report time taken to process each syncrepl message 2022-09-26 16:37:14 +00:00
Ondřej Kuzník
9134be7ecc ITS#9886 Maintain si_lastcontact as struct timeval 2022-09-26 16:37:14 +00:00
Ondřej Kuzník
034225ff5c ITS#9907 Some tools consider abandoned global data a leak 2022-09-15 17:33:39 +01:00
Ondřej Kuzník
aa209e4647 ITS#9892 Free operation data at the end of a transaction 2022-09-15 17:33:39 +01:00
Ondřej Kuzník
3ad71958ee ITS#9878 We no longer have to trigger li->li_conn_expire_task twice 2022-09-08 08:31:22 +01:00
Ondřej Kuzník
fa8cb31eb9 ITS#9878 One-shot tasks are now possible with interval == 0 2022-09-08 08:31:22 +01:00
Ondřej Kuzník
29c3a443d8 ITS#9878 Treat tasks with interval == 0 as one-shot
Some tasks need to be run once at a given time or the earliest
opportunity, also currently, using interval == 0 on a task triggers
a busy loop inside the scheduling task, halting progress for other
tasks and any other work usually serviced by that thread.

This change deals with both issues at the same time.
2022-09-08 08:31:22 +01:00
Ondřej Kuzník
294a16c10c ITS#9853 Allow inheriting lastbind precision from the frontend 2022-09-07 15:01:15 +01:00
Ondřej Kuzník
a033c1e74e ITS#9913 Protect code in clients_destroy and tier_destroy 2022-09-02 16:49:45 +01:00
Ondřej Kuzník
1942bc20a8 ITS#9339 Free remembered cookies on syncinfo free 2022-09-02 16:49:45 +01:00
Ondřej Kuzník
9014e8bb81 ITS#9907 Do not redefine variables inherited from slapd 2022-09-02 12:56:25 +01:00
Howard Chu
a6fa0450f6 ITS#9912 slapd: urls comes from optarg, not allocated
May leak on Windows if set in registry. Don't care.
2022-09-02 04:04:33 +01:00
Ondřej Kuzník
f3ed13fad2 ITS#6035 Plug olcAuthIDRewrite cn=config leak 2022-09-01 10:09:27 +01:00
Ondřej Kuzník
9c747074ff ITS#9438 slapo-remoteauth: plug config leaks 2022-09-01 10:09:27 +01:00
Ondřej Kuzník
333d61d7eb ITS#9907 Plug shutdown related leaks in lloadd 2022-09-01 10:09:23 +01:00
Ondřej Kuzník
ad79add5a0 ITS#9907 Do not redefine variables inherited from slapd 2022-09-01 10:09:19 +01:00
Ondřej Kuzník
b457cdebc1 ITS#9906 Do not leak cn=monitor related allocs in lloadd 2022-09-01 10:09:15 +01:00
Ondřej Kuzník
2362c7ccc7 ITS#9906 Do not touch subsys members after mss_destroy called 2022-09-01 10:09:10 +01:00
Howard Chu
3ef90929ee ITS#9897 fix dynlist to ignore entries with wrong objectclass 2022-08-30 14:34:06 +00:00
Howard Chu
aef1c05089 ITS#9894 don't use gmake-specific features 2022-08-15 20:53:03 +00:00
Howard Chu
161ef83927 ITS#9895 slapd-mdb: raise MDB_INDICES from 128 to 256 2022-08-06 18:47:40 +01:00
Howard Chu
4528bdb3f3 ITS#9882 bind: fix #9863 commit, use correct op/backend for mod 2022-07-11 17:55:37 +01:00
Ondřej Kuzník
207604c0b5 ITS#9823 Only request minCSN if accesslog is around 2022-07-07 21:31:03 +01:00
Quanah Gibson-Mount
fb1151573f ITS#9863 - Forward lastbind updates if configured
Mark lastbind operations as being on the frontendDB so that chaining configurations are honored.

Make pwdLastSuccess flag SLAP_AT_MANAGEABLE
2022-07-06 20:46:49 +00:00
Howard Chu
4e3687cda3 ITS#9871 slapo-ppolicy: use explicit backend in bind_response 2022-06-24 16:49:45 +01:00
Ondřej Kuzník
5d985e0145 ITS#9870 Drop optional overlay configuration option 2022-06-23 11:53:51 +01:00
Howard Chu
fbe844f814 ITS#9868 also fixup glue_sub_del() 2022-06-22 15:27:58 +00:00
Howard Chu
0d1db3c2b1 ITS#9868 Fixup pending_csn_list for backglue
Define in a new structure and point to it for more flexible access
2022-06-22 15:27:58 +00:00
Ondřej Kuzník
c64e663518 ITS#9823 Check minCSN when setting up delta-log replay 2022-06-21 16:21:56 +00:00
Howard Chu
d64f85e161 ITS#9867 syncprov: plug onetime leak
Since 43ebfa8fb4 ITS#6467
2022-06-16 22:14:41 +01:00
Howard Chu
745a71b18d ITS#9867 syncprov: plug findbase memleak 2022-06-16 21:36:24 +01:00
Howard Chu
14972a7ae1 ITS#9866 delta-sync: fix DN leak on Adds 2022-06-16 21:32:07 +01:00
Howard Chu
95f959e215 ITS#9864 slapo-accesslog: plug onetime memleaks 2022-06-16 16:10:59 +01:00
Ondřej Kuzník
81b5ca9113 ITS#8245 Do not try to release a NULL entry 2022-06-14 21:52:18 +00:00
Ondřej Kuzník
598929a507 ITS#9856 Tag responseName correctly 2022-06-06 16:30:08 +00:00
Howard Chu
395e9b250a ITS#9858 back-mdb: fix index reconfig 2022-06-03 17:06:39 +01:00
Howard Chu
9e5701cdd7 ITS#9858 back-mdb: delay indexer task startup
until after monitor backend is set up.
2022-06-02 16:06:31 +01:00
Howard Chu
205e2f1a3e ITS#7165 back-mdb: check for stale readers on MDB_READERS_FULL
retry opening a read txn if we cleared any stale readers
2022-05-16 13:54:08 +00:00
Howard Chu
ced6652efb ITS#9847 slapd: fix kqueue for FreeBSD/MacOSX/OpenBSD 2022-05-14 17:16:02 +01:00
Howard Chu
87df6c1991 ITS#9815 slapd-sql: escape filter values 2022-05-04 14:48:29 +00:00
Ondřej Kuzník
15573c72fc ITS#9831 Advance connections[index] correctly 2022-04-26 23:23:09 +00:00
Ondřej Kuzník
47069fee55 ITS#9832 Reset e back to the entry we need to release 2022-04-25 17:00:23 +00:00
Howard Chu
6657caaad8 ITS#9820 fix writewait/idletimeout interaction
Since 88d22a1ca3 the writewait check
was moved out of connections_timeout_idle() but the connection loop
was still testing the writewait flag. That test is no longer relevant.
2022-04-22 16:22:38 +00:00
Howard Chu
c2d546704b ITS#9825 dynlist: don't lose earlier filter elements 2022-04-22 15:39:46 +00:00
Ondřej Kuzník
1f5f97d69e ITS#9802 Fix argv handling 2022-04-21 16:30:44 +00:00
Ondřej Kuzník
f7bdf7aaf4 ITS#9818 Duplicate substring filters correctly 2022-04-11 16:57:59 +01:00
Howard Chu
f0a6465f23 ITS#9802 slapd-ldap/meta/async-meta: plug memleak in keepalive config 2022-03-21 20:21:20 +00:00
Howard Chu
e9b11154ee ITS#9802 slapd-meta: fix rewrite config ordering 2022-03-21 20:21:20 +00:00
Howard Chu
d878ebc3d2 ITS#9802 slapd-meta: fix rewrite config SEGV 2022-03-21 20:21:20 +00:00
Howard Chu
e29ba72c56 ITS#9809: pcache, mdb: fix SEGV in monitor shutdown 2022-03-15 17:04:42 +00:00
Ondřej Kuzník
a9d98407d2 ITS#9808 Store the correct value in olcLastBind 2022-03-14 09:35:12 +00:00
Ondřej Kuzník
34ebfac7ef ITS#9799 Drop a bind connection if there's a timeout 2022-03-07 15:39:09 +00:00
Ondřej Kuzník
fbfb5454cd ITS#9343 Allow Compare to check pwdPolicySubentry 2022-03-07 14:54:39 +00:00
Ondřej Kuzník
6a903a8cf1 ITS#9343 Switch ppolicy_get to rely on ppolicy_operational 2022-03-07 14:54:39 +00:00
Ondřej Kuzník
db9da05171 ITS#9343 Provide effective value of pwdPolicySubentry 2022-03-07 14:54:39 +00:00
Ondřej Kuzník
950ff8a5f0 ITS#9343 Allow a list of default policies 2022-03-07 14:54:39 +00:00
Ondřej Kuzník
1fac13d239 ITS#9343 Let backend_attribute read operational attributes
back-mdb checks requested attribute is present in the entry which
can obstruct the fallback to backend_operational.
2022-03-07 14:54:39 +00:00
Howard Chu
4996d42277 ITS#9801 syncrepl/dsee init punlock 2022-02-22 17:11:45 +00:00
Ondřej Kuzník
0806f69c8c ITS#9799 Clear c_n_ops_pending after we've flushed c_pending_ops 2022-02-14 17:32:01 +00:00
Ondřej Kuzník
1800a1f10c ITS#9794 Synchronise how Adds and Modifies are handled 2022-02-08 17:04:40 +00:00
Howard Chu
62bf31e966 ITS#9584 bconfig: protect cf entries with rwlock
Since not all config writes pause the server, must prevent
searches from seeing intermediate states.
2022-02-03 18:40:39 +00:00
Howard Chu
868c7953d7 ITS#9436 OpenSSL 3.0 compat 2022-02-03 16:42:44 +00:00
Ondřej Kuzník
87ffc60006 ITS#9584 Do not rely on retry=.* to reschedule new syncrepl sessions 2022-01-28 17:49:30 +00:00
Ondřej Kuzník
ca19a774f6 ITS#9785 clear runqueue task as soon as it's getting started 2022-01-27 15:59:39 +00:00
Ondřej Kuzník
f5d86968c7 ITS#9789 slapd-asyncmeta: Reset op->o_counters every time we migrate to a new thread 2022-01-26 18:55:41 +00:00
Ondřej Kuzník
ebc7369727 ITS#9789 slapo-syncprov: Reset op->o_counters every time we migrate to a new thread 2022-01-26 18:55:41 +00:00
Ondřej Kuzník
ebfbf8281a ITS#9789 Expose operation_counter_init 2022-01-26 18:55:41 +00:00
Howard Chu
38e16e3b39 ITS#9787 init global_host earlier so tools see it too 2022-01-23 14:08:24 +00:00
Ondřej Kuzník
7e923c723e ITS#7239 Do not log internal ops 2022-01-18 20:11:46 +00:00
Ondřej Kuzník
a6c110d16d ITS#7080 cn=config postread support for modrdn when back-ldif not used 2022-01-18 18:31:32 +00:00
Ondřej Kuzník
67f7f98ca5 ITS#7080 Fix debug message 2022-01-18 18:31:32 +00:00
Ondřej Kuzník
6ccc0974e1 ITS#8039 Free resinfo even if opcookie is the last owner 2022-01-18 16:46:09 +00:00
Howard Chu
e73cdc55e0 ITS#9779 slapo-dynlist: fix static group filter with multiple members 2022-01-18 15:11:28 +00:00
Ondřej Kuzník
2443e986d1 ITS#9772 Allow objectClass edits that don't actually change them 2022-01-18 05:12:53 +00:00
Ondřej Kuzník
4b18c2be00 ITS#5972 Consider all deletes for syncInfo messages
A delete of an entry that didn't match filter would be skipped
altogether and the cookie would never be sent to that consumer.
2022-01-18 03:34:27 +00:00
Ondřej Kuzník
6f31d73dc0 ITS#9776 Fix check on what backend we're operating on 2022-01-11 08:45:44 +00:00
Ondřej Kuzník
414866b888 ITS#9580 Propagate a present-phase cookie flush into accesslog 2022-01-11 06:47:00 +00:00
Ondřej Kuzník
bc28e7950d ITS#9538 Actually skip internal searches 2022-01-10 22:25:33 +00:00
Ondřej Kuzník
87b78f2060 ITS#9538 Do not attach csn on (internal) searches 2022-01-10 22:25:33 +00:00
Ondřej Kuzník
95df37d101 ITS#9538 Populate op2.o_hdr earlier 2022-01-10 22:25:33 +00:00
Ondřej Kuzník
70e6bd6777 ITS#9751 Do not drop out of order deletes completely 2022-01-10 18:44:28 +00:00
Quanah Gibson-Mount
788e9592ba Happy New Year! 2022-01-07 18:40:00 +00:00
Ondřej Kuzník
3ca8d6d388 ITS#9770 slapo-constraint: Maintain values in order of insertion 2022-01-06 16:28:52 +00:00
Ondřej Kuzník
2bf59ff63a ITS#7080 Find config entry before processing pre-read on delete 2022-01-06 03:05:45 +00:00
Ondřej Kuzník
d8331e1b81 ITS#9768 Enforce single name per olcTranslucentLocal/olcTranslucentRemote value 2022-01-05 21:24:07 +00:00
Ondřej Kuzník
711ebba53c ITS#9767 Enforce single name per olcUniqueIgnore/olcUniqueAttribute value 2022-01-05 19:21:17 +00:00
Ondřej Kuzník
0ecaa025d2 ITS#9764 slapo-valsort: Maintain values in order of insertion 2022-01-05 05:07:34 +00:00
Ondřej Kuzník
52bba704e7 ITS#9763 Make sure we keep cn=config values separate 2022-01-04 22:34:32 +00:00
Ondřej Kuzník
e87569f983 ITS#9763 Maintain values in order of insertion 2022-01-04 22:34:32 +00:00
Ondřej Kuzník
a5e7fdce48 ITS#9762 slapo-dyngroup: Maintain values in order of insertion 2022-01-04 20:10:01 +00:00
Ondřej Kuzník
a8467b8b15 ITS#9761 Fix olcSyncrepl position based insertion 2022-01-04 17:53:26 +00:00
HAMANO Tsukasa
30917b984c ITS#9760 back-wt: SLAP_DBFLAG_CLEAN is always set. 2022-01-03 18:00:00 +00:00
Ondřej Kuzník
edf7ef4948 ITS#9642 Lloadd standalone doesn't use rq 2021-12-15 20:40:53 +00:00
Ondřej Kuzník
bc37a9fdfa ITS#9642 Remove redundant calls to slap_wake_listener() 2021-12-15 20:40:53 +00:00
Ondřej Kuzník
19d4a69882 ITS#9642 Notify runner of any changes to the runqueue 2021-12-15 20:40:53 +00:00
Ondřej Kuzník
fbd4f9abdd ITS#9556 Send INVALID_SYNTAX for invalid schema elements 2021-12-15 18:39:46 +00:00
Ondřej Kuzník
def3a958ec ITS#9556 Allow handlers to set result code 2021-12-15 18:39:46 +00:00
Ondřej Kuzník
9e3184763c ITS#9691 Allow empty DB to host a persistent syncrepl session 2021-12-15 16:50:43 +00:00
Ondřej Kuzník
75636a407e ITS#9584 Track refreshing status explicitly
A refresh can jump across multiple threads, we cannot just lock a
mutex, we need to track who that is and clear when finished.

In addition to that, fix our internal syncrepl session tracking pulling
it closer to RFC 4533, refreshDone now represents the receipt of
refreshDone flag. Refreshing status is maintained for plain refreshes
(and times when we might be starting one but don't know for sure).

We still reschedule a new sync with a delay if there is another one
running but tracking refreshes this way paves the way to being able to
wake them up if we start tracking them somehow.
2021-12-15 01:22:38 +00:00
Ondřej Kuzník
e6347bc1b8 ITS#9729 Allow multiprovider to be set before syncrepl stanzas 2021-12-14 21:10:17 +00:00
Ondřej Kuzník
1a92f417a6 ITS#9576 Populate ca_desc for EMIT too 2021-12-14 19:22:48 +00:00
Ondřej Kuzník
b7390f1710 ITS#9596 Let others wait on the startup readiness indication 2021-12-14 16:30:54 +00:00
Ondřej Kuzník
544a7c8839 ITS#9596 Allow slapd to listen on port 0
And have it update the listening socket names as the port gets assigned.
2021-12-14 16:30:54 +00:00
Ondřej Kuzník
e96bfd088e ITS#9750 olcPasswordHash can only be made global in cn=config 2021-12-14 00:19:17 +00:00
Ondřej Kuzník
c51320a6f6 ITS#9742 Reject a refresh if we can't do a precise resync 2021-12-13 19:20:58 +00:00
Ondřej Kuzník
af2f89102e ITS#9493 Ensure we can process cn=config deletes 2021-12-13 17:01:22 +00:00
Ondřej Kuzník
4252900537 ITS#9493 Accesslog cn=config fixes 2021-12-13 17:01:22 +00:00
Ondřej Kuzník
3d908bcd89 ITS#9758 Make sure we don't end up with duplicates in entry 2021-12-10 19:13:40 +00:00
Ondřej Kuzník
da73c184b2 ITS#9758 Fix slapd-sock value add/delete 2021-12-10 19:13:40 +00:00
Ondřej Kuzník
d094cf2cb5 ITS#9759 Honour requested insert position in olcRetcodeItem 2021-12-10 16:54:54 +00:00
Ondřej Kuzník
ba37508f80 ITS#9647 Find correct sid in compare_csns() more of the time 2021-12-09 20:50:02 +00:00
Ondřej Kuzník
e8f1038de0 ITS#9647 Treat glue entries as missing
We're using MANAGE_DSAIT control so we get to see them, but they don't
really exist (except for their CSN sometimes).
2021-12-09 20:50:02 +00:00
Ondřej Kuzník
8d514517cc ITS#9647 Record delete's CSN in the glue entry 2021-12-09 20:50:02 +00:00
Ondřej Kuzník
5357c9ef7f ITS#9756 Generate a more accurate accesslog query 2021-12-09 18:04:27 +00:00
Howard Chu
453799eb97 ITS#9707 also: don't log null cookie 2021-12-09 17:51:39 +00:00
Howard Chu
bb17e23f28 ITS#9707 syncrepl: don't set lastCookie if none present 2021-12-09 17:40:35 +00:00
Ondřej Kuzník
a73ddda533 ITS#9282 Skip old accesslog entries even in delta-refresh 2021-12-08 17:15:57 +00:00
Ondřej Kuzník
8d428f3163 ITS#9282 Do not resuscitate entries we already deleted 2021-12-08 17:15:57 +00:00
Ondřej Kuzník
da610c050c ITS#9282 Short-circuit cookie comparison in non-present check 2021-12-08 17:15:57 +00:00
Howard Chu
739081f217 ITS#9753 back-mdb: Fix index updating for replace ops 2021-11-23 17:29:31 +00:00
Howard Chu
f476a06391 ITS#9752 accesslog: fix inconsistently normalized minCSN 2021-11-19 05:17:52 +00:00
Howard Chu
510c95af74 ITS#9745 more for prev commit 2021-11-16 23:37:54 +00:00
Howard Chu
a1799a6e5e ITS#9745 add config keyword for logfile format 2021-11-16 18:57:54 +00:00
Howard Chu
bc659074ee ITS#9747 dynlist: fix Compare for static groups
Fallback to static check if static groups are configured and
dynamic group check returns false.
2021-11-15 17:36:40 +00:00
Ondřej Kuzník
30baa30bce ITS#9738 Remove code deprecated by ITS#9538 2021-11-11 20:06:01 +00:00
Ondřej Kuzník
eb989be408 ITS#9733 Only use libltdl when SLAPD_MODULES is defined 2021-11-11 18:19:09 +00:00
Howard Chu
eab4ece0c2 ITS#9730 fix logging config uninit'd rc 2021-10-29 14:24:45 +01:00
Howard Chu
8dcf12f7da ITS#9715 Fix loglevel regression
Only set loglevel in server mode, not tool mode
2021-10-26 15:45:06 +00:00
Ondřej Kuzník
6ca85aa3a8 ITS#9720 Import missing minCSNs from inside DB
We might also ignore them, but if minCSN/contextCSN were not managed
properly, might as well make the effort to approach the actual value at
some point.
2021-10-21 12:10:34 +01:00
Ondřej Kuzník
8f35dc45f2 ITS#9720 Manage the purge task properly 2021-10-21 12:10:14 +01:00
Howard Chu
9b03a1ec88 ITS#9715 allow setting both debug and loglevel in cn=monitor 2021-10-18 17:49:52 +01:00
Howard Chu
d76b8cbbef ITS#9715 consolidate logging functionality into logging.c 2021-10-18 17:49:47 +01:00
Ondřej Kuzník
90fc349654 ITS#9715 Deduplicate verbmasks implementation from slapd/lloadd 2021-10-18 17:49:38 +01:00