]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
2 years agoacl: mailbox list iteration - Add data stack frames for autocreated mailbox handling
Timo Sirainen [Tue, 27 Dec 2022 10:06:28 +0000 (05:06 -0500)] 
acl: mailbox list iteration - Add data stack frames for autocreated mailbox handling

A large number of autocreated mailboxes could have unnecessarily grown data
stack.

2 years agolmtp: Deliver each local mail in its own data stack frame
Timo Sirainen [Tue, 27 Dec 2022 16:25:01 +0000 (18:25 +0200)] 
lmtp: Deliver each local mail in its own data stack frame

2 years agoauth: Flush failed auth requests in their own data stack frames
Timo Sirainen [Tue, 27 Dec 2022 16:05:22 +0000 (11:05 -0500)] 
auth: Flush failed auth requests in their own data stack frames

2 years agodsync: Add data stack frame when importing mails
Timo Sirainen [Tue, 27 Dec 2022 15:49:39 +0000 (10:49 -0500)] 
dsync: Add data stack frame when importing mails

2 years agodoveadm: Run command vfuncs in their own data stack frames
Timo Sirainen [Tue, 27 Dec 2022 11:17:51 +0000 (06:17 -0500)] 
doveadm: Run command vfuncs in their own data stack frames

This slightly reduces memory usage by doveadm commands.

2 years agodoveadm: Don't use data stack for permanent memory allocations in init()
Timo Sirainen [Tue, 27 Dec 2022 11:15:38 +0000 (06:15 -0500)] 
doveadm: Don't use data stack for permanent memory allocations in init()

Until now this didn't really matter, since callers weren't freeing the data
stack memory anyway. The following commit changes this though.

2 years agoimapc: Add data stack frame when parsing untagged fetches during sync
Timo Sirainen [Wed, 11 Jan 2023 22:01:52 +0000 (00:01 +0200)] 
imapc: Add data stack frame when parsing untagged fetches during sync

2 years agoimapc: Add data stack frame when parsing message headers
Timo Sirainen [Tue, 27 Dec 2022 10:12:48 +0000 (05:12 -0500)] 
imapc: Add data stack frame when parsing message headers

This makes sure the data stack memory usage won't grow too much while
parsing a large number of headers.

2 years agosdbox: Add data stack frame when syncing each file
Timo Sirainen [Tue, 27 Dec 2022 10:10:35 +0000 (05:10 -0500)] 
sdbox: Add data stack frame when syncing each file

This could have caused extra memory usage when altmoving lots of mails.

2 years agosdbox: saving - Add data stack frame when assigning UIDs for mails
Timo Sirainen [Tue, 27 Dec 2022 10:08:43 +0000 (05:08 -0500)] 
sdbox: saving - Add data stack frame when assigning UIDs for mails

Since each saved mail was already using memory, this wasn't causing much
extra memory usage.

2 years agolib-storage: Mailbox index list rebuild - Add mailboxes in separate data stack frames
Timo Sirainen [Tue, 27 Dec 2022 21:29:54 +0000 (16:29 -0500)] 
lib-storage: Mailbox index list rebuild - Add mailboxes in separate data stack frames

2 years agolib-storage: Autoexpunge each mailbox in its own data stack frame
Timo Sirainen [Tue, 27 Dec 2022 16:24:34 +0000 (18:24 +0200)] 
lib-storage: Autoexpunge each mailbox in its own data stack frame

2 years agolib-storage: mail_search_args_simplify() - Add data stack frame
Timo Sirainen [Tue, 27 Dec 2022 14:59:16 +0000 (09:59 -0500)] 
lib-storage: mail_search_args_simplify() - Add data stack frame

2 years agolib-storage: index_mail_get_raw_headers() - Don't use data stack for allocations
Timo Sirainen [Tue, 27 Dec 2022 11:28:14 +0000 (13:28 +0200)] 
lib-storage: index_mail_get_raw_headers() - Don't use data stack for allocations

For some reason this was changed to data stack allocation in
53712af0e7f357e7279d9ff03831428aae85aa45. It looks accidental, since the
change wasn't described in the commit message. This didn't actually cause
any problems, since the callers duplicated the allocations from data_pool.

2 years agolib-storage: mail_event_create() - Free data stack allocations before returning
Timo Sirainen [Tue, 27 Dec 2022 11:21:30 +0000 (06:21 -0500)] 
lib-storage: mail_event_create() - Free data stack allocations before returning

