]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
4 years agodoveadm-stats: Add doveadm stats add/remove documentation
sergey.kitov [Tue, 22 Jun 2021 12:59:25 +0000 (15:59 +0300)] 
doveadm-stats: Add doveadm stats add/remove documentation

4 years agodoveadm: Add 'stats add' and 'stats remove' commands
sergey.kitov [Thu, 27 May 2021 08:46:02 +0000 (11:46 +0300)] 
doveadm: Add 'stats add' and 'stats remove' commands

4 years agostats: replace hardcoded value of default exporter_include with macro
sergey.kitov [Wed, 9 Jun 2021 14:23:28 +0000 (17:23 +0300)] 
stats: replace hardcoded value of default exporter_include with macro

4 years agodoveadm: Rewrite doveadm stats dump command to allow reuse code in other commands.
sergey.kitov [Wed, 9 Jun 2021 14:22:39 +0000 (17:22 +0300)] 
doveadm: Rewrite doveadm stats dump command to allow reuse code in other commands.

4 years agolib-master: Accept filter updates from stats by stats-client.
sergey.kitov [Mon, 10 May 2021 13:39:21 +0000 (16:39 +0300)] 
lib-master: Accept filter updates from stats by stats-client.

4 years agostats: Implement ipc interface for adding and removing metrics
sergey.kitov [Tue, 20 Apr 2021 14:07:36 +0000 (17:07 +0300)] 
stats: Implement ipc interface for adding and removing metrics

4 years agostats: Implement sending filter updates to connected processes.
sergey.kitov [Mon, 10 May 2021 13:13:12 +0000 (16:13 +0300)] 
stats: Implement sending filter updates to connected processes.

4 years agostats: Add functions for adding or removing metrics
sergey.kitov [Tue, 20 Apr 2021 14:06:58 +0000 (17:06 +0300)] 
stats: Add functions for adding or removing metrics

4 years agostats: Expose stats_metric_setting_parser_info
sergey.kitov [Tue, 13 Apr 2021 08:49:43 +0000 (11:49 +0300)] 
stats: Expose stats_metric_setting_parser_info

4 years agolib: Add function removing queries from event_filter
sergey.kitov [Tue, 20 Apr 2021 14:06:26 +0000 (17:06 +0300)] 
lib: Add function removing queries from event_filter

4 years agolib-http: test-http-client-errors - Fix random hangs
Timo Sirainen [Thu, 2 Sep 2021 11:31:36 +0000 (14:31 +0300)] 
lib-http: test-http-client-errors - Fix random hangs

Wait for subprocesses to be initialized before starting each test.
This should fix random hangs with the test.

4 years agolib-test: test_subprocess_notify_signal_*() - Add signo parameter
Timo Sirainen [Thu, 2 Sep 2021 12:39:33 +0000 (15:39 +0300)] 
lib-test: test_subprocess_notify_signal_*() - Add signo parameter

This allows using multiple notification signals.

4 years agolib-storage: Make sure header parsing is deinitialized after failures
Timo Sirainen [Thu, 19 Aug 2021 10:50:04 +0000 (12:50 +0200)] 
lib-storage: Make sure header parsing is deinitialized after failures

This should fix all the possible reasons for:
Panic: file index-mail-headers.c: line 198 (index_mail_parse_header_init): assertion failed: (!mail->data.header_parser_initialized)

4 years agolib-storage: Fix potential assert-crash if filter-stream fails
Timo Sirainen [Thu, 19 Aug 2021 10:32:45 +0000 (12:32 +0200)] 
lib-storage: Fix potential assert-crash if filter-stream fails

If filter-stream isn't read until header (because the parent istream fails),
the header parsing isn't deinitialized. If after the failure the headers are
attempted to be parsed again, there's an assert-crash. Make sure this won't
happen by finishing the filter-istream read, and if that fails then reset the
header parsing anyway.

Destroying the filter_stream may also change the parent istream offset to
change, so this commit adds an extra seek to beginning of the istream when
beginning to parse the mail headers.

