]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
3 months agoimap: client_send_mailbox_flags() - Don't send PERMANENTFLAGS if not selecting and...
Marco Bettini [Thu, 29 May 2025 08:47:25 +0000 (08:47 +0000)] 
imap: client_send_mailbox_flags() - Don't send PERMANENTFLAGS if not selecting and we have allow_new_keywords

3 months agolib-lua: test_io_lua() - Test return code from lua_script_init()
Marco Bettini [Fri, 30 May 2025 17:05:02 +0000 (17:05 +0000)] 
lib-lua: test_io_lua() - Test return code from lua_script_init()

Found by coverity, 40458 Unchecked return value

3 months agolib-lua: dlua_dovecot_io_register() - Fix unbalanced stack at exit
Marco Bettini [Mon, 9 Jun 2025 15:37:47 +0000 (15:37 +0000)] 
lib-lua: dlua_dovecot_io_register() - Fix unbalanced stack at exit

3 months agolib-lua: dlua_script_init() - Remove unused variable
Marco Bettini [Thu, 5 Jun 2025 09:10:18 +0000 (09:10 +0000)] 
lib-lua: dlua_script_init() - Remove unused variable

3 months agolib-lua: Add missing lua scripts location
Marco Bettini [Thu, 5 Jun 2025 15:19:03 +0000 (15:19 +0000)] 
lib-lua: Add missing lua scripts location

without this make check fails when the build dir is different than the source dir

3 months agolib-compression: Add o_stream_create_deflate()
Timo Sirainen [Mon, 2 Jun 2025 15:19:10 +0000 (18:19 +0300)] 
lib-compression: Add o_stream_create_deflate()

3 months agolib-index: Fix storing cache fields' last_used with 32bit big endian CPUs
Helge Deller [Tue, 10 Jun 2025 17:42:05 +0000 (19:42 +0200)] 
lib-index: Fix storing cache fields' last_used with 32bit big endian CPUs

Debian started in 2025 to build packages on 32-bit platforms with 64-bit
time_t support by default. With that change, dovecot suddenly fails to
build on 32-bit big endian architectures (e.g. hppa, powerpc) with those
testsuite errors:

test-mail-cache-fields.c:52: Assert failed: cache_field.last_used == priv->field.last_used && cache_field.decision == priv->field.decision
test-mail-cache-fields.c:67: Assert failed: cache_field.last_used == priv->field.last_used && cache_field.decision == priv->field.decision
test-mail-cache-fields.c:96: Assert failed: cache_field.last_used == priv->field.last_used && cache_field.decision == priv->field.decision
mail cache fields read-write ......................................... : FAILED

Change the existing code for big endian architectures to actually check
the size of time_t at compile time instead of hardcoding a check for
SIZEOF_VOID_P to fix the issue for 32- and 64-bit big endian
architectures.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: Timo Sirainen <timo.sirainen@open-xchange.com>
Fixes: 1ee84ba0659f ("lib-index: Fix storing cache fields' last_used with 64bit big endian CPUs")
3 months agoauth: Fix LDAP SASL support
Timo Sirainen [Mon, 2 Jun 2025 17:42:03 +0000 (20:42 +0300)] 
auth: Fix LDAP SASL support

The settings code didn't see the necessary defines.

Based on patch by Jakob Haufe

Broken by 961275fdb54878fdfa4ee1b9f1a4f00e82bf4a83

3 months agolib-master: Don't use USER environment in log prefix
Timo Sirainen [Tue, 27 May 2025 08:20:00 +0000 (11:20 +0300)] 
lib-master: Don't use USER environment in log prefix

USER environment is not so generally supported anymore. The tools
supporting it should change the log prefix themselves if they want it.

Also this fixes inconsistency where some tools logged "tool(USER): "
or "tool: " log prefix depending on whether the configuration was read
by executing doveconf or not (because doveconf dropped the USER
environment).