2 years agolib-storage: mail_expunge() - Move sending event inside data stack frame
Timo Sirainen [Tue, 27 Dec 2022 11:20:48 +0000 (06:20 -0500)] 
lib-storage: mail_expunge() - Move sending event inside data stack frame

Each call was using a bit more data stack due to this.

2 years agolib-storage: Add data stack frames when searching messages
Timo Sirainen [Tue, 27 Dec 2022 10:13:26 +0000 (05:13 -0500)] 
lib-storage: Add data stack frames when searching messages

This makes sure memory usage doesn't increase too much while searching a
large number of messages. A few of these data stack frames are likely
unnecessary, but it's better to be safe.

2 years agolib-storage: Add missing data stack frames to public API functions
Timo Sirainen [Tue, 27 Dec 2022 10:56:18 +0000 (05:56 -0500)] 
lib-storage: Add missing data stack frames to public API functions

2 years agolib-index: mail_index_update_keywords() - Add missing data stack frame
Timo Sirainen [Tue, 27 Dec 2022 17:03:26 +0000 (12:03 -0500)] 
lib-index: mail_index_update_keywords() - Add missing data stack frame

2 years agolib-index, global: mail_cache_register_get_list() - Allocate results from a new pool
Timo Sirainen [Tue, 27 Dec 2022 13:35:23 +0000 (08:35 -0500)] 
lib-index, global: mail_cache_register_get_list() - Allocate results from a new pool

The memory allocations can get large enough that it causes data stack to be
grown.

2 years agolib-index: mail_cache_purge_later() - Change reason string to format string
Timo Sirainen [Tue, 27 Dec 2022 12:03:04 +0000 (14:03 +0200)] 
lib-index: mail_cache_purge_later() - Change reason string to format string

This way callers don't have to allocate the string from data stack, which
also simplifies reducing data stack usage in
mail_cache_header_fields_read().

2 years agolib-index: Add data stack frames
Timo Sirainen [Tue, 27 Dec 2022 10:55:02 +0000 (05:55 -0500)] 
lib-index: Add data stack frames

These functions are using data stack a bit unexpectedly. May help a bit
with memory usage, but likely not much.

2 years agolib-ssl-iostream: Don't duplicate strings passed to BIO_new_mem_buf()
Timo Sirainen [Tue, 27 Dec 2022 16:30:17 +0000 (11:30 -0500)] 
lib-ssl-iostream: Don't duplicate strings passed to BIO_new_mem_buf()

It was originally done because BIO_new_mem_buf() didn't have a const pointer
parameter, but nowadays it does.

2 years agodict-sql: Don't return iterated values from data stack
Timo Sirainen [Tue, 27 Dec 2022 20:25:31 +0000 (15:25 -0500)] 
dict-sql: Don't return iterated values from data stack

This just causes data stack to grow while iterating. Use a memory pool
for the last returned value instead.

2 years agolib-dict: Add missing data stack frames to public API functions
Timo Sirainen [Tue, 27 Dec 2022 20:29:06 +0000 (15:29 -0500)] 
lib-dict: Add missing data stack frames to public API functions

2 years agolib-mail: message-[header-]parser - Call callbacks in their own data stack frames
Timo Sirainen [Tue, 27 Dec 2022 10:00:45 +0000 (05:00 -0500)] 
lib-mail: message-[header-]parser - Call callbacks in their own data stack frames

This makes sure the data stack memory usage won't grow too much while
parsing a large number of headers.

2 years agolib-mail: istream-header-filter - Call callbacks in their own data stack frames
Timo Sirainen [Tue, 27 Dec 2022 09:59:33 +0000 (04:59 -0500)] 
lib-mail: istream-header-filter - Call callbacks in their own data stack frames

This makes sure the data stack memory usage won't grow too much while
parsing a large number of headers.

2 years agolib-http: Create new HTTP client connections in their own data stack frames
Timo Sirainen [Tue, 27 Dec 2022 15:12:47 +0000 (10:12 -0500)] 
lib-http: Create new HTTP client connections in their own data stack frames

2 years agolib: libc backtrace_append() - Remove directory paths from binary names
Timo Sirainen [Tue, 27 Dec 2022 15:44:28 +0000 (10:44 -0500)] 
lib: libc backtrace_append() - Remove directory paths from binary names

