Ondřej Kuzník
003a35c62f
SASL bind support
...
Introduces pinned operations. When SASL bind finishes, we might still
have to maintain a link between the client an an upstream for future
bind operations if we got a SASL Bind in Progress result code. We zero
out the msgids and remember a server-unique identifer on the client and
the relevant operation that lets us retrieve that link again. This
operation is reclaimed just like anything else when connections drop.
Hopefully, this should work for LDAP TXN and VC Exop support with SASL
later as well since it allows for many-to-many links to exist.
2020-11-17 17:58:14 +00:00
Ondřej Kuzník
1fd7249f8e
RFC4511 says Binds do not abandon, send a "reset" bind instead
2020-11-17 17:58:14 +00:00
Nadezhda Ivanova
8bc7650a7c
Clean ups and renames to coexist with slapd
2020-11-17 17:58:14 +00:00
Ondřej Kuzník
aecc62c08e
Introduce operation timeout machinery
2020-11-17 17:58:14 +00:00
Ondřej Kuzník
8ba44630ef
Factor out abandon message preparation
2020-11-17 17:58:14 +00:00
Ondřej Kuzník
1790018488
Record operation activity times
2020-11-17 17:58:14 +00:00
Ondřej Kuzník
abab7e46ad
Move client related functions to client.c
2020-11-17 17:58:14 +00:00
Ondřej Kuzník
b801ca17cb
Rename macros and symbols to lloadd
2020-11-17 17:58:14 +00:00
Ondřej Kuzník
7cd531c069
Improve spec conformance, logging
2020-11-17 17:58:14 +00:00
Ondřej Kuzník
0b3531066d
Refactor operation_send_reject
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
8d93e0baa0
Unify connection locking and I/O
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
5fcef01d62
Switch from a global mutex
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
96b7619afc
Do not unlock client unless we are destroying it
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
362d550328
Do not crash when closing both client and upstream
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
532fc1bf98
Shorten time operation_mutex is locked
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
e03c9e6fb4
Stop processing if we freed the client
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
f7cf34e69c
Reset connection state on abandon
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
6140cdf6f8
Handle a client connection disconnected from op
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
cda8411c48
Close up the race
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
31074213f7
TENTATIVE: communicate more for op destroy race
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
16010e5e16
More logging improvements
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
30e538e836
Realign logging levels.
...
Stats now logs all operations, stats2 additionally intermediate messages
(search entries).
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
33a993553d
Unblock the client when we can't find an upstream
...
If we can't find an upstream, we keep the client around, so it needs to
be unblocked.
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
95df8a1ec8
Adjust backend operation counting
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
545198c70d
Simplify abandon processing
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
88390159a1
On connection shutdown, free op from the correct side
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
37cff37305
Manage connection refcnt better
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
05f2ac2583
Unify logging output
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
961b600a42
Rework proxyauthz handling
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
0e7792e8f3
Borrow liblber code to get abandon processing to work
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
7eeb5bb801
Forward controls correctly in the face of proxyauth
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
c228bd1160
Be consistent with bind responses on no upstream
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
1dfeca3539
Another attempt at operation/connection destroy interaction.
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
26f721510a
Improve logging
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
cf05722b6c
Lookup operations by saved connid.
...
We reset the connection pointer on a destruction attempt, avoid the
spurious asserts.
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
37a474b508
Fix error handling wrt. its callers
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
643194e79e
Revert connection/operation mutex order.
...
There was still a race where the connection could be freed as the
operation was still being used.
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
9d66c26be5
Operation reference counting
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
837a6068e0
Rework client_read_cb along the lines of upstream
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
fba4bed6e2
connection reference counting
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
c0d254a4ce
Do not leak BerElements
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
8f5bae921e
Pending operation tracking and limiting
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
e5fcf17506
Save connection ids on operation for logging purposes
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
2e2c86664a
There might be errors before we save the operation in c_ops
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
b6b3f35aac
Fix proxyauthz handling
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
59291ba4de
Proxyauthz support
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
639c5912f5
Client authentication
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
4ad8ecd45e
Logging improvements
2020-11-17 17:55:46 +00:00
Ondřej Kuzník
f37e7757b1
Response handling, exploit optional bervals
2020-11-17 17:55:45 +00:00
Ondřej Kuzník
93fe1d2bab
Operation parsing
2020-11-17 17:42:44 +00:00