3 months agolib-master: Always process import_environment for standalone programs
Timo Sirainen [Tue, 27 May 2025 08:10:56 +0000 (11:10 +0300)] 
lib-master: Always process import_environment for standalone programs

It wasn't processed if config was read via config socket or from config
cache.

3 months agolib-settings: Fix settings cache validity checks
Timo Sirainen [Tue, 27 May 2025 07:08:41 +0000 (10:08 +0300)] 
lib-settings: Fix settings cache validity checks

inode and size checks were swapped, so settings caching didn't actually
work.

3 months agolib-settings, config: Panic if SETTING_DEFINE_LIST_END is missing from settings lists
Timo Sirainen [Thu, 15 May 2025 10:26:30 +0000 (13:26 +0300)] 
lib-settings, config: Panic if SETTING_DEFINE_LIST_END is missing from settings lists

3 months agoauth: Terminate properly auth_oauth2_post_setting_defines list
Timo Sirainen [Thu, 15 May 2025 10:06:56 +0000 (13:06 +0300)] 
auth: Terminate properly auth_oauth2_post_setting_defines list

Fixes:
Error: xoauth2: oauth2 failed: Local validation failed: auth_oauth2_fields settings: Failed to parse configuration: settings struct auth_oauth2_fields #1 key mismatch

3 months agoauth: Fix empty certificate fingerprint error handling
Timo Sirainen [Mon, 2 Jun 2025 07:49:23 +0000 (10:49 +0300)] 
auth: Fix empty certificate fingerprint error handling

Broken in db01107763ff3ad6afbf91f965ee46d2e3412b05

3 months agolib: cpu-count - fix compilation using musl
Fabian Groffen [Sat, 31 May 2025 08:49:28 +0000 (10:49 +0200)] 
lib: cpu-count - fix compilation using musl

The macros, types and symbols CPU_* and cpuset_t are not exposed in
musl's sched.h unless _GNU_SOURCE is set.

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
4 months agoimapc: Automatically enable IMAP4rev2 if server has the capability
Markus Valentin [Tue, 13 May 2025 11:36:28 +0000 (13:36 +0200)] 
imapc: Automatically enable IMAP4rev2 if server has the capability

4 months agoimapc: Ignore or disable RECENT if IMAP4rev2 is enabled
Markus Valentin [Thu, 8 May 2025 13:25:31 +0000 (15:25 +0200)] 
imapc: Ignore or disable RECENT if IMAP4rev2 is enabled

4 months agolib-http: test-http-client-errors - Increase client progress timeout
Stephan Bosch [Fri, 30 May 2025 11:39:37 +0000 (13:39 +0200)] 
lib-http: test-http-client-errors - Increase client progress timeout

Accounts for timeouts sometimes occurring while running in Valgrind.

4 months agoconfig: Add asserts to make static analyzer happy
Timo Sirainen [Mon, 26 May 2025 07:19:38 +0000 (10:19 +0300)] 
config: Add asserts to make static analyzer happy

4 months agoimap: Remove dead assignment
Timo Sirainen [Mon, 26 May 2025 07:13:13 +0000 (10:13 +0300)] 
imap: Remove dead assignment

4 months agolib-dict-backend: Fix building ldap as plugin
Timo Sirainen [Wed, 28 May 2025 07:26:09 +0000 (10:26 +0300)] 
lib-dict-backend: Fix building ldap as plugin

Broken by 49f2c4d3365de502d705db28376bf41927a1a900

4 months agoconfigure: Do not modify user-provided CFLAGS variable
Jan Engelhardt [Mon, 31 Mar 2025 17:10:34 +0000 (19:10 +0200)] 
configure: Do not modify user-provided CFLAGS variable

As per
https://www.gnu.org/software/automake/manual/html_node/User-Variables.html
CFLAGS is reserved for the user and should not be changed.

AM_CFLAGS is the right variable to use here.

4 months agoglobal: Fix wrong inheritance of AM_CFLAGS/AM_CPPFLAGS in target_CFLAGS
Jan Engelhardt [Mon, 26 May 2025 10:26:28 +0000 (12:26 +0200)] 
global: Fix wrong inheritance of AM_CFLAGS/AM_CPPFLAGS in target_CFLAGS