The backtrace unnecessarily contained directory paths, causing the backtrace
to become excessively large just repeating the directories.

This change is only for libc backtrace, not for libunwind backtrace.

2 years agolib-fts: More fixes for address tokenizer to handle large input properly
Marco Bettini [Mon, 9 Jan 2023 13:26:23 +0000 (13:26 +0000)] 
lib-fts: More fixes for address tokenizer to handle large input properly

2 years agolib: Add warning that timeval event field filtering is unimplemented
Karl Fleischmann [Thu, 22 Dec 2022 11:54:16 +0000 (12:54 +0100)] 
lib: Add warning that timeval event field filtering is unimplemented

2 years agolib: Add string inequality warning to strlist fields in event filters
Karl Fleischmann [Wed, 21 Dec 2022 14:03:30 +0000 (15:03 +0100)] 
lib: Add string inequality warning to strlist fields in event filters

2 years agolib: Warn about event filter type mismatches between integer fields and wildcard...
Karl Fleischmann [Wed, 21 Dec 2022 13:23:10 +0000 (14:23 +0100)] 
lib: Warn about event filter type mismatches between integer fields and wildcard values

2 years agolib: Warn about event filter type mismatches if comparing integer fields with strcmp...
Karl Fleischmann [Wed, 21 Dec 2022 13:15:22 +0000 (14:15 +0100)] 
lib: Warn about event filter type mismatches if comparing integer fields with strcmp flag

Reorder branches to preserve existing behavior.

2 years agolib: Warn about unsupported inequality string comparisons in event filters
Karl Fleischmann [Mon, 19 Dec 2022 14:18:40 +0000 (15:18 +0100)] 
lib: Warn about unsupported inequality string comparisons in event filters

2 years agolib: Remove unnecessary explicit initialization of event_filter_node's bool flags
Karl Fleischmann [Mon, 19 Dec 2022 14:17:47 +0000 (15:17 +0100)] 
lib: Remove unnecessary explicit initialization of event_filter_node's bool flags

2 years agoChangeLog: Stop generating ChangeLog
Aki Tuomi [Wed, 23 Nov 2022 09:50:44 +0000 (11:50 +0200)] 
ChangeLog: Stop generating ChangeLog

It is not very useful, you can get same information with
git commands anyways, and NEWS file contains more useful
information.

2 years agoNEWS: Update news
Aki Tuomi [Wed, 23 Nov 2022 07:21:10 +0000 (09:21 +0200)] 
NEWS: Update news

2 years agolib-dcrypt: istream-decrypt - Do not attempt to get digest length after finalizing...
Aki Tuomi [Wed, 4 Jan 2023 09:28:11 +0000 (11:28 +0200)] 
lib-dcrypt: istream-decrypt - Do not attempt to get digest length after finalizing hmac context

This breaks with OpenSSL 3.0 because the internal context is free'd
after finalization.

Broken in d352e5545a9422f3b0d74fd40d94c9f9a0770fb7

2 years agom4: crypt_xpg6.m4 - Define _DEFAULT_SOURCE for current glibc
Florian Weimer [Mon, 2 Jan 2023 09:38:18 +0000 (10:38 +0100)] 
m4: crypt_xpg6.m4 - Define _DEFAULT_SOURCE for current glibc

Current glibc no longer implements the CRYPT extension, so it does not
declare crypt in <unistd.h> in strict standard modes.  The check
defines _XOPEN_SOURCE, which enables one of these modes.  Defining
_DEFAULT_SOURCE as well again makes available the crypt function
prototype.

This avoids a configure check result change with compilers which do
not support implicit function declarations.

2 years agolib-index: Fix assert-crash when header's log_file_seq/offset shrinks
Timo Sirainen [Mon, 2 Jan 2023 08:23:43 +0000 (10:23 +0200)] 
lib-index: Fix assert-crash when header's log_file_seq/offset shrinks

mail_index_sync_set_log_view() is also missing this check, but it doesn't
seem to actually happen. It's likely handled by mail_index_map() already.

Fixes:
Panic: file mail-transaction-log-view.c: line 165 (mail_transaction_log_view_set): assertion failed: (min_file_seq <= max_file_seq)

