]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Stephan Bosch [Mon, 31 Aug 2020 12:37:35 +0000 (14:37 +0200)]
lib-smtp: Reformat smtp-server-connection.c.
Stephan Bosch [Mon, 31 Aug 2020 12:21:41 +0000 (14:21 +0200)]
lib-smtp: Reformat smtp-server-command.c.
Stephan Bosch [Mon, 31 Aug 2020 12:16:31 +0000 (14:16 +0200)]
lib-smtp: Reformat smtp-server-cmd-mail.c.
Stephan Bosch [Mon, 31 Aug 2020 12:13:31 +0000 (14:13 +0200)]
lib-smtp: Reformat smtp-server-cmd-rcpt.c.
Aki Tuomi [Mon, 7 Sep 2020 07:56:34 +0000 (10:56 +0300)]
lib-dict: dict_transaction_commit_async() - Never call callback immediately
This could cause confusion for the callers. Although so far all the callers
have handled it fine.
Use this wrappers for all dict drivers, even if they support async commits
themselves. This is because many of them were still calling the callback
immediately on error handling.
Timo Sirainen [Thu, 10 Sep 2020 07:16:56 +0000 (10:16 +0300)]
lib: istream-try - Fix off-by-one check for min_buffer_full_size
This mainly fixes random failures with the unit test.
Timo Sirainen [Thu, 10 Sep 2020 07:16:35 +0000 (10:16 +0300)]
lib: test-istream-try - Fix test name
Timo Sirainen [Tue, 8 Sep 2020 14:32:32 +0000 (17:32 +0300)]
lib: istream-try - Fix detecting istream when its input buffer is full
The previous check didn't work when the stream's buffer_size was 0,
which happened with istream-concat parent.
Added also a unit test that tries to test for these kind of situations.
It doesn't actually reproduce this specific bug, but it tests that the
code paths works at least in the generic situation.
Timo Sirainen [Tue, 8 Sep 2020 17:14:09 +0000 (20:14 +0300)]
lib-compression: Add COMPRESSION_HDR_MAX_SIZE macro
Will be used by the next commit.
Markus Valentin [Wed, 8 Jul 2020 08:18:27 +0000 (10:18 +0200)]
quota: Add logging prefix once and remove it from loglines
Markus Valentin [Tue, 7 Jul 2020 12:39:22 +0000 (14:39 +0200)]
quota: Introduce per quota-backend events
Timo Sirainen [Thu, 31 Oct 2019 17:27:15 +0000 (19:27 +0200)]
quota: Use event based logging
Aki Tuomi [Tue, 25 Aug 2020 11:01:24 +0000 (14:01 +0300)]
quota: Add event support
Timo Sirainen [Mon, 31 Aug 2020 15:30:18 +0000 (18:30 +0300)]
lib-index: Fix cache being purged too often when it had unaccessed fields
Cache was being purged when it had a field that was last accessed
after mail_cache_unaccessed_field_drop but before
2*mail_cache_unaccessed_field_drop. This purging may not have even
done anything.
Use shared code now between the check in mail_cache_header_fields_read()
and the actual purging in mail_cache_purge_check_field(). This way they
can't become desynced again.
Timo Sirainen [Mon, 31 Aug 2020 14:27:58 +0000 (17:27 +0300)]
lib-index: Use delayed purge reason for mail_cache_purge_* events
Timo Sirainen [Mon, 31 Aug 2020 14:25:54 +0000 (17:25 +0300)]
lib-index: Remember reason for delayed cache file purges
Timo Sirainen [Mon, 31 Aug 2020 14:23:05 +0000 (17:23 +0300)]
lib-index: Fix file_size field in mail_cache_purge_finished event
It used to be 32 always.
Timo Sirainen [Wed, 26 Aug 2020 15:39:22 +0000 (18:39 +0300)]
lib-index: Fix deadlock when expunging mails and adding lots of data to cache
This practically happened only when dovecot.index.cache contents were lost
and they were being re-filled while mails were also being expunged.
Broken by
9efb99924d0b7de27ca83e373f2290f3dd5b22cf
Timo Sirainen [Fri, 28 Aug 2020 14:16:03 +0000 (17:16 +0300)]
zlib: Rename istreams from zlib(parent) to compress(parent)
This clarifies it that the istream is a generic compression stream, not
specifically zlib/gz.
Timo Sirainen [Fri, 28 Aug 2020 14:13:32 +0000 (17:13 +0300)]
lib-compression: ostreams - Add asserts to clarify how buffer flushing works
If the output buffer isn't fully sent, the flush function returns 0 early
on, before setting flushed=TRUE.
Timo Sirainen [Fri, 28 Aug 2020 13:57:57 +0000 (16:57 +0300)]
auth: Fix leaking memory if auth client disconnects with pending penalty delays
* auth penalty lookup returns that auth_request needs a penalty delay
* during the penalty timeout auth client disconnects
* auth requests are freed, but auth_request_handler isn't unreferenced
This resulted in memory leak, and after recent changes also logging warnings
about event leaks.
Timo Sirainen [Thu, 27 Aug 2020 15:35:33 +0000 (18:35 +0300)]
lib-auth: Remove duplicate auth_client_connection.event
It's already in auth_client_connection.conn.event. Just use it directly
to avoid any confusion between them.
Timo Sirainen [Thu, 27 Aug 2020 14:28:38 +0000 (17:28 +0300)]
auth: Fix compiling gssapi, bsdauth, sia, vpopmail
Broken by
5ff7299c9d85b1bab0c7d53d9459dbb31a2bd9d6
Stephan Bosch [Wed, 19 Aug 2020 22:24:52 +0000 (00:24 +0200)]
lib-http: test-http-client-errors - Add tests involving idle connections.
Tests idle timeout and connection reuse.
Stephan Bosch [Wed, 19 Aug 2020 22:17:49 +0000 (00:17 +0200)]
lib-http: http-client-connection - Use http_client_connection_is_active() to check idle status.
This makes the check shorter and easier to understand.
Stephan Bosch [Wed, 12 Aug 2020 20:30:35 +0000 (22:30 +0200)]
lib-http: http-client-queue - Fix unsigned int arithmetic problem in http_client_queue_request_timeout_cmp().
Stephan Bosch [Thu, 13 Aug 2020 17:31:30 +0000 (19:31 +0200)]
lib-http: http-client-connection - Use timeout_add_short_to() for idle timeout.
The idle timeout can be very short.
Stephan Bosch [Wed, 12 Aug 2020 19:33:08 +0000 (21:33 +0200)]
lib-http: http-client-connection - Make idle timeout calculation more robust.
Stephan Bosch [Wed, 12 Aug 2020 20:24:22 +0000 (22:24 +0200)]
lib-http: http-client-connection - Explicitly handle an infinite connection limit for setting idle timeout.
This can just use the maximum idle timeout directly.
Stephan Bosch [Wed, 12 Aug 2020 20:20:26 +0000 (22:20 +0200)]
lib-http: http-client-connection - Deal with first idle connection separately for setting idle timeout.
This can just use the maximum idle timeout directly.
Stephan Bosch [Wed, 12 Aug 2020 19:17:08 +0000 (21:17 +0200)]
lib-http: http-client-connection - Improve overall logic in http_client_connection_start_idle_timeout().
Make clear that idle_count < max when it is used.
Stephan Bosch [Wed, 12 Aug 2020 16:00:45 +0000 (18:00 +0200)]
lib-http: http-client-connection - Start idle state in a common function.
Removes code duplication.
Stephan Bosch [Wed, 12 Aug 2020 18:35:46 +0000 (20:35 +0200)]
lib-http: http-client-connection - Handle infinite idle timeout consistently.
Stephan Bosch [Wed, 12 Aug 2020 18:11:01 +0000 (20:11 +0200)]
lib-http: http-client-connection - Start idle timeout in a common function.
Stephan Bosch [Wed, 12 Aug 2020 17:54:50 +0000 (19:54 +0200)]
lib-http: http-client-connection - Use separate flag for idle status.
It used the presence of the idle timeout before, which isn't acceptable when the
timeout is changed to be optional (happens in later commit).
Stephan Bosch [Wed, 12 Aug 2020 15:16:12 +0000 (17:16 +0200)]
lib-http: http-client-connection - Determine idle timeout consistently.
It should not matter whether connection got idle due to lost peer or otherwise.
Stephan Bosch [Wed, 12 Aug 2020 15:10:20 +0000 (17:10 +0200)]
lib-http: http-client-connection - Restructure http_client_connection_check_idle().
Stephan Bosch [Wed, 12 Aug 2020 15:06:23 +0000 (17:06 +0200)]
lib-http: http-client-connection - Restructure http_client_connection_lost_peer().
Stephan Bosch [Wed, 12 Aug 2020 19:47:39 +0000 (21:47 +0200)]
lib-http: http-client-peer - Properly saturate result of http_client_peer_shared_max_connections() at UINT_MAX.
Stephan Bosch [Wed, 12 Aug 2020 16:27:48 +0000 (18:27 +0200)]
lib-http: Reformat http-client-connection.c.
Stephan Bosch [Tue, 20 Mar 2018 19:59:07 +0000 (20:59 +0100)]
lib-http: Reformat http-client-private.h.
Stephan Bosch [Tue, 20 Mar 2018 19:59:21 +0000 (20:59 +0100)]
lib-http: Reformat http-client-queue.c.
Stephan Bosch [Tue, 20 Mar 2018 19:58:56 +0000 (20:58 +0100)]
lib-http: Reformat http-client-peer.c.
Aki Tuomi [Mon, 10 Aug 2020 11:43:11 +0000 (14:43 +0300)]
lib-auth: Do not send ssl details to auth process
They are not used for anything. But we still provide them
as auth_client event fields, so that we can e.g. do metrics
on which TLS protocol is used.
Aki Tuomi [Mon, 10 Aug 2020 07:56:14 +0000 (10:56 +0300)]
lib-auth: Add user_mask to auth_userdb_list events
Aki Tuomi [Mon, 10 Aug 2020 07:23:19 +0000 (10:23 +0300)]
lib-auth: Add new fields to auth_client_userdb events
Aki Tuomi [Mon, 10 Aug 2020 06:29:10 +0000 (09:29 +0300)]
doveadm: doveadm-auth - Add support for real_{remote|local}_{ip|port} -x parameters
Aki Tuomi [Mon, 10 Aug 2020 06:11:41 +0000 (09:11 +0300)]
doveadm: doveadm-auth - Add session and local_name -x parameters
Aki Tuomi [Mon, 10 Aug 2020 06:10:08 +0000 (09:10 +0300)]
lib-auth: Add session_id and local_name to master auth
Aki Tuomi [Thu, 6 Aug 2020 07:52:18 +0000 (10:52 +0300)]
lmtp: Rename orig_user event field to original_user
Aki Tuomi [Mon, 27 Jul 2020 06:11:47 +0000 (09:11 +0300)]
lib-auth: Add more fields to auth client event
This way it becomes more useful
Aki Tuomi [Mon, 27 Jul 2020 09:26:49 +0000 (12:26 +0300)]
lib-auth: Always iterate input arguments
Makes next change easier
Aki Tuomi [Mon, 27 Jul 2020 05:48:49 +0000 (08:48 +0300)]
lib-auth: Send event after setting all fields
Timo Sirainen [Thu, 6 Aug 2020 16:38:33 +0000 (19:38 +0300)]
man: doveadm-auth - List more -x fields
Timo Sirainen [Thu, 6 Aug 2020 11:13:29 +0000 (14:13 +0300)]
auth: Add some unit testing for auth_request_import/export()
Timo Sirainen [Thu, 6 Aug 2020 11:10:50 +0000 (14:10 +0300)]
auth: Escape exported session ID string in protocol replies
Session ID is normally coming only from trusted sources, so the lack of
escaping shouldn't have mattered too much.
Timo Sirainen [Wed, 5 Aug 2020 19:48:40 +0000 (22:48 +0300)]
auth: Worker commands: Rename "id" event field to "command_id"
Now that auth_request events are inherited from worker command events, the
"id" field was also inherited. This is rather confusing and might conflict
with other IDs in the future, so better to rename it already.
Timo Sirainen [Wed, 5 Aug 2020 19:45:30 +0000 (22:45 +0300)]
auth: Support inheritance for master auth_requests' events
Requests created by auth worker will inherit from the command's event, while
other events inherit from the global auth_event for now (since
auth-master-connection doesn't have its own event yet).
Timo Sirainen [Wed, 5 Aug 2020 19:43:55 +0000 (22:43 +0300)]
auth: Inherit auth client connection event from the global auth_event
Timo Sirainen [Thu, 25 Jun 2020 17:03:57 +0000 (20:03 +0300)]
doveadm auth: Support forward and extra fields with -x parameter
Using "forward_" prefix assumes that it's a forwarded field. Otherwise
all unknown parameters are assumed to be extra fields.
Timo Sirainen [Wed, 5 Aug 2020 19:25:12 +0000 (22:25 +0300)]
lib-auth: auth-client - Support sending extra_fields.
Stephan Bosch [Thu, 28 May 2020 21:10:41 +0000 (23:10 +0200)]
lib-auth: auth-master - Support sending extra_fields.
Timo Sirainen [Tue, 4 Aug 2020 14:35:30 +0000 (17:35 +0300)]
auth: Add more event fields
Timo Sirainen [Tue, 4 Aug 2020 14:34:42 +0000 (17:34 +0300)]
auth: Set event fields immediately when they're changed in auth_request_fields
This way the fields are available for all auth events, not just the final
events.
Timo Sirainen [Thu, 6 Aug 2020 09:29:07 +0000 (12:29 +0300)]
auth: Remove "username" and "domain" event fields
They're not very useful in event fields, since event filtering can just do
user=username@* or user=*@domain.
Timo Sirainen [Tue, 4 Aug 2020 14:30:02 +0000 (17:30 +0300)]
auth: Remove "credentials_scheme" event field
This field wasn't set for plaintext authentication, and in general it's not
quite what it was intended to be. Better to remove it entirely to avoid
confusion.
Timo Sirainen [Tue, 4 Aug 2020 14:29:32 +0000 (17:29 +0300)]
auth: Rename auth_request.credentials_scheme to wanted_credentials_scheme
Also add comments explaining what it actually does.
Timo Sirainen [Tue, 4 Aug 2020 13:46:15 +0000 (16:46 +0300)]
auth: Rename "orig_user" event field to "original_user"
It's a bit more understandable to use the full name. There's now also
%{original_user} variable alias.
Timo Sirainen [Tue, 4 Aug 2020 13:30:59 +0000 (16:30 +0300)]
auth: Rename "mech" event field to "mechanism"
It's a bit more understandable to use the full name. There's now also
%{mechanism} variable alias.
Timo Sirainen [Mon, 3 Aug 2020 15:51:33 +0000 (18:51 +0300)]
auth: Keep auth_request_fields const for most of the code
This way there's a compiler warning/error if anything outside
auth-request-fields.c attempts to modify them. It makes it easier to
keep the values synced with events.
Timo Sirainen [Tue, 4 Aug 2020 13:16:18 +0000 (16:16 +0300)]
auth: test-mech - Fix include ordering
Required by the following change.
Timo Sirainen [Tue, 4 Aug 2020 11:48:23 +0000 (14:48 +0300)]
auth: Add and use auth_request_set_delayed_credentials()
Timo Sirainen [Tue, 4 Aug 2020 11:44:00 +0000 (14:44 +0300)]
auth: Add and use auth_request_set_login_username_forced()
Timo Sirainen [Tue, 4 Aug 2020 11:28:28 +0000 (14:28 +0300)]
auth: LIST - Use auth_request_import() to set missing "service"
Timo Sirainen [Tue, 4 Aug 2020 11:26:08 +0000 (14:26 +0300)]
auth: Use auth_request_init_userdb_reply() always for initializing userdb_reply
Timo Sirainen [Tue, 4 Aug 2020 11:23:18 +0000 (14:23 +0300)]
auth: auth_request_init_userdb_reply() - Add add_default_fields parameter
Timo Sirainen [Tue, 4 Aug 2020 11:22:16 +0000 (14:22 +0300)]
auth: Move auth_request_init_userdb_reply() to auth-request-fields.c
Timo Sirainen [Tue, 4 Aug 2020 09:42:22 +0000 (12:42 +0300)]
auth: Add and use auth_request_set_password_verified()
Timo Sirainen [Tue, 4 Aug 2020 09:32:27 +0000 (12:32 +0300)]
auth: Add and use auth_request_set_auth_successful()
Timo Sirainen [Mon, 3 Aug 2020 14:32:34 +0000 (17:32 +0300)]
auth: Add and use auth_request_set_realm()
Timo Sirainen [Mon, 3 Aug 2020 14:25:59 +0000 (17:25 +0300)]
auth: Add and use auth_request_set_username_forced()
Timo Sirainen [Tue, 4 Aug 2020 11:41:42 +0000 (14:41 +0300)]
auth: Change auth_request_fix_username() to return int
Timo Sirainen [Tue, 4 Aug 2020 11:35:49 +0000 (14:35 +0300)]
auth: Optimize memory usage when auth_username_format is set
The per-request memory pool was used unnecessarily to allocate the username
before the formatting was applied.
Timo Sirainen [Mon, 3 Aug 2020 14:16:12 +0000 (17:16 +0300)]
auth: Move auth_request_fields initialization code to auth_request_fields_init()
Timo Sirainen [Mon, 3 Aug 2020 14:11:14 +0000 (17:11 +0300)]
auth: Move auth_request_master_lookup_finish() to auth-request-fields.c
Also rename it to auth_request_master_user_login_finish().
Timo Sirainen [Mon, 3 Aug 2020 14:07:22 +0000 (17:07 +0300)]
auth: Move username changing functions to auth-request-fields.c
Timo Sirainen [Mon, 3 Aug 2020 14:06:23 +0000 (17:06 +0300)]
auth: Change auth_request_get_log_prefix_db() to be public
Timo Sirainen [Mon, 3 Aug 2020 13:49:00 +0000 (16:49 +0300)]
auth: test-lua - Use auth_request_set_username()
Instead of changing the user directly.
Timo Sirainen [Mon, 3 Aug 2020 13:43:56 +0000 (16:43 +0300)]
auth: test-lua - Deduplicate code into test_db_lua_auth_request_new()
Timo Sirainen [Mon, 3 Aug 2020 13:28:57 +0000 (16:28 +0300)]
auth: auth_request_fix_username() - Don't temporarily modify auth_request_fields.user
Use the new username parameter in auth_request_get_var_expand_table_full()
instead.
Timo Sirainen [Mon, 3 Aug 2020 13:26:11 +0000 (16:26 +0300)]
auth: auth_cache_insert() - Don't temporarily modify auth_request_fields.user
Use the new username parameter in auth_request_get_var_expand_table_full()
instead.
Timo Sirainen [Mon, 3 Aug 2020 13:18:00 +0000 (16:18 +0300)]
auth: auth_request_get_var_expand_table_full() - Add username parameter
Timo Sirainen [Tue, 4 Aug 2020 13:45:19 +0000 (16:45 +0300)]
auth: Add %{original_*} aliases for %{orig_*}
Timo Sirainen [Tue, 4 Aug 2020 13:19:29 +0000 (16:19 +0300)]
auth: Add %{mechanism} alias for %{mech}
Timo Sirainen [Mon, 27 Apr 2020 13:43:39 +0000 (16:43 +0300)]
auth: Add %{[real_]local/remote_ip/port} aliases for %{[real_]lip/rip/lport/rport)
Timo Sirainen [Mon, 3 Aug 2020 12:10:35 +0000 (15:10 +0300)]
auth: Move auth_request_export/import*() to auth-request-fields.c
Timo Sirainen [Mon, 3 Aug 2020 11:56:12 +0000 (14:56 +0300)]
auth: Move imported/exported fields to struct auth_request_fields
This makes it clearer what fields are being passed between auth master and
worker processes.
Timo Sirainen [Mon, 3 Aug 2020 11:31:30 +0000 (14:31 +0300)]
auth: Remove auth_request->debug
Use event_want_debug(auth_request->event) instead.
Timo Sirainen [Mon, 3 Aug 2020 11:29:55 +0000 (14:29 +0300)]
auth: Remove unnecessary auth_request->debug checks
e_debug() already checks whether debug logging is enabled.
Timo Sirainen [Sun, 26 Apr 2020 17:15:39 +0000 (20:15 +0300)]
lib: events - Use const event pointer for "get" functions