target_CFLAGS overrides AM_CFLAGS, not AM_CPPFLAGS, thus $(AM_CFLAGS),
not $(AM_CPPFLAGS), is needed in target_CFLAGS.

4 months agom4/dovecot.m4: Use AM_CFLAGS instead of EXTRA_CFLAGS with --enable-ubsan
Timo Sirainen [Mon, 26 May 2025 07:57:41 +0000 (10:57 +0300)] 
m4/dovecot.m4: Use AM_CFLAGS instead of EXTRA_CFLAGS with --enable-ubsan

Mainly to make it consistent with how all other build options are used.

4 months agologin-common: Copy haproxy fields to client pool
Aki Tuomi [Fri, 23 May 2025 18:09:02 +0000 (21:09 +0300)] 
login-common: Copy haproxy fields to client pool

They are stack allocated in lib-master now.

4 months agolib-master: Copy haproxy provided fields before calling callback
Aki Tuomi [Fri, 23 May 2025 18:07:33 +0000 (21:07 +0300)] 
lib-master: Copy haproxy provided fields before calling callback

Otherwise fields get lost, broken in 894610212596c35aade07a4d0af9d5e7fd6245c7

4 months agolib: strfuncs - Make t_memdup public
Aki Tuomi [Mon, 26 May 2025 08:44:40 +0000 (11:44 +0300)] 
lib: strfuncs - Make t_memdup public

4 months agolda: Default mail_home=$HOME environment if not using userdb lookup
Timo Sirainen [Mon, 26 May 2025 06:45:56 +0000 (09:45 +0300)] 
lda: Default mail_home=$HOME environment if not using userdb lookup

The previous code to do this was removed by
e57d5b9002f910c095ee5b55821395fcf1da016a

4 months agolda: Fix using USER environment if -d hasn't been specified
Timo Sirainen [Mon, 26 May 2025 06:37:35 +0000 (09:37 +0300)] 
lda: Fix using USER environment if -d hasn't been specified

This became broken at some point.

4 months agoauth: Allow ssl cert to be validated by fingerprint
Aki Tuomi [Fri, 14 Feb 2025 13:29:34 +0000 (15:29 +0200)] 
auth: Allow ssl cert to be validated by fingerprint

4 months agologin-common: Allow invalid client cert if ssl_server_request_client_cert=any-cert
Aki Tuomi [Fri, 14 Feb 2025 13:29:33 +0000 (15:29 +0200)] 
login-common: Allow invalid client cert if ssl_server_request_client_cert=any-cert

4 months agoauth: Support check_client_fp, check_client_cert_fp, check_client_pubkey_fp fields
Aki Tuomi [Fri, 17 Jan 2025 14:04:39 +0000 (16:04 +0200)] 
auth: Support check_client_fp, check_client_cert_fp, check_client_pubkey_fp fields

When set, these are matched against provided fingerprints, and
must be present in the request.

Field check_client_fp matches either certificate or public key fingerprint.

4 months agolib-ssl-iostream: Change ssl_server_request_client_cert to enum
Aki Tuomi [Tue, 31 Dec 2024 10:40:39 +0000 (12:40 +0200)] 
lib-ssl-iostream: Change ssl_server_request_client_cert to enum

If set to no, client certificates are not asked or verified.
If set to yes, client certificates are asked and verified.
If set to any-cert, client certificates are asked but verified with
fingerprinting

4 months agolib-ssl-iostream: Allow missing ca if invalid certs are allowed
Aki Tuomi [Tue, 31 Dec 2024 10:40:19 +0000 (12:40 +0200)] 
lib-ssl-iostream: Allow missing ca if invalid certs are allowed

4 months agologin-common: Add ssl_client_cert_fp and ssl_client_cert_pubkey_fp if configured
Aki Tuomi [Tue, 31 Dec 2024 10:21:59 +0000 (12:21 +0200)] 
login-common: Add ssl_client_cert_fp and ssl_client_cert_pubkey_fp if configured