Fixes:
Panic: file index-mail-headers.c: line 198 (index_mail_parse_header_init): assertion failed: (!mail->data.header_parser_initialized)

4 years agolib-storage: Split off index_mail_filter_stream_destroy()
Timo Sirainen [Thu, 19 Aug 2021 10:29:36 +0000 (12:29 +0200)] 
lib-storage: Split off index_mail_filter_stream_destroy()

4 years agoimapc: Fix crashing when copying nonexistent mails
Markus Valentin [Tue, 17 Aug 2021 12:33:56 +0000 (14:33 +0200)] 
imapc: Fix crashing when copying nonexistent mails

Check the msgmap before attempting to copy an mail which may has been
expunged already. Fixes:

Panic: file mail-storage.c: line 2385 (mailbox_transaction_commit_get_changes): assertion failed: (ret < 0 || seq_range_count(&changes_r->saved_uids) == save_count || array_count(&changes_r->saved_uids) == 0)

4 years agolib-storage: Fix assert-crash in special partial mail parsing failures
Timo Sirainen [Wed, 18 Aug 2021 12:04:53 +0000 (14:04 +0200)] 
lib-storage: Fix assert-crash in special partial mail parsing failures

This happened for example if:
 - mail_precache() started parsing mail
 - header was parsed, but mail body parsing failed due to mail size mismatch
 - vsize parsing doesn't restart header parsing, because header size is already known
 - body parsing assert-crashes because there is no messsage parser initialized

Fixes:
Panic: file index-mail.c: line 1290 (index_mail_parse_body): assertion failed: (data->parser_ctx != NULL)

4 years agolib-oauth2: Add unit test for missing exp field
Aki Tuomi [Thu, 12 Aug 2021 09:42:40 +0000 (12:42 +0300)] 
lib-oauth2: Add unit test for missing exp field

4 years agolib-oauth2: Add unit tests for valid tokens
Aki Tuomi [Thu, 12 Aug 2021 09:40:39 +0000 (12:40 +0300)] 
lib-oauth2: Add unit tests for valid tokens

4 years agolib-oauth2-jwt: Remove 'nbf < iat' check, as it's not mandated by RFC7519, and not...
s3lph [Mon, 7 Jun 2021 22:35:13 +0000 (00:35 +0200)] 
lib-oauth2-jwt: Remove 'nbf < iat' check, as it's not mandated by RFC7519, and not uncommon to predate the nbf field

4 years agolib-test: Fix race when subprocess immediately receives signal
Timo Sirainen [Tue, 24 Aug 2021 20:58:59 +0000 (22:58 +0200)] 
lib-test: Fix race when subprocess immediately receives signal

Signal could be received before test_subprocess_is_child=1 is set, causing
the subprocess's signal handler to also attempt to cleanup other
subprocesses.

This was causing http-test-client-errors unit tests to fail somewhat
randomly, especially when running them only with 1 CPU.

4 years agolib: Add test-macros
Timo Sirainen [Tue, 24 Aug 2021 12:02:44 +0000 (15:02 +0300)] 
lib: Add test-macros

4 years agolib: Rewrite POINTER_CAST_TO() to avoid new clang warning
Timo Sirainen [Mon, 23 Aug 2021 11:21:02 +0000 (14:21 +0300)] 
lib: Rewrite POINTER_CAST_TO() to avoid new clang warning

Fixes:
warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]

4 years agodbox: Remove unnecessary variable
Timo Sirainen [Mon, 23 Aug 2021 11:20:54 +0000 (14:20 +0300)] 
dbox: Remove unnecessary variable

The variable was set and updated, but never read.

4 years agolib-dcrypt: Remove unnecessary variable
Timo Sirainen [Mon, 23 Aug 2021 11:20:24 +0000 (14:20 +0300)] 
lib-dcrypt: Remove unnecessary variable

The variable was set and updated, but never read.

