]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
16 months agolib-ldap: Fix using ssl_client_cert/key
Timo Sirainen [Wed, 14 Jun 2023 18:54:45 +0000 (21:54 +0300)] 
lib-ldap: Fix using ssl_client_cert/key

The cert/key is in the string itself, they're not paths to files.

16 months agolib: pool_add_external_ref() - Assert-crash if pool/ref_pool is datastack or system...
Timo Sirainen [Wed, 14 Jun 2023 12:18:13 +0000 (15:18 +0300)] 
lib: pool_add_external_ref() - Assert-crash if pool/ref_pool is datastack or system pool

These pools aren't unreferenced, so the reference would leak.

16 months agolib-ssl-iostream, global: io_stream_create_ssl_client/server() - Remove set parameter
Timo Sirainen [Wed, 14 Jun 2023 11:52:22 +0000 (14:52 +0300)] 
lib-ssl-iostream, global: io_stream_create_ssl_client/server() - Remove set parameter

All settings are now context-only.

16 months agolib-ssl-iostream: Remove unnecessary ssl_iostream_settings_drop_stream_only()
Timo Sirainen [Wed, 14 Jun 2023 11:31:36 +0000 (14:31 +0300)] 
lib-ssl-iostream: Remove unnecessary ssl_iostream_settings_drop_stream_only()

16 months agolib-ssl-iostream: Handle empty setting strings as "unset"
Timo Sirainen [Sun, 25 Jun 2023 19:07:00 +0000 (22:07 +0300)] 
lib-ssl-iostream: Handle empty setting strings as "unset"

NULL and empty strings are now handled the same.

16 months agolib-ssl-iostream: Change ssl_iostream_settings.allow_invalid_cert to be context-only
Timo Sirainen [Wed, 14 Jun 2023 11:30:09 +0000 (14:30 +0300)] 
lib-ssl-iostream: Change ssl_iostream_settings.allow_invalid_cert to be context-only

All the callers already set it for context.

16 months agolib-ssl-iostream, global: Remove ssl_iostream_settings.verbose
Timo Sirainen [Wed, 14 Jun 2023 11:15:20 +0000 (14:15 +0300)] 
lib-ssl-iostream, global: Remove ssl_iostream_settings.verbose

This was unnecessary, because all the callers already set the parent event
to debug log level.

16 months agolib-master: Remove verbose_ssl setting
Timo Sirainen [Wed, 14 Jun 2023 11:08:02 +0000 (14:08 +0300)] 
lib-master: Remove verbose_ssl setting

It can be replaced by: log_debug = category=ssl

16 months agolib-ssl-iostream, global: Remove ssl_iostream_settings.verbose_invalid_cert
Timo Sirainen [Wed, 14 Jun 2023 11:04:35 +0000 (14:04 +0300)] 
lib-ssl-iostream, global: Remove ssl_iostream_settings.verbose_invalid_cert

The error about invalid certificate will be included in the SSL iostream's
error string, which the caller will eventually log. There's no need to
have a separate warning logged about it.

16 months agolib-ssl-iostream: Change "Received valid SSL certificate" log level to debug
Timo Sirainen [Wed, 14 Jun 2023 10:49:20 +0000 (13:49 +0300)] 
lib-ssl-iostream: Change "Received valid SSL certificate" log level to debug

There's no reason for it to be info-level. Originally it was intendend
only to be logged when client presented a certificate to server, but at
some point it became changed so that outgoing SSL connections always
logged it.

16 months agolib-ssl-iostream: Change ssl_iostream_settings.cert/alt_cert to be context-only
Timo Sirainen [Wed, 14 Jun 2023 09:34:09 +0000 (12:34 +0300)] 
lib-ssl-iostream: Change ssl_iostream_settings.cert/alt_cert to be context-only

For SSL servers they already had to be context-only. For SSL clients the
alt_cert was never used. The cert setting for SSL clients could
alternatively have been changed to stream-only, but that likely isn't
actually useful/necessary.

16 months agolib-ssl-iostream: Change ssl_iostream_settings.verify_remote_cert to be context-only
Timo Sirainen [Wed, 14 Jun 2023 09:28:35 +0000 (12:28 +0300)] 
lib-ssl-iostream: Change ssl_iostream_settings.verify_remote_cert to be context-only