4 months agolib-auth-client: Add ssl_client_cert_fp and ssl_client_cert_pubkey_fp fields
Aki Tuomi [Tue, 31 Dec 2024 10:21:32 +0000 (12:21 +0200)] 
lib-auth-client: Add ssl_client_cert_fp and ssl_client_cert_pubkey_fp fields

4 months agolib-auth-client: Compare ssl_ja3_hash to NULL and not 0
Aki Tuomi [Tue, 31 Dec 2024 10:19:53 +0000 (12:19 +0200)] 
lib-auth-client: Compare ssl_ja3_hash to NULL and not 0

ssl_ja3_hash is a pointer, not a number, so it's more correct
to compare it as pointer.

4 months agoauth: Add ssl_client_cert_fp and ssl_client_cert_pubkey_fp fields
Aki Tuomi [Tue, 31 Dec 2024 10:17:54 +0000 (12:17 +0200)] 
auth: Add ssl_client_cert_fp and ssl_client_cert_pubkey_fp fields

4 months agolib-ssl-iostream: Replace ssl_iostream_has_broken_client_cert() with ssl_iostream_has...
Aki Tuomi [Fri, 14 Feb 2025 12:54:31 +0000 (14:54 +0200)] 
lib-ssl-iostream: Replace ssl_iostream_has_broken_client_cert() with ssl_iostream_has_client_cert()

Broken cert does not do anything different from valid cert, but we need
to know if there was cert in the first place.

4 months agolib-ssl-iostream: Add ssl_peer_certificate_fingerprint_hash setting
Aki Tuomi [Tue, 31 Dec 2024 10:04:00 +0000 (12:04 +0200)] 
lib-ssl-iostream: Add ssl_peer_certificate_fingerprint_hash setting

4 months agolib-ssl-iostream: Add ssl_iostream_get_peer_cert_fingerprint()
Aki Tuomi [Tue, 31 Dec 2024 09:57:04 +0000 (11:57 +0200)] 
lib-ssl-iostream: Add ssl_iostream_get_peer_cert_fingerprint()

Provides fingerprint of peer certificate and it's public key
using the configured hash algorithm in context.

4 months agolib-ssl-iostream: Reformat iostream-openssl.c
Aki Tuomi [Fri, 21 Feb 2025 07:22:25 +0000 (09:22 +0200)] 
lib-ssl-iostream: Reformat iostream-openssl.c

4 months agolib-http: test-http-client-errors - Fix memory leak at sub-process deinit
Timo Sirainen [Fri, 23 May 2025 09:28:54 +0000 (12:28 +0300)] 
lib-http: test-http-client-errors - Fix memory leak at sub-process deinit

Broken by dd6f9b3a3fab7d1c4b93d4f65086e8f019338b83

4 months agoconfigure: Fix building without LDAP
Aki Tuomi [Fri, 23 May 2025 08:34:41 +0000 (11:34 +0300)] 
configure: Fix building without LDAP

4 months agolib-dcrypt: test-crypto - Store comparison key in DOVECOT format
Aki Tuomi [Fri, 23 May 2025 09:30:45 +0000 (12:30 +0300)] 
lib-dcrypt: test-crypto - Store comparison key in DOVECOT format

PEM format is not stable between openssl versions

4 months agoglobal: Fix warnings about uninitialized variables when compiling with -flto
Timo Sirainen [Thu, 15 May 2025 10:40:13 +0000 (13:40 +0300)] 
global: Fix warnings about uninitialized variables when compiling with -flto

These were only false positives, except for the unit test ones, which don't
really matter.

4 months agolib-dcrypt: Increase salt to 16 bytes for dovecot v2 keys
Aki Tuomi [Thu, 22 May 2025 05:02:09 +0000 (08:02 +0300)] 
lib-dcrypt: Increase salt to 16 bytes for dovecot v2 keys

This makes it FIPS compatible.