4 years agodoveadm-dsync: Free ssl_iostream_context on connection failure
Martti Rannanjärvi [Mon, 23 Aug 2021 08:46:46 +0000 (11:46 +0300)] 
doveadm-dsync: Free ssl_iostream_context on connection failure

4 years agolib-smtp: smtp-server-cmd-rcpt - Fix assert crash occurring for pipelined MAIL RCPT...
Stephan Bosch [Tue, 13 Apr 2021 16:25:06 +0000 (18:25 +0200)] 
lib-smtp: smtp-server-cmd-rcpt - Fix assert crash occurring for pipelined MAIL RCPT MAIL sequence.

The assertion is wrong in that it assumes that no MAIL commands can be pending
once RCPT command is next to reply. The RCPT command does not block the
pipeline, so that a subsequent MAIL command can also be pending (but will almost
never succeed).

4 years agolib-smtp: smtp-server-cmd-data - Add comment to pipeline state assertion.
Stephan Bosch [Tue, 13 Apr 2021 16:25:31 +0000 (18:25 +0200)] 
lib-smtp: smtp-server-cmd-data - Add comment to pipeline state assertion.

4 years agolib-smtp: smtp-server-cmd-data - Remove useless trans != NULL checks.
Stephan Bosch [Thu, 19 Aug 2021 23:19:28 +0000 (01:19 +0200)] 
lib-smtp: smtp-server-cmd-data - Remove useless trans != NULL checks.

4 years agodict-sql: Fail early if there's unexpected number of bind arguments for iter
Siavash Tavakoli [Thu, 19 Aug 2021 16:06:42 +0000 (17:06 +0100)] 
dict-sql: Fail early if there's unexpected number of bind arguments for iter

Otherwise, lib-sql raises a panic.

4 years agolib: istreams - Make sure freeing snapshots can't access freed parent istream memory
Timo Sirainen [Tue, 17 Aug 2021 13:23:31 +0000 (15:23 +0200)] 
lib: istreams - Make sure freeing snapshots can't access freed parent istream memory

This happened after the recent istream-header-filter snapshot changes.

4 years agoimap: Fix mailbox leak if MOVE can't open the source mailbox
Timo Sirainen [Wed, 18 Aug 2021 17:49:43 +0000 (19:49 +0200)] 
imap: Fix mailbox leak if MOVE can't open the source mailbox

Broken by 143b7c2b412ed8f155e812603fda81886bec466e

Fixes:
Panic: file mail-user.c: line 229 (mail_user_deinit): assertion failed: ((*user)->refcount == 1)

4 years agolib-lua: Don't include lua_resume_compat() for 5.1
Siavash Tavakoli [Wed, 18 Aug 2021 12:54:39 +0000 (13:54 +0100)] 
lib-lua: Don't include lua_resume_compat() for 5.1

lua_resume() is not supported in 5.1, so don't try to add a
compatibility function that fails compilation.

4 years agolib: Remove unused event_filter_add()
Timo Sirainen [Tue, 25 May 2021 16:26:14 +0000 (19:26 +0300)] 
lib: Remove unused event_filter_add()

4 years agolib: test-event-filter - Replace event_filter_add() with event_filter_parse()
Timo Sirainen [Mon, 16 Aug 2021 14:13:27 +0000 (17:13 +0300)] 
lib: test-event-filter - Replace event_filter_add() with event_filter_parse()

4 years agolib: Add comments to event-related code
Timo Sirainen [Mon, 24 May 2021 20:57:13 +0000 (23:57 +0300)] 
lib: Add comments to event-related code

4 years agolib: event_want_level() - Minor code cleanup
Timo Sirainen [Mon, 24 May 2021 19:26:27 +0000 (22:26 +0300)] 
lib: event_want_level() - Minor code cleanup

event_want_log_level() internally does both of these checks, so it's enough
to just check its return value.

4 years agolib-fs: Fix fs_stats.copy_count tracking with fs_default_copy()
Timo Sirainen [Tue, 17 Aug 2021 09:12:18 +0000 (12:12 +0300)] 
lib-fs: Fix fs_stats.copy_count tracking with fs_default_copy()