16 months agolib-ssl-iostream: Change several settings to be context-only
Timo Sirainen [Wed, 14 Jun 2023 09:20:47 +0000 (12:20 +0300)] 
lib-ssl-iostream: Change several settings to be context-only

Changed min_protocol, cipher_list, ciphersuites, curve_list,
cert_username_field and prefer_server_ciphers to be context-only.
All the callers were already providing the same ones anyway to both
the context and the stream.

16 months agolib-ssl-iostream: Fix enabling compression
Timo Sirainen [Wed, 14 Jun 2023 08:54:05 +0000 (11:54 +0300)] 
lib-ssl-iostream: Fix enabling compression

ssl_options = compression didn't actually enable compression.
Although even with this option it may not work, since many OpenSSL packages
have been built without support for compression.

16 months agolib-ssl-iostream: Panic if SSL_CTX_set_tlsext_servername_callback() fails
Timo Sirainen [Wed, 14 Jun 2023 10:36:18 +0000 (13:36 +0300)] 
lib-ssl-iostream: Panic if SSL_CTX_set_tlsext_servername_callback() fails

It shouldn't fail in OpenSSL v1.0.2+.

16 months agolib-master: Remove obsolete comment
Timo Sirainen [Mon, 12 Jun 2023 13:47:50 +0000 (16:47 +0300)] 
lib-master: Remove obsolete comment

16 months agolib-master: Clarify master_service_ssl_server_settings groupings with empty lines
Timo Sirainen [Mon, 26 Jun 2023 21:10:39 +0000 (00:10 +0300)] 
lib-master: Clarify master_service_ssl_server_settings groupings with empty lines

16 months agolib-master, global: Move all SSL server-specific settings to master_service_ssl_serve...
Timo Sirainen [Mon, 12 Jun 2023 13:45:53 +0000 (16:45 +0300)] 
lib-master, global: Move all SSL server-specific settings to master_service_ssl_server_settings

16 months agolib-master: Rename ssl_verify_client_cert setting to ssl_request_client_cert
Timo Sirainen [Mon, 12 Jun 2023 12:24:23 +0000 (15:24 +0300)] 
lib-master: Rename ssl_verify_client_cert setting to ssl_request_client_cert

This clarifies how it works. It's only a request - not a requirement.

16 months agolib-master: Split ssl_client_ca out of ssl_ca
Timo Sirainen [Mon, 12 Jun 2023 10:39:54 +0000 (13:39 +0300)] 
lib-master: Split ssl_client_ca out of ssl_ca

ssl_ca is now used only for server side.

ssl_verify_client_cert also had to be moved to server settings side so
ssl_ca could be verified to be non-empty when ssl_verify_client_cert is set.

16 months agolib-ssl-iostream, login-common: Rename ssl_iostream_get_peer_name() to _get_peer_user...
Timo Sirainen [Thu, 8 Jun 2023 20:26:03 +0000 (23:26 +0300)] 
lib-ssl-iostream, login-common: Rename ssl_iostream_get_peer_name() to _get_peer_username()

It's always using the ssl_cert_username_field to get it, so make it
explicit.

16 months agoauth: Change passdb/userdb events' identifier fields
Timo Sirainen [Sat, 24 Jun 2023 21:22:36 +0000 (00:22 +0300)] 
auth: Change passdb/userdb events' identifier fields

Rename "passdb" and "userdb" to "passdb_driver" and "userdb_driver".

Rename "passdb_name" and "userdb_name" to "passdb" and "userdb".
Additionally this no longer replaces empty name with the driver name.
Now that passdb/userdb { .. } require a name anyway, this wasn't really
relevant.

These changes are necessary to allow overriding any settings inside
passdb/userdb { .. } filters.

16 months agoimap-login: Implement client vfunc reload_config()
Karl Fleischmann [Thu, 13 Jul 2023 14:37:50 +0000 (16:37 +0200)] 
imap-login: Implement client vfunc reload_config()

16 months agoimap-login: imap-login-client - Replace casts with container_of() calls
Karl Fleischmann [Tue, 18 Jul 2023 11:32:14 +0000 (13:32 +0200)] 
imap-login: imap-login-client - Replace casts with container_of() calls