4 months agolib-crypt: test-crypto - Enable testing more keys in test_load_v2_public_key()
Aki Tuomi [Thu, 22 May 2025 05:24:31 +0000 (08:24 +0300)] 
lib-crypt: test-crypto - Enable testing more keys in test_load_v2_public_key()

4 months agofts-flatcurve: fts_flatcurve_xapian_db_populate() - Remove memory leak on returning...
Marco Bettini [Tue, 20 May 2025 15:53:28 +0000 (15:53 +0000)] 
fts-flatcurve: fts_flatcurve_xapian_db_populate() - Remove memory leak on returning error strings

Discovered on coverity

4 months agolib-lua/dlua-iostream: Remove unnecessary stream state assertion
Karl Fleischmann [Wed, 21 May 2025 10:09:29 +0000 (12:09 +0200)] 
lib-lua/dlua-iostream: Remove unnecessary stream state assertion

4 months agolib-lua: test_io_lua() - Ensure a read error is handled correctly
Karl Fleischmann [Wed, 21 May 2025 09:48:21 +0000 (11:48 +0200)] 
lib-lua: test_io_lua() - Ensure a read error is handled correctly

4 months agolib-lua/dlua-iostream: dlua_i_read_common() - Optimize error handling
Karl Fleischmann [Wed, 21 May 2025 09:42:16 +0000 (11:42 +0200)] 
lib-lua/dlua-iostream: dlua_i_read_common() - Optimize error handling

This also makes the error handling more explicit.

4 months agolib-lua/dlua-iostream: dlua_read_line() - Ignore result of i_stream_read()
Karl Fleischmann [Fri, 16 May 2025 14:48:20 +0000 (16:48 +0200)] 
lib-lua/dlua-iostream: dlua_read_line() - Ignore result of i_stream_read()

Issued by coverity unchecked return value.

4 months agoconfig: settings_add_include() - Close file descriptor if fstat() failed
Karl Fleischmann [Fri, 16 May 2025 14:37:31 +0000 (16:37 +0200)] 
config: settings_add_include() - Close file descriptor if fstat() failed

Issued by coverity resource leak error.

4 months agosubmission-login: cmd_helo_reply() - Only check against SMTP UTF8 if feature is enabled
Karl Fleischmann [Fri, 16 May 2025 13:23:27 +0000 (15:23 +0200)] 
submission-login: cmd_helo_reply() - Only check against SMTP UTF8 if feature is enabled

Issued by coverity deadcode error.

4 months agoimapc: Do not forward ALERT response codes from sources with insecure connections
Marco Bettini [Mon, 28 Apr 2025 13:55:38 +0000 (13:55 +0000)] 
imapc: Do not forward ALERT response codes from sources with insecure connections

4 months agolib: hostpid - Use getaddrinfo instead of gethostbyname
Arjen de Korte [Fri, 31 Jan 2025 12:38:55 +0000 (13:38 +0100)] 
lib: hostpid - Use getaddrinfo instead of gethostbyname

gethostbyname is obsolote, so we should stop using it.

4 months agoimap: imap-select: Disable SELECT UNSEEN response if IMAP4rev2 is enabled
Markus Valentin [Mon, 5 May 2025 07:38:33 +0000 (09:38 +0200)] 
imap: imap-select: Disable SELECT UNSEEN response if IMAP4rev2 is enabled

4 months agolib-dns-client: test-dns-lookup - Add DLLIB for dlopen()
Aki Tuomi [Tue, 20 May 2025 05:43:13 +0000 (08:43 +0300)] 
lib-dns-client: test-dns-lookup - Add DLLIB for dlopen()

4 months agolib-http: Use explicit numbers for HTTP_CLIENT_REQUEST_ERROR_* codes
Timo Sirainen [Thu, 15 May 2025 09:48:41 +0000 (12:48 +0300)] 
lib-http: Use explicit numbers for HTTP_CLIENT_REQUEST_ERROR_* codes