The copy_count could have been decreased too many times with async
operations.

4 years agoglobal: Add ATTR_UNSIGNED_WRAPS to fix various ubsan issues
Timo Sirainen [Mon, 16 Aug 2021 12:36:37 +0000 (15:36 +0300)] 
global: Add ATTR_UNSIGNED_WRAPS to fix various ubsan issues

4 years agoglobal: Fix various ubsan issues
Timo Sirainen [Thu, 5 Aug 2021 15:53:57 +0000 (18:53 +0300)] 
global: Fix various ubsan issues

4 years agodoveadm: Free memory for all loaded mail_plugins at deinit
Timo Sirainen [Tue, 17 Aug 2021 07:59:49 +0000 (10:59 +0300)] 
doveadm: Free memory for all loaded mail_plugins at deinit

4 years agodoveadm pw -l: Free all memory to avoid memory leak complaints
Timo Sirainen [Tue, 17 Aug 2021 07:50:34 +0000 (10:50 +0300)] 
doveadm pw -l: Free all memory to avoid memory leak complaints

4 years agodoveadm batch: Fix memory leak
Timo Sirainen [Tue, 17 Aug 2021 07:30:25 +0000 (09:30 +0200)] 
doveadm batch: Fix memory leak

4 years agodoveadm: Split off doveadm_mail_cmd_deinit()
Timo Sirainen [Tue, 17 Aug 2021 08:06:36 +0000 (11:06 +0300)] 
doveadm: Split off doveadm_mail_cmd_deinit()

4 years agodoveadm: Make doveadm_mail_cmd_free() public
Timo Sirainen [Fri, 7 May 2021 18:15:04 +0000 (21:15 +0300)] 
doveadm: Make doveadm_mail_cmd_free() public

4 years agoglobal: Use consistent lua function names
Siavash Tavakoli [Fri, 13 Aug 2021 10:08:30 +0000 (11:08 +0100)] 
global: Use consistent lua function names

Change lua-style function names to be consistent with dovecot's style.

4 years agolib-lua: test-lua: Fix the test for lua versions later than 5.3
Siavash Tavakoli [Thu, 12 Aug 2021 18:43:25 +0000 (19:43 +0100)] 
lib-lua: test-lua: Fix the test for lua versions later than 5.3

4 years agolib-lua: Add lua_resume_compat() and use it in lua versions prior to 5.4
Siavash Tavakoli [Thu, 12 Aug 2021 18:40:22 +0000 (19:40 +0100)] 
lib-lua: Add lua_resume_compat() and use it in lua versions prior to 5.4

Starting lua 5.4 "lua_resume()" expects an extra "nresults" argument. Add a
compatibility function to handle this argument in earlier versions.

4 years agoman: Document command/args destination format to sync/backup.
Felipe Gasper [Sun, 24 May 2020 18:47:18 +0000 (14:47 -0400)] 
man: Document command/args destination format to sync/backup.

4 years agolib-compression: istream-lz4 - Fix handling partial header reads
Timo Sirainen [Mon, 16 Aug 2021 11:52:50 +0000 (14:52 +0300)] 
lib-compression: istream-lz4 - Fix handling partial header reads

Reading assert-crashed if the header was read only partially. Either
because the file really was truncated or because parent stream already
had fewer bytes buffered.

4 years agolib-compression: istream-lz4 - Remove redundant check
Timo Sirainen [Mon, 16 Aug 2021 11:51:29 +0000 (14:51 +0300)] 
lib-compression: istream-lz4 - Remove redundant check

The loop is reached only if ret is 0, so there's no need to check it again.

4 years agolib-compression: istream-lz4 - Add asserts to make sure parent buffer isn't full
Timo Sirainen [Mon, 16 Aug 2021 11:50:10 +0000 (14:50 +0300)] 
lib-compression: istream-lz4 - Add asserts to make sure parent buffer isn't full