16 months agologin-common: client_sni_callback() - Call new reload_config() vfunc
Karl Fleischmann [Thu, 13 Jul 2023 14:36:50 +0000 (16:36 +0200)] 
login-common: client_sni_callback() - Call new reload_config() vfunc

16 months agodoveadm auth -x: Allow either service=name or protocol=name filters
Timo Sirainen [Sat, 24 Jun 2023 21:05:47 +0000 (00:05 +0300)] 
doveadm auth -x: Allow either service=name or protocol=name filters

It's a bit ambiguous which is correct, so allow both. The name is used for
mail_storage_service as "service", but it ends up going to auth as
"protocol".

16 months agoimap-urlauth-worker: Change protocol to "imap"
Timo Sirainen [Mon, 26 Jun 2023 09:06:06 +0000 (12:06 +0300)] 
imap-urlauth-worker: Change protocol to "imap"

The service is "imap-urlauth-worker", but the protocol is still "imap".

16 months agolib-storage: Add %{protocol} variable
Timo Sirainen [Mon, 26 Jun 2023 09:05:57 +0000 (12:05 +0300)] 
lib-storage: Add %{protocol} variable

16 months agodoveadm auth: Set mail_storage_service_input.protocol instead of service
Timo Sirainen [Mon, 26 Jun 2023 09:12:59 +0000 (12:12 +0300)] 
doveadm auth: Set mail_storage_service_input.protocol instead of service

The service will now be "doveadm" for the lookup, while protocol is what is
given in -x protocol parameter.

16 months agolib-storage, global: Add mail_user.protocol and mail_storage_service_input.protocol
Timo Sirainen [Mon, 26 Jun 2023 09:04:21 +0000 (12:04 +0300)] 
lib-storage, global: Add mail_user.protocol and mail_storage_service_input.protocol

It defaults to same as service, but can be overridden.

16 months agolib-storage: shared storage - Preserve shared user's mail_user.service
Timo Sirainen [Mon, 26 Jun 2023 09:01:08 +0000 (12:01 +0300)] 
lib-storage: shared storage - Preserve shared user's mail_user.service

16 months agolib-auth-client, auth: Rename "service" auth field to "protocol"
Timo Sirainen [Sat, 24 Jun 2023 20:59:37 +0000 (23:59 +0300)] 
lib-auth-client, auth: Rename "service" auth field to "protocol"

auth server still accepts "service" for backwards compatibility.

Increased minor auth protocol version to 3 because of this.

16 months agolib-auth-client, global: Rename auth_user_info.service to protocol
Timo Sirainen [Sat, 24 Jun 2023 20:45:37 +0000 (23:45 +0300)] 
lib-auth-client, global: Rename auth_user_info.service to protocol

This makes it clearer that there is some confusion about services and
protocols. They'll be fixed up in following commits.

16 months agolib-auth-client, global: Rename auth_request_info.service to protocol
Timo Sirainen [Sat, 24 Jun 2023 20:41:10 +0000 (23:41 +0300)] 
lib-auth-client, global: Rename auth_request_info.service to protocol

16 months agoauth: Rename %s / %{service} variables to %{protocol}
Timo Sirainen [Sat, 24 Jun 2023 20:35:25 +0000 (23:35 +0300)] 
auth: Rename %s / %{service} variables to %{protocol}

16 months agologin-common: Rename %s / %{service} variable to %{protocol}
Timo Sirainen [Sat, 24 Jun 2023 20:53:58 +0000 (23:53 +0300)] 
login-common: Rename %s / %{service} variable to %{protocol}

16 months agologin-common: Rename "service" event field to "protocol"
Timo Sirainen [Sat, 24 Jun 2023 20:39:06 +0000 (23:39 +0300)] 
login-common: Rename "service" event field to "protocol"

It already contained the protocol (e.g. "imap") rather than the service
(e.g. "imap-login").

16 months agolib-auth-client, auth: Rename "service" event field to "protocol"
Timo Sirainen [Sat, 24 Jun 2023 20:29:09 +0000 (23:29 +0300)] 
lib-auth-client, auth: Rename "service" event field to "protocol"

16 months agoauth: Rename auth_request.service to protocol
Timo Sirainen [Sat, 24 Jun 2023 20:21:26 +0000 (23:21 +0300)] 
auth: Rename auth_request.service to protocol