2 years agolib-dict: Improve handling of invalid replies for commits and lookups
Markus Valentin [Wed, 28 Dec 2022 11:19:52 +0000 (12:19 +0100)] 
lib-dict: Improve handling of invalid replies for commits and lookups

Prevent dict_cmd_callback_error() calling the command's callback
recursively. This fixes a crash when dict-client received an invalid
reply on commit or lookup.

2 years agoauth: Fix auth_request_password_verify() result handling
Aki Tuomi [Wed, 28 Dec 2022 10:19:11 +0000 (12:19 +0200)] 
auth: Fix auth_request_password_verify() result handling

Pass the result directly to caller, as auth_request_password_verify()
returns passdb result already.

2 years agoauth: Change auth_request_password_verify() to return enum passdb_result
Aki Tuomi [Wed, 28 Dec 2022 10:05:39 +0000 (12:05 +0200)] 
auth: Change auth_request_password_verify() to return enum passdb_result

This does not break anything, because PASSDB_RESULT_OK is 1 and mismatch
is 0.

2 years agolib-storage: Fix unnecessary data stack growth when iterating mailboxes
Timo Sirainen [Mon, 26 Dec 2022 21:48:27 +0000 (23:48 +0200)] 
lib-storage: Fix unnecessary data stack growth when iterating mailboxes

When listing mailbox list indexes, it was possible that each iteration
increased the data stack memory usage. It was all freed at the end though,
so this didn't cause any permanent leaks.

Broken by 4fdb040d2471c6e5006579bef1dd0586f89c8570

2 years agologin-common: Get client certificate name only once
Aki Tuomi [Fri, 23 Dec 2022 10:20:09 +0000 (12:20 +0200)] 
login-common: Get client certificate name only once

get_cert_username() already sets the username, so do not
get it again in different way here.

Broken 9296ff61b4044d6e1e5b5a65e9585c89517605fb

2 years agolib-ssl-iostream: Return NULL from ssl_iostream_get_security_string when not handshaked
Aki Tuomi [Thu, 22 Dec 2022 19:03:19 +0000 (21:03 +0200)] 
lib-ssl-iostream: Return NULL from ssl_iostream_get_security_string when not handshaked

2 years agolib-ssl-iostream: Add comment for ssl_iostream_get_server_name
Aki Tuomi [Thu, 22 Dec 2022 19:03:00 +0000 (21:03 +0200)] 
lib-ssl-iostream: Add comment for ssl_iostream_get_server_name

2 years agolib-ssl-iostream: Add comment for ssl_iostream_get_compression
Aki Tuomi [Thu, 22 Dec 2022 18:59:21 +0000 (20:59 +0200)] 
lib-ssl-iostream: Add comment for ssl_iostream_get_compression

2 years agolib-ssl-iostream: Return NULL from ssl_iostream_get_peer_name when name not available
Aki Tuomi [Thu, 22 Dec 2022 18:57:30 +0000 (20:57 +0200)] 
lib-ssl-iostream: Return NULL from ssl_iostream_get_peer_name when name not available

Broken in 59d268145378a7368f373b711cb53b3e48512659

2 years agolib-ssl-iostream: Use unsigned constants in JA3 code
Aki Tuomi [Wed, 21 Dec 2022 10:32:28 +0000 (12:32 +0200)] 
lib-ssl-iostream: Use unsigned constants in JA3 code

Avoids promotion to signed integer. Fixes compiler warning
'comparison of integer expressions of different signedness'

Forgotten in 3ca8852ec531b83c86c30b890b7f0200cf86105a

2 years agofts-flatcurve: Close Xapian databases on deinit
Martti Rannanjärvi [Tue, 20 Dec 2022 09:43:48 +0000 (11:43 +0200)] 
fts-flatcurve: Close Xapian databases on deinit

2 years agofts-flatcurve: Fix segmentation fault if plugin is loaded but not enabled
Ewald Dieterich [Thu, 8 Dec 2022 12:53:38 +0000 (13:53 +0100)] 
fts-flatcurve: Fix segmentation fault if plugin is loaded but not enabled

Flatcurve's GitHUB PR #39

2 years agologin-common: Add ssl_ja3 log element
Aki Tuomi [Fri, 18 Nov 2022 11:46:14 +0000 (13:46 +0200)] 
login-common: Add ssl_ja3 log element