We're beginning on rely on these numbers not to change, so make the numbers
explicit to avoid accidental changes.

4 months agolib-dns src: Change dns_client_settings to config setting.
sergey.kitov [Tue, 6 May 2025 15:20:19 +0000 (18:20 +0300)] 
lib-dns src: Change dns_client_settings to config setting.

4 months agolib-http: Pass http_client_host to http_client_host_shared_lookup.
sergey.kitov [Tue, 13 May 2025 13:13:37 +0000 (16:13 +0300)] 
lib-http: Pass http_client_host to http_client_host_shared_lookup.

The following commit will make dns_lookup retrieving DNS settings from
event. http_client_host is need to pass http_client event to dns_lookup, the event
contains client-specific DNS settings.

4 months agolib-dns-client: Move struct dns_lookup initialization code into separate function.
sergey.kitov [Fri, 28 Mar 2025 09:33:03 +0000 (11:33 +0200)] 
lib-dns-client: Move struct dns_lookup initialization code into separate function.

Upcoming changes will add more usages of that.

4 months agolib-http: Set http_client_context.dns_lookup_timeout_msecs to default value unconditi...
sergey.kitov [Thu, 13 Feb 2025 15:21:38 +0000 (17:21 +0200)] 
lib-http: Set http_client_context.dns_lookup_timeout_msecs to default value unconditionally.

DNS lookup timeout will be made configurable in the following commit.

4 months agolib-smtp: Remove fallback to net_gethostbyname as not supported by upcoming changes.
sergey.kitov [Thu, 6 Feb 2025 12:26:10 +0000 (14:26 +0200)] 
lib-smtp: Remove fallback to net_gethostbyname as not supported by upcoming changes.

4 months agolib-http: Remove fallback to net_gethostbyname as not supported by upcoming changes.
sergey.kitov [Wed, 5 Feb 2025 15:45:39 +0000 (17:45 +0200)] 
lib-http: Remove fallback to net_gethostbyname as not supported by upcoming changes.

4 months agolib-dns-client: Move idle_timeout_msecs and cache_ttl_secs from dns_client_settings...
sergey.kitov [Wed, 5 Feb 2025 11:38:19 +0000 (13:38 +0200)] 
lib-dns-client: Move idle_timeout_msecs and cache_ttl_secs from dns_client_settings to dns_client_parameters.

As a preparation to make dns_client_settings configurable.

4 months agosubmission: Originate submission_client event from event having settings_root set.
sergey.kitov [Tue, 4 Feb 2025 13:14:47 +0000 (15:14 +0200)] 
submission: Originate submission_client event from event having settings_root set.

4 months agolib-http: Fix bug with removal of http_client_request from delayed_requests.
sergey.kitov [Tue, 4 Feb 2025 10:04:16 +0000 (12:04 +0200)] 
lib-http: Fix bug with removal of http_client_request from delayed_requests.

Setting release_time to 0 in the beginning of
http_client_queue_submit_now() prevents removing of the request from
delayed_requests in case of failures.

4 months agolib-dns-client, lib-http: remove ioloop from struct dns_client_settings.
sergey.kitov [Wed, 13 Nov 2024 13:23:43 +0000 (15:23 +0200)] 
lib-dns-client, lib-http: remove ioloop from struct dns_client_settings.

4 months agosrc: Remove event_parent from struct dns_client_settings.
sergey.kitov [Mon, 21 Oct 2024 13:57:18 +0000 (16:57 +0300)] 
src: Remove event_parent from struct dns_client_settings.

4 months agosrc: Rename dns_lookup_settings to dns_client_settings.
sergey.kitov [Mon, 21 Oct 2024 09:40:47 +0000 (12:40 +0300)] 
src: Rename dns_lookup_settings to dns_client_settings.

4 months agoconfig: Improve comment about self-referencing keys expansion.
sergey.kitov [Thu, 15 May 2025 09:18:34 +0000 (12:18 +0300)] 
config: Improve comment about self-referencing keys expansion.