16 months agolib-oauth2: Rename X-Dovecot-Auth-Service header to X-Dovecot-Auth-Protocol
Timo Sirainen [Sat, 24 Jun 2023 20:19:08 +0000 (23:19 +0300)] 
lib-oauth2: Rename X-Dovecot-Auth-Service header to X-Dovecot-Auth-Protocol

16 months agolib-oauth2, auth: Rename oauth2_request_input.service to protocol
Timo Sirainen [Sat, 24 Jun 2023 20:18:52 +0000 (23:18 +0300)] 
lib-oauth2, auth: Rename oauth2_request_input.service to protocol

16 months agoauth: Rename service settings lookup functions/variables to protocol settings
Timo Sirainen [Sat, 24 Jun 2023 20:09:50 +0000 (23:09 +0300)] 
auth: Rename service settings lookup functions/variables to protocol settings

They already were using protocol name { .. } settings, so it's more correct
to call them "protocol" internally as well.

16 months agoglobal: Rename specific_services to specific_protocols
Timo Sirainen [Sat, 24 Jun 2023 20:13:58 +0000 (23:13 +0300)] 
global: Rename specific_services to specific_protocols

This describes the list of names better.

16 months agoglobal: Use settings_boollist_get() where possible
Timo Sirainen [Fri, 23 Jun 2023 08:37:39 +0000 (11:37 +0300)] 
global: Use settings_boollist_get() where possible

16 months agolib-settings: Add settings_boollist_get()
Timo Sirainen [Fri, 23 Jun 2023 08:32:20 +0000 (11:32 +0300)] 
lib-settings: Add settings_boollist_get()

16 months agolib-settings: Improve parsing strlist/key/child
Timo Sirainen [Thu, 8 Jun 2023 09:45:30 +0000 (12:45 +0300)] 
lib-settings: Improve parsing strlist/key/child

This is invalid in any case, but it's better to parse it as "key/child"
rather than ignoring the "key" part entirely. This was causing some
confusion when "plugin/mail_plugins/quota=yes" was used, since it was
handled the same as "plugin/quota=yes".

16 months agoauth: Change "passdb_mechanisms" setting to boolean-list
Timo Sirainen [Wed, 7 Jun 2023 11:33:00 +0000 (14:33 +0300)] 
auth: Change "passdb_mechanisms" setting to boolean-list

16 months agoauth: Change "auth_mechanisms" setting to boolean-list
Timo Sirainen [Wed, 7 Jun 2023 11:16:48 +0000 (14:16 +0300)] 
auth: Change "auth_mechanisms" setting to boolean-list

16 months agolib-storage: Change "mail_plugins" setting to boolean-list
Timo Sirainen [Wed, 7 Jun 2023 11:09:31 +0000 (14:09 +0300)] 
lib-storage: Change "mail_plugins" setting to boolean-list

16 months agolib, global: module_dir_*load*() - Change module_names to be an array of strings
Timo Sirainen [Wed, 7 Jun 2023 09:44:14 +0000 (12:44 +0300)] 
lib, global: module_dir_*load*() - Change module_names to be an array of strings

16 months agomaster: Change "protocols" setting to boolean-list
Timo Sirainen [Wed, 7 Jun 2023 08:33:52 +0000 (11:33 +0300)] 
master: Change "protocols" setting to boolean-list

16 months agodoveconf: Make empty boolean-list settings visible as empty strings
Timo Sirainen [Thu, 8 Jun 2023 00:44:51 +0000 (03:44 +0300)] 
doveconf: Make empty boolean-list settings visible as empty strings

16 months agolib-settings: Remove unused setting_parser_context.linenum
Timo Sirainen [Thu, 8 Jun 2023 00:29:07 +0000 (03:29 +0300)] 
lib-settings: Remove unused setting_parser_context.linenum

16 months agolib-settings, config: Add boolean-list (SET_BOOLLIST) type
Timo Sirainen [Tue, 6 Jun 2023 22:07:07 +0000 (01:07 +0300)] 
lib-settings, config: Add boolean-list (SET_BOOLLIST) type

The setting can also be configured as a comma/space separated list:

  list = key1 key2

It can further be modified with SET_STRLIST-like syntax:

list {
  key1 = no
  key3 = yes
  key4 = %{variable}
}

THe end result is an array of keys that were "yes". In this case key2, key3
and maybe key4 depending on the variable.