The parent buffer's max size would have to be tiny for these to happen.

4 years agodict: Use dict-init-cache
Siavash Tavakoli [Thu, 1 Jul 2021 12:52:29 +0000 (13:52 +0100)] 
dict: Use dict-init-cache

Make use of dict-init-cache for initialization and deinitialization of dicts.

4 years agodict: Add caching mechanism for initializing dicts
Siavash Tavakoli [Fri, 25 Jun 2021 13:11:52 +0000 (14:11 +0100)] 
dict: Add caching mechanism for initializing dicts

Add a pool for dict instances. Each dict is refcounted and given a grace period
of 30 seconds for deletion. If refcount drops to 0 and no new dict
operation uses the instance in that period, it will be freed. A maximum
of 10 dicts are kept in the cache.

4 years agodict: Add dict_created and dict_destroyed events
Siavash Tavakoli [Sun, 8 Aug 2021 23:35:09 +0000 (00:35 +0100)] 
dict: Add dict_created and dict_destroyed events

Inherit from dict.event and emitted at dict initialization/deinit.

4 years agolib-sasl: test-sasl-client.c - Initialize authid of sasl_empty_set
Martti Rannanjärvi [Sun, 15 Aug 2021 09:45:12 +0000 (12:45 +0300)] 
lib-sasl: test-sasl-client.c - Initialize authid of sasl_empty_set

This fixes the compiler warning:

  test-sasl-client.c:8:1: error: missing initializer for field 'authid'
  of 'const struct dsasl_client_settings'

4 years agolib-sasl: oauthbearer - Fix memory leak on auth failure
Martti Rannanjärvi [Sun, 15 Aug 2021 04:12:42 +0000 (07:12 +0300)] 
lib-sasl: oauthbearer - Fix memory leak on auth failure

4 years agolib-sasl: Add unit tests
Aki Tuomi [Wed, 11 Aug 2021 06:48:06 +0000 (09:48 +0300)] 
lib-sasl: Add unit tests

4 years agolib-sasl: Do not crash if password is NULL
Aki Tuomi [Wed, 11 Aug 2021 06:59:05 +0000 (09:59 +0300)] 
lib-sasl: Do not crash if password is NULL

4 years agolib-sasl: When setting port, parse value, not key.
Aki Tuomi [Wed, 11 Aug 2021 06:47:17 +0000 (09:47 +0300)] 
lib-sasl: When setting port, parse value, not key.

Broken in 228f1e8d583

4 years agoauth: Do not forward empty "master" passdb field
Aki Tuomi [Wed, 11 Aug 2021 05:49:44 +0000 (08:49 +0300)] 
auth: Do not forward empty "master" passdb field

4 years agologin-common: Ignore empty value for "master" passdb extra field
Aki Tuomi [Wed, 11 Aug 2021 05:48:29 +0000 (08:48 +0300)] 
login-common: Ignore empty value for "master" passdb extra field

4 years agomail-crypt: Add password confirmation for doveadm cryptokey password command
Siavash Tavakoli [Tue, 10 Aug 2021 11:26:14 +0000 (12:26 +0100)] 
mail-crypt: Add password confirmation for doveadm cryptokey password command

To prevent setting wrong passwords by accident.

4 years agomail-crypt: Fix -O argument type for doveadm cryptokey password command
Siavash Tavakoli [Tue, 10 Aug 2021 11:23:55 +0000 (12:23 +0100)] 
mail-crypt: Fix -O argument type for doveadm cryptokey password command

Should be boolean instead of string.

4 years agolib-index: Fix "Extension introduction for unknown id" errors after map is generated
Timo Sirainen [Tue, 27 Apr 2021 23:01:14 +0000 (02:01 +0300)] 
lib-index: Fix "Extension introduction for unknown id" errors after map is generated

This happens when:
 * View is opened
 * Messages are expunged
 * View is synced with NOEXPUNGES flag
 * A new extension is introduced
 * Index is rotated at least twice
 * View is again synced with NOEXPUNGES flag
 * More changes are done to index with the new extension
 * Once more view is synced with NOEXPUNGES flag