2 years agoauth: auth-request-var-expand - Add ssl_ja3_hash key
Aki Tuomi [Tue, 9 Aug 2022 08:28:04 +0000 (11:28 +0300)] 
auth: auth-request-var-expand - Add ssl_ja3_hash key

Expands into the JA3 value from lib-ssl-iostream if present

2 years agoauth: auth-request-var-expand - Add ALIAS() macro to specify offset
Aki Tuomi [Tue, 9 Aug 2022 08:26:31 +0000 (11:26 +0300)] 
auth: auth-request-var-expand - Add ALIAS() macro to specify offset

This makes it much easier to add new aliases and new values
to the var expand table.

2 years agologin-common: Include ssl3_ja3_hash from ssl connection
Aki Tuomi [Tue, 9 Aug 2022 08:20:44 +0000 (11:20 +0300)] 
login-common: Include ssl3_ja3_hash from ssl connection

2 years agolib-auth: Send ssl_ja3_hash field
Aki Tuomi [Tue, 9 Aug 2022 08:20:37 +0000 (11:20 +0300)] 
lib-auth: Send ssl_ja3_hash field

2 years agoauth: Import ssl_ja3_hash field
Aki Tuomi [Tue, 9 Aug 2022 08:20:10 +0000 (11:20 +0300)] 
auth: Import ssl_ja3_hash field

2 years agolib-ssl-iostream: Add JA3 string
Aki Tuomi [Thu, 21 Jul 2022 10:31:56 +0000 (13:31 +0300)] 
lib-ssl-iostream: Add JA3 string

2 years agoconfig: Warn about obsolete imapc features
Karl Fleischmann [Wed, 7 Dec 2022 16:42:34 +0000 (17:42 +0100)] 
config: Warn about obsolete imapc features

2 years agoglobal: Reverse imapc feature detection
Karl Fleischmann [Wed, 7 Dec 2022 11:11:22 +0000 (12:11 +0100)] 
global: Reverse imapc feature detection

Auto-enable a selected subset of imapc features and reverse the feature
flags.

2 years agolib-storage: Rename imapc feature "rfc822.size" -> "fetch-size"
Karl Fleischmann [Wed, 7 Dec 2022 11:15:25 +0000 (12:15 +0100)] 
lib-storage: Rename imapc feature "rfc822.size" -> "fetch-size"

2 years agoglobal: Add mail_cache_max_header_name_length functionality
Marco Bettini [Tue, 6 Dec 2022 11:32:13 +0000 (11:32 +0000)] 
global: Add mail_cache_max_header_name_length functionality

2 years agolib-index: Shorten mail_cache_unaccessed_field_drop effective value to 1/4 while...
Marco Bettini [Tue, 6 Dec 2022 11:31:21 +0000 (11:31 +0000)] 
lib-index: Shorten mail_cache_unaccessed_field_drop effective value to 1/4 while cache header count is saturated

This is done to help the cache to converge quicker to the intended state.

2 years agoglobal: Add mail_cache_max_headers_count functionality
Marco Bettini [Tue, 6 Dec 2022 11:29:48 +0000 (11:29 +0000)] 
global: Add mail_cache_max_headers_count functionality

2 years agoauth: Fix crash when using empty auth listener type
Timo Sirainen [Fri, 16 Dec 2022 08:52:00 +0000 (10:52 +0200)] 
auth: Fix crash when using empty auth listener type

Remove AUTH_SOCKET_UNKNOWN since there is no need for it. This removes its
"" name, which causes unknown socket types to default to AUTH_SOCKET_AUTH
and fix this issue.

Broken by 9f72a95148f1d998e33bfacaef7b43e57e463d25

2 years agolib: connection - Use connection name for disconnect and input timeout reason
Markus Valentin [Tue, 13 Dec 2022 08:12:21 +0000 (09:12 +0100)] 
lib: connection - Use connection name for disconnect and input timeout reason

2 years agolib-doveadm: Use dns_lookup() if dns_client_socket_path is set
Markus Valentin [Thu, 8 Dec 2022 13:39:06 +0000 (14:39 +0100)] 
lib-doveadm: Use dns_lookup() if dns_client_socket_path is set

2 years agolib-doveadm: doveadm_client_create() - Extract connection_client_connect() to own...
Markus Valentin [Thu, 8 Dec 2022 13:29:31 +0000 (14:29 +0100)] 
lib-doveadm: doveadm_client_create() - Extract connection_client_connect() to own function