It's possible to have spaces also in keys, e.g.:

list = "key1 with space", key2
list {
  "key3 with space" = yes
}

16 months agolib-settings, config: Prepare "strlist" code/comments to be more generic "list"
Timo Sirainen [Wed, 7 Jun 2023 08:31:54 +0000 (11:31 +0300)] 
lib-settings, config: Prepare "strlist" code/comments to be more generic "list"

16 months agoconfig: Support parsing "quoted key"
Timo Sirainen [Wed, 7 Jun 2023 08:27:29 +0000 (11:27 +0300)] 
config: Support parsing "quoted key"

This will be needed for the boolean-list setting type.

16 months agoconfig: Apply setting_parser_info.default_settings to default config
Timo Sirainen [Wed, 7 Jun 2023 08:23:04 +0000 (11:23 +0300)] 
config: Apply setting_parser_info.default_settings to default config

16 months agolib-ssl-iostream: Don't try to load ssl_iostream_openssl module twice
Timo Sirainen [Wed, 7 Jun 2023 09:35:59 +0000 (12:35 +0300)] 
lib-ssl-iostream: Don't try to load ssl_iostream_openssl module twice

Error handling was also not working as expected, because the first load
attempt already called i_fatal()

Forgotten in fe4058e6f01bf0e104c44815b6df7cfefb80634c

16 months agoglobal: Remove support for building without support for modules
Timo Sirainen [Wed, 7 Jun 2023 08:55:29 +0000 (11:55 +0300)] 
global: Remove support for building without support for modules

dlopen() must be supported now.

16 months agoglobal: Remove remaining traces of userdb nss
Timo Sirainen [Wed, 7 Jun 2023 08:54:29 +0000 (11:54 +0300)] 
global: Remove remaining traces of userdb nss

Forgotten in e1abe6d11a9e63995a7e0ff40261973ebc17ad37

16 months agoconfig: Panic if a string type setting has NULL as default
Timo Sirainen [Wed, 7 Jun 2023 10:58:48 +0000 (13:58 +0300)] 
config: Panic if a string type setting has NULL as default

16 months agomaster: Change *_listener_settings.type default to "" instead of NULL
Timo Sirainen [Wed, 7 Jun 2023 10:58:11 +0000 (13:58 +0300)] 
master: Change *_listener_settings.type default to "" instead of NULL

16 months agoconfig: config_all_parsers_check() - Add data stack frame
Timo Sirainen [Mon, 5 Jun 2023 20:32:01 +0000 (23:32 +0300)] 
config: config_all_parsers_check() - Add data stack frame

16 months agoglobal: Use SET_VALUE_INFINITE for infinite idle_time
Timo Sirainen [Sun, 4 Jun 2023 22:16:43 +0000 (01:16 +0300)] 
global: Use SET_VALUE_INFINITE for infinite idle_time

16 months agolib-settings, config: Add "unlimited" value for uint/size and "infinite" for time...
Timo Sirainen [Sun, 4 Jun 2023 21:48:57 +0000 (00:48 +0300)] 
lib-settings, config: Add "unlimited" value for uint/size and "infinite" for time/time_msecs

This is converted to the maximum size of the number.

16 months agomaster: Remove default_* numeric service settings
Timo Sirainen [Sun, 4 Jun 2023 22:13:37 +0000 (01:13 +0300)] 
master: Remove default_* numeric service settings

The global service_* settings are used instead.

The default_internal_user, default_internal_group and default_login_user
settigs are kept for now, since they're used as variables for listeners.

16 months agoglobal: Remove default service settings from structs
Timo Sirainen [Sun, 4 Jun 2023 22:12:31 +0000 (01:12 +0300)] 
global: Remove default service settings from structs

16 months agoconfig: Don't add numeric default service settings that are 0
Timo Sirainen [Sun, 4 Jun 2023 22:07:07 +0000 (01:07 +0300)] 
config: Don't add numeric default service settings that are 0

This will allow using glboal service_* settings when they're not
explicitly overridden by service { .. } settings.

16 months agoimap: Fix sending unexpanded mail_log_prefix to imap-hibernate
Timo Sirainen [Sun, 4 Jun 2023 20:59:46 +0000 (23:59 +0300)] 
imap: Fix sending unexpanded mail_log_prefix to imap-hibernate