4 months agoconfig: Cleanup config_write_keyvariable() function.
sergey.kitov [Thu, 15 May 2025 09:15:07 +0000 (12:15 +0300)] 
config: Cleanup config_write_keyvariable() function.

4 months agoconfig: Fix expanding $SET:key inside filters.
sergey.kitov [Thu, 15 May 2025 08:58:48 +0000 (11:58 +0300)] 
config: Fix expanding $SET:key inside filters.

expand_parent parameter was added to config_get_value() in
92a9ff5e799adf9bffb8831576d84eb84b8ef09a, so its behavior was likely
useful only in the earlier hierarchical configuration.

4 months agopop3: Free var_expand program in parse_uidl_keymask()
Aki Tuomi [Fri, 16 May 2025 07:58:44 +0000 (10:58 +0300)] 
pop3: Free var_expand program in parse_uidl_keymask()

Forgotten in 37c9d7802a6713443bcab3cfa3d01a57b154c4c1

4 months agolib-var-expand: Unload loaded crypt module at exit
Aki Tuomi [Fri, 16 May 2025 08:05:27 +0000 (11:05 +0300)] 
lib-var-expand: Unload loaded crypt module at exit

Forgotten in 73ae2a9e45144f05a179d17d9b201226d93b81a0

4 months agoimap: cmd_append_handle_args() - Fix calling i_stream_create_limit() twice
Markus Valentin [Thu, 15 May 2025 12:04:06 +0000 (14:04 +0200)] 
imap: cmd_append_handle_args() - Fix calling i_stream_create_limit() twice

f12df6e0eed634aa4fe92c225b54ef5ee965b35c accidentally added a second
call to i_stream_create_limit() was which led to leaking events and
wrong iostream->refcount in other plugins

4 months agoconfig: Fix config filter sorting order
Timo Sirainen [Thu, 15 May 2025 06:54:18 +0000 (09:54 +0300)] 
config: Fix config filter sorting order

It was somewhat luckily working in glibc, but broke with e.g. musl libc.
This caused a crash at startup.

Broken by 5acdd2b97ed6092d1f0204bdeb3e418180519370

4 months agoimap: If IMAP4rev2 is enabled by the client also enable QRESYNC
Markus Valentin [Tue, 6 May 2025 11:28:35 +0000 (13:28 +0200)] 
imap: If IMAP4rev2 is enabled by the client also enable QRESYNC

4 months agolib-lua: Add base64 encode/decode support
Aki Tuomi [Wed, 16 Apr 2025 06:40:09 +0000 (09:40 +0300)] 
lib-lua: Add base64 encode/decode support

4 months agolib-ssl-iostream: Fix OpenSSL 3.0 provider/engine preference logic
Fred Morcos [Thu, 8 May 2025 16:53:06 +0000 (18:53 +0200)] 
lib-ssl-iostream: Fix OpenSSL 3.0 provider/engine preference logic

4 months agolib, lib-language: Use perl found by configure
Aki Tuomi [Mon, 12 May 2025 09:06:23 +0000 (12:06 +0300)] 
lib, lib-language: Use perl found by configure

This allows better errors if perl wasn't found.

4 months agolib-settings: Distribute settings-history-core.h
Aki Tuomi [Mon, 12 May 2025 08:52:37 +0000 (11:52 +0300)] 
lib-settings: Distribute settings-history-core.h

It does not need to be regenerated every time.

4 months agolib-settings: Use python3 found by configure
Aki Tuomi [Mon, 12 May 2025 09:03:57 +0000 (12:03 +0300)] 
lib-settings: Use python3 found by configure

This allows better errors if python3 wasn't found.

4 months agoconfig: Change config_dump_full_context.config const
Timo Sirainen [Fri, 11 Apr 2025 10:39:47 +0000 (13:39 +0300)] 
config: Change config_dump_full_context.config const

4 months agoconfig: Change struct config_parsed parameters const for most functions
Timo Sirainen [Fri, 11 Apr 2025 10:38:28 +0000 (13:38 +0300)] 
config: Change struct config_parsed parameters const for most functions