2 years agolib-doveadm: doveadm_client_create() - Extract connection_init_client_ip() to own...
Markus Valentin [Thu, 8 Dec 2022 13:07:47 +0000 (14:07 +0100)] 
lib-doveadm: doveadm_client_create() - Extract connection_init_client_ip() to own function

Also move calling it inside doveadm_client_resolve_hostname()

2 years agolib-doveadm: doveadm_client_create() - Extract doveadm_client_resolve_name()
Markus Valentin [Mon, 10 Oct 2022 11:31:52 +0000 (13:31 +0200)] 
lib-doveadm: doveadm_client_create() - Extract doveadm_client_resolve_name()

The newly added function calls net_gethostbyname(), as preparation for
the following commit.

2 years agolib-doveadm: doveadm_client_create() - Store ips and ips_count to doveadm_client
Markus Valentin [Mon, 10 Oct 2022 11:27:15 +0000 (13:27 +0200)] 
lib-doveadm: doveadm_client_create() - Store ips and ips_count to doveadm_client

2 years agolib: Warn about ambiguous event filter units
Karl Fleischmann [Thu, 15 Dec 2022 09:32:30 +0000 (10:32 +0100)] 
lib: Warn about ambiguous event filter units

2 years agolib: Specify test output for event filter units
Karl Fleischmann [Thu, 15 Dec 2022 09:32:09 +0000 (10:32 +0100)] 
lib: Specify test output for event filter units

2 years agolib: Print source filename and linenum when warning about event field type mismatch
Karl Fleischmann [Tue, 13 Dec 2022 16:37:38 +0000 (17:37 +0100)] 
lib: Print source filename and linenum when warning about event field type mismatch

2 years agolib: Validate field type when matching events
Karl Fleischmann [Tue, 13 Dec 2022 08:28:54 +0000 (09:28 +0100)] 
lib: Validate field type when matching events

This additionally requires a unit test to expect a warning.

2 years agolib: Use event_filter_node struct when matching event fields
Karl Fleischmann [Tue, 13 Dec 2022 08:26:04 +0000 (09:26 +0100)] 
lib: Use event_filter_node struct when matching event fields

Change the signature of the event_match_field() function without its
behavior. This prepares to inspect attributes of the node itself to
match field types in a later commit.

2 years agolib-lua: http - Use correct dns-client path
Aki Tuomi [Wed, 14 Dec 2022 13:07:38 +0000 (15:07 +0200)] 
lib-lua: http - Use correct dns-client path

The current code tries to look it up from user homedir sometimes.

Broken in 5b56debd31800ec45fc0c6529b138d1ce943b0aa

2 years agoglobal: Use wget -nv when downloading
Aki Tuomi [Wed, 14 Dec 2022 10:58:40 +0000 (12:58 +0200)] 
global: Use wget -nv when downloading

wget -q hides errors too, so lets use -nv to emit short line instead.

2 years agoauth: password-scheme-scram - Support rounds parameter
Aki Tuomi [Fri, 2 Dec 2022 20:04:50 +0000 (22:04 +0200)] 
auth: password-scheme-scram - Support rounds parameter

2 years agomaster: Don't wait only for log process at shutdown
Timo Sirainen [Sun, 11 Dec 2022 21:15:09 +0000 (23:15 +0200)] 
master: Don't wait only for log process at shutdown

There is 1 second wait at shutdown for processes that are still running.
During this 1 second they should process SIGQUIT and close socket listeners.
However, it's normal behavior for the log process to still exist at this
stage, and there is no need to wait for it.

2 years agomaster: Use shorter interval to check when processes have stopped
Timo Sirainen [Sun, 11 Dec 2022 21:13:09 +0000 (23:13 +0200)] 
master: Use shorter interval to check when processes have stopped

Instead of waiting 100ms between checks, wait only 10ms. This makes
shutdown slightly faster.

2 years agolib: Fix static_assert() to compile with C++
Timo Sirainen [Tue, 13 Dec 2022 08:48:12 +0000 (10:48 +0200)] 
lib: Fix static_assert() to compile with C++

It exists in C++11, but it's not a macro.