The last sync will see changes with the new extension ID, but the view's map
doesn't know its ID.

4 years agovirtual: Expunge old emails if backend box guid changed
Josef 'Jeff' Sipek [Thu, 24 Jun 2021 16:58:58 +0000 (12:58 -0400)] 
virtual: Expunge old emails if backend box guid changed

This introduces a new extensible "ext2" header to make it easier to add new
fields in the future. It also allows keeping backwards/forwards
compatibility with the old code, so the virtual index isn't rebuilt on
upgrades or downgrades.

4 years agovirtual: Don't use data stack when building extension header
Timo Sirainen [Thu, 29 Jul 2021 09:38:12 +0000 (12:38 +0300)] 
virtual: Don't use data stack when building extension header

Some users may have thousands of mailboxes, which grows the data stack
unnecessarily large.

4 years agoindexer: Fix crash if client disconnects while it's waiting for command reply
Timo Sirainen [Mon, 9 Aug 2021 10:01:12 +0000 (13:01 +0300)] 
indexer: Fix crash if client disconnects while it's waiting for command reply

This happened for example if IMAP SEARCH triggered long fts indexing and the
IMAP client disconnected while waiting for the reply.

Broken by f62a25849358e40a08a2c47f5bcaa1613a31d076

4 years agolib-smtp: smtp-server-cmd-data - Fix global state cleanup upon DATA command destroy.
Stephan Bosch [Thu, 6 May 2021 09:58:21 +0000 (11:58 +0200)] 
lib-smtp: smtp-server-cmd-data - Fix global state cleanup upon DATA command destroy.

Should cleanup global state only when it belongs to the DATA/BDAT command
currently being destroyed.

Fixes NULL-dereference in i_stream_read() found by OSS-Fuzz.

4 years agolib-smtp: test-smtp-server-errors - Perform "Bad pipelined DATA" test with actual...
Stephan Bosch [Thu, 5 Aug 2021 09:38:26 +0000 (11:38 +0200)] 
lib-smtp: test-smtp-server-errors - Perform "Bad pipelined DATA" test with actual pipelining.

4 years agoimap, pop3: Prevent reading ssl_ca setting into memory
Timo Sirainen [Tue, 3 Aug 2021 16:47:54 +0000 (19:47 +0300)] 
imap, pop3: Prevent reading ssl_ca setting into memory

Especially with imap there can be a lot of processes and a large ssl_ca
could be wasting a lot of memory. This was already the old behavior before
removing ssl_* settings from lib-storage.

4 years agoconfig: Add exclude=<name> settings to drop specific settings
Timo Sirainen [Tue, 3 Aug 2021 16:46:59 +0000 (19:46 +0300)] 
config: Add exclude=<name> settings to drop specific settings

4 years agolib-storage: Remove SSL settings from mail_storage_settings
Timo Sirainen [Thu, 29 Jul 2021 15:04:53 +0000 (18:04 +0300)] 
lib-storage: Remove SSL settings from mail_storage_settings

They can be accessed via master_service_ssl_settings instead.

4 years agolib-storage: mail_user_init_ssl_client_settings() - Use master_service_ssl_settings
Timo Sirainen [Thu, 29 Jul 2021 15:02:57 +0000 (18:02 +0300)] 
lib-storage: mail_user_init_ssl_client_settings() - Use master_service_ssl_settings

This will allow dropping the duplicate SSL settings handling.

4 years agodsync: Get SSL settings via master_service_ssl_settings
Timo Sirainen [Thu, 29 Jul 2021 14:45:16 +0000 (17:45 +0300)] 
dsync: Get SSL settings via master_service_ssl_settings

4 years agolib-storage: Add mail_storage_service_user_get_ssl_settings()
Timo Sirainen [Thu, 29 Jul 2021 14:44:43 +0000 (17:44 +0300)] 
lib-storage: Add mail_storage_service_user_get_ssl_settings()