imap-hibernate is supposed to expand it itself, otherwise at least %{pid}
contains the old imap process's pid rather than imap-hibernate's.

Broken by recent changes.

16 months agolib-settings: Remove unnecessary includes and macro
Timo Sirainen [Fri, 2 Jun 2023 20:03:24 +0000 (23:03 +0300)] 
lib-settings: Remove unnecessary includes and macro

16 months agolib-settings: Remove unused settings_parser_dup()
Timo Sirainen [Fri, 2 Jun 2023 20:02:17 +0000 (23:02 +0300)] 
lib-settings: Remove unused settings_parser_dup()

16 months agolib-settings: Remove setting change tracking
Timo Sirainen [Fri, 2 Jun 2023 20:01:01 +0000 (23:01 +0300)] 
lib-settings: Remove setting change tracking

It was used only by config process, which now does it internally.

16 months agolib-settings: Remove SETTING_DEFINE_STRUCT_STR_VARS*() macros
Timo Sirainen [Thu, 1 Jun 2023 21:47:01 +0000 (00:47 +0300)] 
lib-settings: Remove SETTING_DEFINE_STRUCT_STR_VARS*() macros

16 months agoglobal: Replace all STR_VARS settings with STR
Timo Sirainen [Thu, 1 Jun 2023 21:36:13 +0000 (00:36 +0300)] 
global: Replace all STR_VARS settings with STR

16 months agolib: Remove [CONST_]STRUCT_MEMBER_P() macros
Timo Sirainen [Wed, 31 May 2023 21:42:52 +0000 (00:42 +0300)] 
lib: Remove [CONST_]STRUCT_MEMBER_P() macros

Use [CONST_]PTR_OFFSET() instead.

16 months agoglobal: Replace STRUCT_MEMBER_P() with PTR_OFFSET()
Timo Sirainen [Wed, 31 May 2023 21:42:15 +0000 (00:42 +0300)] 
global: Replace STRUCT_MEMBER_P() with PTR_OFFSET()

These macros do the same thing.

16 months agolib-settings, config: Support %variables for all setting types
Timo Sirainen [Wed, 31 May 2023 00:42:16 +0000 (03:42 +0300)] 
lib-settings, config: Support %variables for all setting types

16 months agoconfig: Remove config_module_parser.parser
Timo Sirainen [Wed, 31 May 2023 00:36:30 +0000 (03:36 +0300)] 
config: Remove config_module_parser.parser

16 months agoconfig: test-config-parser - Change to work without config_module_parser.parser
Timo Sirainen [Wed, 31 May 2023 00:19:04 +0000 (03:19 +0300)] 
config: test-config-parser - Change to work without config_module_parser.parser

16 months agoconfig: Build a new setting_parser_context when checking settings
Timo Sirainen [Wed, 31 May 2023 00:07:18 +0000 (03:07 +0300)] 
config: Build a new setting_parser_context when checking settings

16 months agoconfig: config_export_type() - Remove unnecessary parameters
Timo Sirainen [Tue, 30 May 2023 23:38:37 +0000 (02:38 +0300)] 
config: config_export_type() - Remove unnecessary parameters

16 months agoconfig: Export settings without setting_parser_context
Timo Sirainen [Tue, 30 May 2023 22:33:46 +0000 (01:33 +0300)] 
config: Export settings without setting_parser_context

16 months agoconfig: Change setting lookup functions to work without setting_parser_context
Timo Sirainen [Tue, 30 May 2023 21:52:38 +0000 (00:52 +0300)] 
config: Change setting lookup functions to work without setting_parser_context

16 months agoconfig: Expand $setting without setting_parser_context
Timo Sirainen [Tue, 30 May 2023 21:48:49 +0000 (00:48 +0300)] 
config: Expand $setting without setting_parser_context

16 months agoconfig: Track settings in config_module_parser independently of setting_parser_context
Timo Sirainen [Tue, 30 May 2023 21:46:09 +0000 (00:46 +0300)] 
config: Track settings in config_module_parser independently of setting_parser_context

16 months agolib-settings: Replace SETTINGS_EVENT_FILTER_NAME_REQUIRED with settings_try_get()
Timo Sirainen [Tue, 1 Aug 2023 11:29:03 +0000 (14:29 +0300)] 
lib-settings: Replace SETTINGS_EVENT_FILTER_NAME_REQUIRED with settings_try_get()