4 months agolib-storage: Add explicit "set/" userdb prefix for settings
Timo Sirainen [Thu, 10 Apr 2025 18:07:15 +0000 (21:07 +0300)] 
lib-storage: Add explicit "set/" userdb prefix for settings

If the setting name is unknown, it's an error. At least for now this prefix
is optional.

4 months agolib-settings: Fail settings lookups if there are unknown setting overrides
Timo Sirainen [Thu, 10 Apr 2025 18:06:20 +0000 (21:06 +0300)] 
lib-settings: Fail settings lookups if there are unknown setting overrides

This is now safe, because userdb no longer adds unknown settings to
overrides.

4 months agolib-storage: Don't add userdb fields to settings if they're unknown
Timo Sirainen [Thu, 10 Apr 2025 14:57:16 +0000 (17:57 +0300)] 
lib-storage: Don't add userdb fields to settings if they're unknown

Userdb extra fields can be used for other purposes than as being settings.
Now that we know all setting names, don't add them to settings overrides
if we know they're not known settings.

4 months agolib-settings: Add settings_key_exists()
Timo Sirainen [Thu, 10 Apr 2025 14:54:12 +0000 (17:54 +0300)] 
lib-settings: Add settings_key_exists()

4 months agolib-settings: Remove unused settings_override.filter_event
Timo Sirainen [Thu, 10 Apr 2025 12:10:29 +0000 (15:10 +0300)] 
lib-settings: Remove unused settings_override.filter_event

4 months agolib-settings, config: Remove unused override event filter
Timo Sirainen [Thu, 10 Apr 2025 12:09:36 +0000 (15:09 +0300)] 
lib-settings, config: Remove unused override event filter

4 months agolib-settings, config: Fix and simplify override order handling
Timo Sirainen [Thu, 10 Apr 2025 10:50:03 +0000 (13:50 +0300)] 
lib-settings, config: Fix and simplify override order handling

The order is now based on the number of named list filter elements in the
override path vs binary config's event filter.

This also happens to fix at least some issues where @group include was
wrongly overriding userdb fields.

4 months agolib-settings: settings_mmap_apply_filter() - Refactor to use settings_mmap_event_filt...
Timo Sirainen [Thu, 10 Apr 2025 11:10:24 +0000 (14:10 +0300)] 
lib-settings: settings_mmap_apply_filter() - Refactor to use settings_mmap_event_filter parameter

4 months agolib-settings: Introduce struct settings_mmap_event_filter
Timo Sirainen [Thu, 10 Apr 2025 10:43:59 +0000 (13:43 +0300)] 
lib-settings: Introduce struct settings_mmap_event_filter

4 months agolib-settings: Optimize skipping overrides that aren't in the looked up setting_parser...
Timo Sirainen [Thu, 10 Apr 2025 10:18:05 +0000 (13:18 +0300)] 
lib-settings: Optimize skipping overrides that aren't in the looked up setting_parser_info

4 months agolib-settings: Remove unnecessary settings_override.path_element_count
Timo Sirainen [Thu, 10 Apr 2025 09:21:29 +0000 (12:21 +0300)] 
lib-settings: Remove unnecessary settings_override.path_element_count

It has not been used since 09e551901eeb21bd8fc7b07eb67d80fd43fbb71e

4 months agolib-settings: Build override settings filters using "all settings" hash table in...
Timo Sirainen [Tue, 8 Apr 2025 09:43:06 +0000 (12:43 +0300)] 
lib-settings: Build override settings filters using "all settings" hash table in binary config

If there is no binary config (= unit tests), require that all the settings
infos have been explicitly registered.

This simplifies the override handling code and allows further optimizations.

4 months agolib-settings: Move settings override "*" handling out of the loop
Timo Sirainen [Tue, 8 Apr 2025 09:23:48 +0000 (12:23 +0300)] 
lib-settings: Move settings override "*" handling out of the loop

This simplifies the code a bit.