4 years agolib-master: Add master_service_ssl_settings_get_from_parser()
Timo Sirainen [Thu, 29 Jul 2021 14:44:25 +0000 (17:44 +0300)] 
lib-master: Add master_service_ssl_settings_get_from_parser()

4 years agoglobal: Don't zero SSL settings unnecessarily
Timo Sirainen [Thu, 29 Jul 2021 14:57:42 +0000 (17:57 +0300)] 
global: Don't zero SSL settings unnecessarily

mail_user_init_ssl_client_settings() and mail_user_init_fs_settings()
will clear them again anyway.

4 years agolib-storage: mail_user_init_fs_settings() - Clarify that ssl settings are fully initi...
Timo Sirainen [Thu, 29 Jul 2021 14:58:23 +0000 (17:58 +0300)] 
lib-storage: mail_user_init_fs_settings() - Clarify that ssl settings are fully initialized

4 years agolib-storage: mail_user_init_ssl_client_settings() - Clarify that ssl settings are...
Timo Sirainen [Thu, 29 Jul 2021 14:57:12 +0000 (17:57 +0300)] 
lib-storage: mail_user_init_ssl_client_settings() - Clarify that ssl settings are fully initialized

4 years agodoveadm: Free SSL iostream contexts at deinit
Timo Sirainen [Thu, 29 Jul 2021 12:31:56 +0000 (15:31 +0300)] 
doveadm: Free SSL iostream contexts at deinit

This wasn't really a memory leak, because the contexts are always kept
allocated until deinit anyway.

4 years agolib-ssl-iostream: ssl_iostream_context_unref(NULL) is a no-op
Timo Sirainen [Thu, 29 Jul 2021 13:06:50 +0000 (16:06 +0300)] 
lib-ssl-iostream: ssl_iostream_context_unref(NULL) is a no-op

4 years agoman: doveadm-pw - Fix default scheme to be CRYPT / $2y$ bcrypt
Timo Sirainen [Sat, 7 Aug 2021 16:52:09 +0000 (18:52 +0200)] 
man: doveadm-pw - Fix default scheme to be CRYPT / $2y$ bcrypt

4 years agolib-index: Remove mail_index_transaction_get_highest_modseq()
Timo Sirainen [Thu, 22 Jul 2021 12:31:11 +0000 (15:31 +0300)] 
lib-index: Remove mail_index_transaction_get_highest_modseq()

This isn't actually used anywhere, so there's no need to keep it.

4 years agolib-index: mail_index_transaction_get_highest_modseq() - Fix handling MAIL_INDEX_MAIL...
Timo Sirainen [Thu, 22 Jul 2021 12:28:39 +0000 (15:28 +0300)] 
lib-index: mail_index_transaction_get_highest_modseq() - Fix handling MAIL_INDEX_MAIL_FLAG_UPDATE_MODSEQ

MAIL_INDEX_MAIL_FLAG_UPDATE_MODSEQ flag updates didn't calculate the
returned modseq correctly. This function wasn't used outside
--with-devel-checks though, but with it this fixes:

Panic: file mail-index-transaction.c: line 212 (mail_index_transaction_commit_real): assertion failed: (t->reset || expected_highest_modseq == log->head->sync_highest_modseq)

4 years agolib-index: Avoid modseq warnings --with-devel-checks
Timo Sirainen [Thu, 22 Jul 2021 11:24:11 +0000 (14:24 +0300)] 
lib-index: Avoid modseq warnings --with-devel-checks

Avoids warnings:
Requested highest-modseq for transaction, but modseq tracking isn't enabled for the file (this shouldn't happen)

4 years agodirector: Avoid calling timeval_diff_msecs() with too great time difference
Timo Sirainen [Thu, 22 Jul 2021 11:29:24 +0000 (14:29 +0300)] 
director: Avoid calling timeval_diff_msecs() with too great time difference