16 months agolib-settings: Support multiple filter names with strlist
Timo Sirainen [Tue, 1 Aug 2023 11:17:45 +0000 (14:17 +0300)] 
lib-settings: Support multiple filter names with strlist

16 months agolib-settings: Redesign settings override handling
Timo Sirainen [Thu, 8 Jun 2023 00:00:21 +0000 (03:00 +0300)] 
lib-settings: Redesign settings override handling

The previous method had too many assumptions that weren't always correct,
e.g. overriding strlist entries didn't work correctly.

16 months agolib-settings: Split off settings_key_part_find()
Timo Sirainen [Wed, 7 Jun 2023 23:57:40 +0000 (02:57 +0300)] 
lib-settings: Split off settings_key_part_find()

16 months agolib-settings, config: Replace SET_STR to be use %variables
Timo Sirainen [Fri, 26 May 2023 10:44:50 +0000 (13:44 +0300)] 
lib-settings, config: Replace SET_STR to be use %variables

This removes the SET_STR_VARS type, but leaves some macros.

16 months agolib, global: event_filter_merge*() - Support merging also with AND operator
Timo Sirainen [Wed, 7 Jun 2023 21:15:05 +0000 (00:15 +0300)] 
lib, global: event_filter_merge*() - Support merging also with AND operator

16 months agoglobal: Use SET_STR_NOVARS for settings that shouldn't be expanded by config
Timo Sirainen [Fri, 26 May 2023 10:41:30 +0000 (13:41 +0300)] 
global: Use SET_STR_NOVARS for settings that shouldn't be expanded by config

These settings are mostly expanded with explicit var_expand*() calls.
There are also two special cases:
 * log_timestamp - expansion happens with strftime()
 * listen & inet_listener { address } - These have trouble with %scope, so
   at least for now variables are completely disabled for them.

16 months agolib-settings: Add SET_STR_NOVARS type
Timo Sirainen [Fri, 26 May 2023 10:37:42 +0000 (13:37 +0300)] 
lib-settings: Add SET_STR_NOVARS type

This is in preparation for making SET_STR_VARS the default string type,
except for a few problematic cases.

16 months agolib-settings, global: Remove SETTING_STRVAR_* prefix from variable strings
Timo Sirainen [Sun, 28 May 2023 21:06:24 +0000 (00:06 +0300)] 
lib-settings, global: Remove SETTING_STRVAR_* prefix from variable strings

16 months agolib-storage: Track unexpanded_[mail_]location overrides without the use of SETTING_ST...
Timo Sirainen [Sun, 28 May 2023 21:02:21 +0000 (00:02 +0300)] 
lib-storage: Track unexpanded_[mail_]location overrides without the use of SETTING_STRVAR_* prefix

This is in preparation for removing the prefix.

16 months agolib-settings: Remove unused settings_var_expand*()
Timo Sirainen [Sun, 28 May 2023 20:48:23 +0000 (23:48 +0300)] 
lib-settings: Remove unused settings_var_expand*()

16 months agolib-settings: Expand variables without the use of SETTING_STRVAR_* prefix
Timo Sirainen [Sun, 28 May 2023 20:30:33 +0000 (23:30 +0300)] 
lib-settings: Expand variables without the use of SETTING_STRVAR_* prefix

This is in preparation for removing the prefix.

16 months agolib-settings: Apply settings in reverse order of filter specificity
Timo Sirainen [Mon, 29 May 2023 21:02:11 +0000 (00:02 +0300)] 
lib-settings: Apply settings in reverse order of filter specificity

Instead of going from least specific filter to most specific, do it in
reverse. This is going to help with variable expansions in a following
commit.

16 months agolib-settings: Move struct settings_mmap_pool earlier
Timo Sirainen [Mon, 29 May 2023 20:30:34 +0000 (23:30 +0300)] 
lib-settings: Move struct settings_mmap_pool earlier

16 months agolib-settings: settings_override_get_value() - Unalias the returned key
Timo Sirainen [Sun, 4 Jun 2023 21:19:30 +0000 (00:19 +0300)] 
lib-settings: settings_override_get_value() - Unalias the returned key