2 years agoauth: Add AUTH_SOCKET_TOKEN_COUNT and verify its name array size
Timo Sirainen [Mon, 12 Dec 2022 09:52:48 +0000 (11:52 +0200)] 
auth: Add AUTH_SOCKET_TOKEN_COUNT and verify its name array size

Remove the [ENUM] indexes, because using them hides the size checking error
if new enums are inserted in the middle.

2 years agoimap: Add IMAP_NOTIFY_EVENT_COUNT and verify its name array size
Timo Sirainen [Sat, 3 Dec 2022 12:10:20 +0000 (14:10 +0200)] 
imap: Add IMAP_NOTIFY_EVENT_COUNT and verify its name array size

2 years agodsync: Add DSYNC_MAIL_CHANGE_TYPE_COUNT and verify its name array size
Timo Sirainen [Sat, 3 Dec 2022 12:08:11 +0000 (14:08 +0200)] 
dsync: Add DSYNC_MAIL_CHANGE_TYPE_COUNT and verify its name array size

2 years agoglobal: Check for enum/array size mismatches with static_assert_array_size()
Timo Sirainen [Fri, 2 Dec 2022 13:54:07 +0000 (15:54 +0200)] 
global: Check for enum/array size mismatches with static_assert_array_size()

2 years agodoveadm: doveadm mailbox path -t types: Add missing index-cache and list-index
Timo Sirainen [Sat, 3 Dec 2022 12:02:30 +0000 (14:02 +0200)] 
doveadm: doveadm mailbox path -t types: Add missing index-cache and list-index

2 years agolib-storage: Add MAILBOX_LIST_PATH_TYPE_COUNT
Timo Sirainen [Sat, 3 Dec 2022 12:02:00 +0000 (14:02 +0200)] 
lib-storage: Add MAILBOX_LIST_PATH_TYPE_COUNT

2 years agolib-storage: Add index_mail_global_cache_fields_dup() to hide global_cache_fields
Timo Sirainen [Fri, 2 Dec 2022 13:52:26 +0000 (15:52 +0200)] 
lib-storage: Add index_mail_global_cache_fields_dup() to hide global_cache_fields

2 years agolib: Add static_assert_array_size()
Timo Sirainen [Sat, 3 Dec 2022 11:46:02 +0000 (13:46 +0200)] 
lib: Add static_assert_array_size()

This is a simple way to make sure array size matches the given count,
or give a compile time error if not.

2 years agolib: Add static_assert() macro to _Static_assert()
Timo Sirainen [Fri, 2 Dec 2022 13:49:32 +0000 (15:49 +0200)] 
lib: Add static_assert() macro to _Static_assert()

We require C11 nowadays, so _Static_assert() should be supported.
static_assert() is nicer though, and it seems to be planned for C23.

2 years agolog: Use the new listener type field to distinguish the various listener types.
Stephan Bosch [Tue, 22 Nov 2022 20:50:52 +0000 (21:50 +0100)] 
log: Use the new listener type field to distinguish the various listener types.

2 years agodoveadm: Use the new listener type field to distinguish the various listener types.
Stephan Bosch [Tue, 22 Nov 2022 20:44:30 +0000 (21:44 +0100)] 
doveadm: Use the new listener type field to distinguish the various listener types.

2 years agostats: Use the new listener type field to distinguish the various listener types.
Stephan Bosch [Wed, 23 Nov 2022 01:33:06 +0000 (02:33 +0100)] 
stats: Use the new listener type field to distinguish the various listener types.

2 years agoreplication: Use the new listener type field to distinguish the various listener...
Stephan Bosch [Fri, 18 Nov 2022 21:32:00 +0000 (22:32 +0100)] 
replication: Use the new listener type field to distinguish the various listener types.

2 years agoimap: Use the new listener type field to distinguish the various listener types.
Stephan Bosch [Fri, 18 Nov 2022 20:46:31 +0000 (21:46 +0100)] 
imap: Use the new listener type field to distinguish the various listener types.

2 years agoauth: Use the new listener type field to distinguish the various listener types.
Stephan Bosch [Fri, 18 Nov 2022 20:09:33 +0000 (21:09 +0100)] 
auth: Use the new listener type field to distinguish the various listener types.

2 years agoglobal: Set type "admin" for all admin service listeners.
Stephan Bosch [Mon, 21 Nov 2022 19:35:48 +0000 (20:35 +0100)] 
global: Set type "admin" for all admin service listeners.