Fixes assert-crash --with-devel-checks:
Panic: file time-util.c: line 76 (timeval_diff_msecs): assertion failed: (diff <= INT_MAX)

4 years agolib: data-stack - Initialize alloc_count / alloc_bytes
Aki Tuomi [Wed, 14 Jul 2021 07:00:28 +0000 (10:00 +0300)] 
lib: data-stack - Initialize alloc_count / alloc_bytes

This has only effect with devel checks enabled. Fixes counter
values to show sensible data.

4 years agolib: data-stack - Allow errno changes when sending event
Aki Tuomi [Tue, 13 Jul 2021 10:41:14 +0000 (13:41 +0300)] 
lib: data-stack - Allow errno changes when sending event

4 years agolib-master, global: Remove unnecessary MASTER_SERVICE_FLAG_USE_SSL_SETTINGS
Timo Sirainen [Thu, 29 Jul 2021 19:21:52 +0000 (22:21 +0300)] 
lib-master, global: Remove unnecessary MASTER_SERVICE_FLAG_USE_SSL_SETTINGS

SSL client settings are now always read.

4 years agolib-master: Use ssl-server settings only when necessary
Timo Sirainen [Thu, 29 Jul 2021 19:20:17 +0000 (22:20 +0300)] 
lib-master: Use ssl-server settings only when necessary

4 years agolib-master: Remove unused master_service_is_ssl_module_loaded()
Timo Sirainen [Thu, 29 Jul 2021 19:18:56 +0000 (22:18 +0300)] 
lib-master: Remove unused master_service_is_ssl_module_loaded()

4 years agolib-master, login-common: Split off master_service_ssl_server_settings
Timo Sirainen [Thu, 29 Jul 2021 18:45:18 +0000 (21:45 +0300)] 
lib-master, login-common: Split off master_service_ssl_server_settings

4 years agolib-master, global: Split master_service_ssl_settings_to_iostream_set() to client...
Timo Sirainen [Thu, 29 Jul 2021 18:43:03 +0000 (21:43 +0300)] 
lib-master, global: Split master_service_ssl_settings_to_iostream_set() to client/server functions

4 years agomaster: Avoid creating prefork timeout if process_limit is already reached
Timo Sirainen [Thu, 5 Aug 2021 14:48:42 +0000 (17:48 +0300)] 
master: Avoid creating prefork timeout if process_limit is already reached

4 years agomaster: Avoid high CPU usage when process_min_avail reaches process_limit
Timo Sirainen [Thu, 5 Aug 2021 14:53:58 +0000 (17:53 +0300)] 
master: Avoid high CPU usage when process_min_avail reaches process_limit

process_min_avail handling always created a 0ms timeout to try to create the
missing processes. This timeout was supposed to stop when it couldn't launch
all the wanted processes, but the check wasn't done right. This ended up
causing the timeout to be called rapidly over and over again.

4 years agolazy_expunge: Add lazy_expunge_exclude setting
Michael M Slusarz [Thu, 22 Jul 2021 20:51:05 +0000 (14:51 -0600)] 
lazy_expunge: Add lazy_expunge_exclude setting

This allows mailboxes to be excluded via configuration.

4 years agofts: Use mailbox-match-plugin API for fts_autoindex_exclude
Timo Sirainen [Tue, 3 Aug 2021 14:38:33 +0000 (17:38 +0300)] 
fts: Use mailbox-match-plugin API for fts_autoindex_exclude

This doesn't change the functionality, just deduplicates the code.

4 years agofts: Always initialize struct fts_user
Timo Sirainen [Wed, 4 Aug 2021 12:50:54 +0000 (15:50 +0300)] 
fts: Always initialize struct fts_user

Initializing lib-fts is still optional within it.

4 years agolib-storage: Add mailbox exclusion plugin API
Michael M Slusarz [Thu, 22 Jul 2021 20:20:25 +0000 (14:20 -0600)] 
lib-storage: Add mailbox exclusion plugin API

Allows mailbox exclusion configuration to be easily added to any
plugin.