]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
21 months agolib-master, global: Rename struct master_service_settings_instance to settings_instance
Timo Sirainen [Thu, 13 Apr 2023 21:25:04 +0000 (00:25 +0300)] 
lib-master, global: Rename struct master_service_settings_instance to settings_instance

21 months agolib-master: Rename struct master_service_mmap_* to settings_mmap_*
Timo Sirainen [Thu, 13 Apr 2023 21:19:40 +0000 (00:19 +0300)] 
lib-master: Rename struct master_service_mmap_* to settings_mmap_*

21 months agolib-master: Rename master_service_settings_mmap_*() to settings_mmap_*()
Timo Sirainen [Thu, 13 Apr 2023 21:28:25 +0000 (00:28 +0300)] 
lib-master: Rename master_service_settings_mmap_*() to settings_mmap_*()

21 months agolib-master: Rename struct master_settings_mmap to struct settings_mmap
Timo Sirainen [Thu, 13 Apr 2023 21:17:39 +0000 (00:17 +0300)] 
lib-master: Rename struct master_settings_mmap to struct settings_mmap

21 months agolib-master: Rename config_mmap variables to mmap
Timo Sirainen [Thu, 13 Apr 2023 21:15:48 +0000 (00:15 +0300)] 
lib-master: Rename config_mmap variables to mmap

master_service.config_mmap is kept for now.

21 months agolib-master: Change master_service_settings_instance_get() to be static
Timo Sirainen [Thu, 13 Apr 2023 21:08:58 +0000 (00:08 +0300)] 
lib-master: Change master_service_settings_instance_get() to be static

21 months agolib-storage: Remove unused mail_user.set_instance
Timo Sirainen [Tue, 18 Apr 2023 10:50:26 +0000 (13:50 +0300)] 
lib-storage: Remove unused mail_user.set_instance

21 months agoglobal: Replace master_service_settings_instance_get() calls with master_service_sett...
Timo Sirainen [Thu, 13 Apr 2023 21:07:28 +0000 (00:07 +0300)] 
global: Replace master_service_settings_instance_get() calls with master_service_settings_get()

This is now possible because the lookup event has
MASTER_SERVICE_SETTINGS_INSTANCE set.

21 months agolib-storage, lmtp: Set MASTER_SERVICE_SETTINGS_INSTANCE for events
Timo Sirainen [Thu, 13 Apr 2023 20:58:07 +0000 (23:58 +0300)] 
lib-storage, lmtp: Set MASTER_SERVICE_SETTINGS_INSTANCE for events

21 months agolib-master: master_service_settings_get() - Use instance from event if it exists
Timo Sirainen [Thu, 13 Apr 2023 20:57:27 +0000 (23:57 +0300)] 
lib-master: master_service_settings_get() - Use instance from event if it exists

Added MASTER_SERVICE_SETTINGS_INSTANCE that can be used to set the instance
to events.

21 months agoglobal: Use more specific events for settings lookups
Timo Sirainen [Thu, 13 Apr 2023 20:49:43 +0000 (23:49 +0300)] 
global: Use more specific events for settings lookups

21 months agolib-settings, global: Rename settings.[ch] to settings-legacy.[ch]
Timo Sirainen [Sat, 8 Apr 2023 12:43:26 +0000 (15:43 +0300)] 
lib-settings, global: Rename settings.[ch] to settings-legacy.[ch]

It will eventually be removed, so don't bother changing the function names.

21 months agolib-master: Add test-master-service-settings unit test
Timo Sirainen [Mon, 3 Apr 2023 19:21:29 +0000 (22:21 +0300)] 
lib-master: Add test-master-service-settings unit test

Initially it tests all the error code paths in binary config file reading.

21 months agoglobal: unit tests - Use test_create_temp_fd() instead of reimplementing it
Timo Sirainen [Mon, 3 Apr 2023 18:13:27 +0000 (21:13 +0300)] 
global: unit tests - Use test_create_temp_fd() instead of reimplementing it

21 months agolib-test: Add test_create_temp_fd()
Timo Sirainen [Mon, 3 Apr 2023 18:12:58 +0000 (21:12 +0300)] 
lib-test: Add test_create_temp_fd()

21 months agolib-settings: Remove unused settings_parse_set_key[s]_expanded()
Timo Sirainen [Mon, 3 Apr 2023 14:39:16 +0000 (17:39 +0300)] 
lib-settings: Remove unused settings_parse_set_key[s]_expanded()

If these are ever needed to be added back, they should be fixed to handle
SET_ALIAS correctly.

21 months agodoveconf: Add -w parameter to hide warnings about obsolete settings
Timo Sirainen [Fri, 31 Mar 2023 22:40:51 +0000 (01:40 +0300)] 
doveconf: Add -w parameter to hide warnings about obsolete settings

This is used by managesieve's dump-capability to avoid logging them twice.

21 months agodoveconf: Remove -e parameter from getopt string
Timo Sirainen [Fri, 31 Mar 2023 22:40:04 +0000 (01:40 +0300)] 
doveconf: Remove -e parameter from getopt string

Forgotten in 649ab77ece61bee900e9c39b4db24f09fbc22590

21 months agomaster: Don't delay settings errors at startup
Timo Sirainen [Fri, 31 Mar 2023 21:36:39 +0000 (00:36 +0300)] 
master: Don't delay settings errors at startup

Recent change added delayed errors, which are useful for doveadm/etc, but
they are confusing/harmful for the dovecot startup.

21 months agoconfig: Remove now unused disable-check-settings request parameter
Timo Sirainen [Wed, 29 Mar 2023 21:43:27 +0000 (00:43 +0300)] 
config: Remove now unused disable-check-settings request parameter

21 months agodoveconf: Remove now unused -E parameter to disable settings checks
Timo Sirainen [Wed, 29 Mar 2023 21:43:13 +0000 (00:43 +0300)] 
doveconf: Remove now unused -E parameter to disable settings checks

21 months agolib-master, global: Remove master_service_settings_input.disable_check_settings
Timo Sirainen [Wed, 29 Mar 2023 21:40:45 +0000 (00:40 +0300)] 
lib-master, global: Remove master_service_settings_input.disable_check_settings

This is no longer necessary.

21 months agoconfig: Remove kludge to skip SSL server settings with doveadm
Timo Sirainen [Wed, 29 Mar 2023 21:31:42 +0000 (00:31 +0300)] 
config: Remove kludge to skip SSL server settings with doveadm

The previous changes make this unnecessary. The SSL server setting read
failures are delayed until they are attempted to be used, but doveadm
won't actually try to use them.

Reverts 310f9fac3abe5e9889262bd679af67343c8b4af0

21 months agoconfig: Delay handling settings check errors when doing "full" config lookups
Timo Sirainen [Wed, 29 Mar 2023 22:51:36 +0000 (01:51 +0300)] 
config: Delay handling settings check errors when doing "full" config lookups

21 months agoconfig: Delay handling errors in settings values when doing "full" config lookups
Timo Sirainen [Wed, 29 Mar 2023 21:28:15 +0000 (00:28 +0300)] 
config: Delay handling errors in settings values when doing "full" config lookups

The config client is responsible for giving error. However, if the config
client never accesses the setting struct, no error is reported.

21 months agolib-master: Check that settings blobs in config binary format end with NUL
Timo Sirainen [Mon, 3 Apr 2023 11:47:02 +0000 (14:47 +0300)] 
lib-master: Check that settings blobs in config binary format end with NUL

This allows using strlen() safely later on.

21 months agoconfig, lib-master: Optimize binary config format - split settings blocks by their...
Timo Sirainen [Tue, 28 Mar 2023 21:44:43 +0000 (00:44 +0300)] 
config, lib-master: Optimize binary config format - split settings blocks by their structs

This allows looking up settings only for the requested settings struct
without reading all the other settings as well.

Additionally this new format allows delaying error handling. For example
if "ssl_key = <path" handling can't open the path because it doesn't have
permissions, the error is delayed until SSL server settings are actually
used by the config client. This is beneficial when the client never even
attempts to use the SSL server settings, in which case the lack of
permission is irrelevant and no error is ever seen. This example
behavior doesn't actually yet work in this commit though.

21 months agoconfig: Unlink temporary binary config file on failure
Timo Sirainen [Tue, 4 Apr 2023 10:18:08 +0000 (13:18 +0300)] 
config: Unlink temporary binary config file on failure

21 months agolib-master: Avoid duplicates in master_service_settings_output.specific_services
Timo Sirainen [Wed, 29 Mar 2023 18:35:31 +0000 (21:35 +0300)] 
lib-master: Avoid duplicates in master_service_settings_output.specific_services

21 months agoconfig: Split off config_export_parser()
Timo Sirainen [Tue, 28 Mar 2023 00:07:41 +0000 (03:07 +0300)] 
config: Split off config_export_parser()

Also add config_export_get_parser_count() and
config_export_parser_get_info(), which are related to it.

21 months agoconfig: Move config_dump_full_write_filter() earlier
Timo Sirainen [Tue, 28 Mar 2023 16:40:31 +0000 (19:40 +0300)] 
config: Move config_dump_full_write_filter() earlier

21 months agoconfig: Rename config_export_parsers() to config_export_set_parsers()
Timo Sirainen [Tue, 28 Mar 2023 00:22:13 +0000 (03:22 +0300)] 
config: Rename config_export_parsers() to config_export_set_parsers()

21 months agoconfig: Handle config_export_by_filter() failures earlier
Timo Sirainen [Tue, 28 Mar 2023 00:18:13 +0000 (03:18 +0300)] 
config: Handle config_export_by_filter() failures earlier

21 months agoconfig: Make config_export_free() public and use it for aborting export
Timo Sirainen [Tue, 28 Mar 2023 00:10:06 +0000 (03:10 +0300)] 
config: Make config_export_free() public and use it for aborting export

21 months agoconfig: Rename config_export_finish() to config_export_all_parsers()
Timo Sirainen [Tue, 28 Mar 2023 00:01:42 +0000 (03:01 +0300)] 
config: Rename config_export_finish() to config_export_all_parsers()

21 months agolib-settings, global: Convert setting_parser_info.module_name to a unique name
Timo Sirainen [Mon, 27 Mar 2023 23:14:35 +0000 (02:14 +0300)] 
lib-settings, global: Convert setting_parser_info.module_name to a unique name

This unique name will be used by the binary config file format in the
following commits.

21 months agoconfig: get_setting() - panic if setting isn't found
Timo Sirainen [Mon, 27 Mar 2023 23:32:54 +0000 (02:32 +0300)] 
config: get_setting() - panic if setting isn't found

This function is used only for settings that are expected to be found.
Panic makes it easier to notice if there are typos.

21 months agoglobal: Use setting_parser_info.parent only for structs that are used as arrays
Timo Sirainen [Mon, 27 Mar 2023 23:52:42 +0000 (02:52 +0300)] 
global: Use setting_parser_info.parent only for structs that are used as arrays

This will be needed by the following commits, although the whole
parent-child relationship will go away in later commits.

21 months agodoveadm: Remove explicitly set master_service_settings_input.protocol
Timo Sirainen [Fri, 31 Mar 2023 21:03:57 +0000 (00:03 +0300)] 
doveadm: Remove explicitly set master_service_settings_input.protocol

It is now unnecessary.

21 months agolib-master: If master_service_settings_input.protocol isn't set, default to master_se...
Timo Sirainen [Fri, 31 Mar 2023 21:03:17 +0000 (00:03 +0300)] 
lib-master: If master_service_settings_input.protocol isn't set, default to master_service.name

21 months agolib-master, global: Rename master_service_settings_input.service to protocol
Timo Sirainen [Fri, 31 Mar 2023 20:57:37 +0000 (23:57 +0300)] 
lib-master, global: Rename master_service_settings_input.service to protocol

It is actually protocol, although the only place where they differ is login
processes (service=imap-login, protocol=imap).

21 months agolib-master: Log a warning about leaked settings structs at deinit
Timo Sirainen [Wed, 15 Mar 2023 14:02:05 +0000 (16:02 +0200)] 
lib-master: Log a warning about leaked settings structs at deinit

21 months agolib-master: Delay setting master_service to NULL
Timo Sirainen [Mon, 27 Mar 2023 21:46:26 +0000 (00:46 +0300)] 
lib-master: Delay setting master_service to NULL

This will be required by the following changes.

21 months agoauth: Stop reading settings multiple times
Timo Sirainen [Mon, 27 Mar 2023 10:10:01 +0000 (13:10 +0300)] 
auth: Stop reading settings multiple times

21 months agolib-storage, lda: Remove unused MAIL_STORAGE_SERVICE_FLAG_USE_SYSEXITS
Timo Sirainen [Fri, 10 Mar 2023 23:15:25 +0000 (01:15 +0200)] 
lib-storage, lda: Remove unused MAIL_STORAGE_SERVICE_FLAG_USE_SYSEXITS

21 months agolib-storage: Remove unused mail_storage_service_read_settings()
Timo Sirainen [Fri, 10 Mar 2023 23:15:04 +0000 (01:15 +0200)] 
lib-storage: Remove unused mail_storage_service_read_settings()

21 months agolib-storage: mail_storage_service_lookup*() - Stop reading settings
Timo Sirainen [Fri, 10 Mar 2023 23:12:33 +0000 (01:12 +0200)] 
lib-storage: mail_storage_service_lookup*() - Stop reading settings

The caller is now expected to have read them already.

21 months agoglobal: Stop assuming mail_storage_service_lookup*() is going to read settings
Timo Sirainen [Fri, 10 Mar 2023 23:11:28 +0000 (01:11 +0200)] 
global: Stop assuming mail_storage_service_lookup*() is going to read settings

21 months agolib-storage: mail_storage_service_init_settings() - Stop reading settings
Timo Sirainen [Fri, 10 Mar 2023 22:59:19 +0000 (00:59 +0200)] 
lib-storage: mail_storage_service_init_settings() - Stop reading settings

The settings should already have been read. Just access them.

21 months agolmtp: Replace mail_storage_service_read_settings() with master_service_settings_insta...
Timo Sirainen [Fri, 10 Mar 2023 22:55:44 +0000 (00:55 +0200)] 
lmtp: Replace mail_storage_service_read_settings() with master_service_settings_instance_new()

There's no need to actually read the settings, since they're already read.
LMTP client just needs a settings instance.

21 months agoquota-status: Replace mail_storage_service_read_settings() with master_service_settin...
Timo Sirainen [Fri, 10 Mar 2023 22:55:13 +0000 (00:55 +0200)] 
quota-status: Replace mail_storage_service_read_settings() with master_service_settings_read_simple()

21 months agolib-master: Use settings_parse_keyvalue_nodup()
Timo Sirainen [Thu, 9 Mar 2023 22:08:21 +0000 (00:08 +0200)] 
lib-master: Use settings_parse_keyvalue_nodup()

21 months agolib-settings: Add settings_parse_keyvalue_nodup()
Timo Sirainen [Thu, 9 Mar 2023 22:07:38 +0000 (00:07 +0200)] 
lib-settings: Add settings_parse_keyvalue_nodup()

21 months agolib-settings: Remove internal code for multiple settings roots
Timo Sirainen [Thu, 9 Mar 2023 13:00:59 +0000 (15:00 +0200)] 
lib-settings: Remove internal code for multiple settings roots

21 months agolib-settings, global: Replace settings_parser_get_root_set() with settings_parser_get...
Timo Sirainen [Wed, 8 Mar 2023 15:12:04 +0000 (17:12 +0200)] 
lib-settings, global: Replace settings_parser_get_root_set() with settings_parser_get_set()

There is only one root now, so the root parameter isn't necessary.

21 months agolib-settings: Remove ability to use multiple roots in setting_parser_context
Timo Sirainen [Wed, 8 Mar 2023 15:06:52 +0000 (17:06 +0200)] 
lib-settings: Remove ability to use multiple roots in setting_parser_context

21 months agolib-storage: Unwrap set_keyval() wrapper function
Timo Sirainen [Wed, 8 Mar 2023 14:59:02 +0000 (16:59 +0200)] 
lib-storage: Unwrap set_keyval() wrapper function

It had become a very small wrapper, and the code is clearer without it.

21 months agolib-master, global: master_service_set() - Remove error handling
Timo Sirainen [Wed, 8 Mar 2023 14:56:20 +0000 (16:56 +0200)] 
lib-master, global: master_service_set() - Remove error handling

This function can no longer fail.

21 months agolib-master, lib-storage: Remove unused fields from master_service_settings_input
Timo Sirainen [Wed, 8 Mar 2023 14:50:29 +0000 (16:50 +0200)] 
lib-master, lib-storage: Remove unused fields from master_service_settings_input

The username, local_ip and remote_ip are now looked up with the
master_service_settings_get() calls rather than at this early stage.

21 months agomail-crypt: Stop reading settings
Timo Sirainen [Wed, 8 Mar 2023 15:01:38 +0000 (17:01 +0200)] 
mail-crypt: Stop reading settings

The settings can now be accessed without reading them again.

21 months agodoveadm: Stop reading per-connection settings
Timo Sirainen [Wed, 8 Mar 2023 14:49:35 +0000 (16:49 +0200)] 
doveadm: Stop reading per-connection settings

This is no longer necessary. The filtering is done by
master_service_settings_get()

21 months agodoveadm: Add local_ip and remote_ip fields to connection event
Timo Sirainen [Wed, 8 Mar 2023 14:48:30 +0000 (16:48 +0200)] 
doveadm: Add local_ip and remote_ip fields to connection event

These will be required to preserve support for local {) and remote {}
config filters after the following change.

21 months agologin-common: Stop reading per-connection settings
Timo Sirainen [Wed, 8 Mar 2023 14:44:49 +0000 (16:44 +0200)] 
login-common: Stop reading per-connection settings

This is no longer necessary. The filtering is done by
master_service_settings_get().

This commit also adds "local_name" field to client's event when TLS SNI is
used.

21 months agolib-storage: Remove mail_storage_vfuncs.get_setting_parser_info()
Timo Sirainen [Wed, 8 Mar 2023 14:39:02 +0000 (16:39 +0200)] 
lib-storage: Remove mail_storage_vfuncs.get_setting_parser_info()

This is no longer necessary.

21 months agolib-storage, global: Remove "settings roots"
Timo Sirainen [Wed, 8 Mar 2023 14:33:03 +0000 (16:33 +0200)] 
lib-storage, global: Remove "settings roots"

These were no longer used for anything.

21 months agolib-master, global: Remove "settings roots"
Timo Sirainen [Wed, 8 Mar 2023 14:27:03 +0000 (16:27 +0200)] 
lib-master, global: Remove "settings roots"

It's no longer necessary to know what settings the process will use.

21 months agolib-master: Delay settings parsing until master_service_settings_*get()
Timo Sirainen [Tue, 7 Mar 2023 12:39:09 +0000 (14:39 +0200)] 
lib-master: Delay settings parsing until master_service_settings_*get()

21 months agolib-master: Change master_service_settings_find() to be static
Timo Sirainen [Tue, 7 Mar 2023 12:21:30 +0000 (14:21 +0200)] 
lib-master: Change master_service_settings_find() to be static

21 months agolib-master, lib-storage: Move key+=append and plugin/ handling to lib-master
Timo Sirainen [Tue, 7 Mar 2023 12:19:20 +0000 (14:19 +0200)] 
lib-master, lib-storage: Move key+=append and plugin/ handling to lib-master

This is necessary because all settings roots won't be known after following
changes. The plugin/ handling should eventually go away once all plugin
settings have been converted.

21 months agolib-master, lib-storage: Move -o parameter checks inside master_service_set()
Timo Sirainen [Tue, 7 Mar 2023 11:53:43 +0000 (13:53 +0200)] 
lib-master, lib-storage: Move -o parameter checks inside master_service_set()

21 months agolib-master: Split master_settings_mmap parsing from applying the settings
Timo Sirainen [Mon, 6 Mar 2023 15:36:57 +0000 (17:36 +0200)] 
lib-master: Split master_settings_mmap parsing from applying the settings

21 months agolib-master: Store filters in struct master_settings_mmap
Timo Sirainen [Mon, 6 Mar 2023 15:21:50 +0000 (17:21 +0200)] 
lib-master: Store filters in struct master_settings_mmap

21 months agolib-master: Remove unused config_cache_size setting
Timo Sirainen [Mon, 6 Mar 2023 14:52:11 +0000 (16:52 +0200)] 
lib-master: Remove unused config_cache_size setting

21 months agoconfig: old-set-parser - Move imap_id_log handling to removed_settings[]
Timo Sirainen [Mon, 3 Apr 2023 11:28:28 +0000 (14:28 +0300)] 
config: old-set-parser - Move imap_id_log handling to removed_settings[]

21 months agoconfig: old-set-parser - Move login_access_sockets handling to removed_settings[]
Timo Sirainen [Mon, 3 Apr 2023 11:26:21 +0000 (14:26 +0300)] 
config: old-set-parser - Move login_access_sockets handling to removed_settings[]

21 months agoconfig: old-set-parser - Merge "key is no longer needed" settings into "key has been...
Timo Sirainen [Mon, 3 Apr 2023 11:22:44 +0000 (14:22 +0300)] 
config: old-set-parser - Merge "key is no longer needed" settings into "key has been removed" settings

There's not much of a difference between these.

21 months agoconfig: old-set-parser - Move removed settings into an removed_settings[] array
Timo Sirainen [Mon, 3 Apr 2023 11:21:22 +0000 (14:21 +0300)] 
config: old-set-parser - Move removed settings into an removed_settings[] array

21 months agolib-master, global: Prepare master_service_set() for type parameter
Timo Sirainen [Mon, 6 Mar 2023 14:37:27 +0000 (16:37 +0200)] 
lib-master, global: Prepare master_service_set() for type parameter

21 months agolib-master, global: Introduce master_service_settings_instance
Timo Sirainen [Tue, 7 Feb 2023 23:27:54 +0000 (01:27 +0200)] 
lib-master, global: Introduce master_service_settings_instance

This commit mainly consists of renaming "settings parser" to "settings
instance" in various variables and function names. The following commits
make it more useful.

21 months agolib-storage: Remove unused mail_storage_service_user_set_setting()
Timo Sirainen [Wed, 8 Mar 2023 13:27:23 +0000 (15:27 +0200)] 
lib-storage: Remove unused mail_storage_service_user_set_setting()

21 months agoglobal: Replace mail_storage_service_user_set_setting() calls with master_service_set()
Timo Sirainen [Wed, 8 Mar 2023 13:26:55 +0000 (15:26 +0200)] 
global: Replace mail_storage_service_user_set_setting() calls with master_service_set()

21 months agolib-storage: Don't keep mail_user.set_parser referenced
Timo Sirainen [Tue, 7 Feb 2023 23:25:47 +0000 (01:25 +0200)] 
lib-storage: Don't keep mail_user.set_parser referenced

It's always just a direct pointer to service_userr->set_parser, so the
reference isn't needed. Also the following changes will change this to
a non-reference counted "settings instance", which makes this change
necessary.

21 months agolib-storage, global: mail_storage_service_read_settings() - Return duplicated parser
Timo Sirainen [Tue, 7 Feb 2023 23:11:53 +0000 (01:11 +0200)] 
lib-storage, global: mail_storage_service_read_settings() - Return duplicated parser

This will simplify following changes.

21 months agodoveadm, lmtp: Use mail_storage_service_user_set_setting()
Timo Sirainen [Tue, 7 Feb 2023 22:46:18 +0000 (00:46 +0200)] 
doveadm, lmtp: Use mail_storage_service_user_set_setting()

21 months agolib-storage: Replace direct settings-parser API calls with lib-master API
Timo Sirainen [Tue, 7 Feb 2023 22:27:50 +0000 (00:27 +0200)] 
lib-storage: Replace direct settings-parser API calls with lib-master API

21 months agolib-master: Add master_service_settings_find()
Timo Sirainen [Tue, 7 Feb 2023 22:25:37 +0000 (00:25 +0200)] 
lib-master: Add master_service_settings_find()

21 months agolib-master: Change master_service_set() API
Timo Sirainen [Tue, 7 Feb 2023 21:55:26 +0000 (23:55 +0200)] 
lib-master: Change master_service_set() API

It wasn't currently used by core, and this API makes it close to what we
want it to be eventually.

21 months agolib-master: Remove unused master_service_get_settings_parser()
Timo Sirainen [Tue, 7 Feb 2023 21:46:21 +0000 (23:46 +0200)] 
lib-master: Remove unused master_service_get_settings_parser()

21 months agolib-settings: Remove unused settings_parse_is_valid_key()
Timo Sirainen [Tue, 7 Feb 2023 22:23:21 +0000 (00:23 +0200)] 
lib-settings: Remove unused settings_parse_is_valid_key()

21 months agolib-storage: Avoid separate settings_parse_is_valid_key() call
Timo Sirainen [Tue, 7 Feb 2023 22:22:44 +0000 (00:22 +0200)] 
lib-storage: Avoid separate settings_parse_is_valid_key() call

The same information can be found with settings_parse_get_value().
This will simplify the following changes.

21 months agolib-storage: Use mail_storage_service_user_set_setting() where possible
Timo Sirainen [Tue, 7 Feb 2023 22:11:01 +0000 (00:11 +0200)] 
lib-storage: Use mail_storage_service_user_set_setting() where possible

21 months agolib-storage: Fail if userdb returns key+=value for non-string
Timo Sirainen [Tue, 7 Feb 2023 22:19:30 +0000 (00:19 +0200)] 
lib-storage: Fail if userdb returns key+=value for non-string

Previously an error was logged, but the user initialization didn't fail.
However, it's safer to fail since it's a bad configuration.

21 months agolib-storage: Cleanup - Change set_keyvalue() to return error_r
Timo Sirainen [Tue, 4 Apr 2023 10:09:41 +0000 (13:09 +0300)] 
lib-storage: Cleanup - Change set_keyvalue() to return error_r

21 months agolib-storage: Cleanup - parse userdb settings with settings_parse_keyvalue()
Timo Sirainen [Tue, 7 Feb 2023 22:06:04 +0000 (00:06 +0200)] 
lib-storage: Cleanup - parse userdb settings with settings_parse_keyvalue()

21 months agolib-settings: Don't allocate settings error from parser pool
Timo Sirainen [Mon, 23 Jan 2023 23:36:56 +0000 (01:36 +0200)] 
lib-settings: Don't allocate settings error from parser pool

This avoids wasting memory if caller wants to ignore errors and continue
parsing.

21 months agolib-storage: Rename unexpanded_set_parsers to set_parsers
Timo Sirainen [Sun, 22 Jan 2023 16:29:38 +0000 (18:29 +0200)] 
lib-storage: Rename unexpanded_set_parsers to set_parsers

The settings are no longer expanded inside set_parsers, so they're always
unexpanded.

21 months agolib-storage: Don't duplicate mail_user.set_parser
Timo Sirainen [Sun, 22 Jan 2023 16:27:39 +0000 (18:27 +0200)] 
lib-storage: Don't duplicate mail_user.set_parser

It's always a pointer to mail_storage_service_user.set_parser, which is
already user-specific.

21 months agolmtp: Rename unexpanded_lda_set to lda_set
Timo Sirainen [Sun, 22 Jan 2023 16:18:17 +0000 (18:18 +0200)] 
lmtp: Rename unexpanded_lda_set to lda_set

Also expand them, although there are currently no STR_VARS settings to be
expanded.

21 months agolib-storage: Remove unused mail_user_var_expand()
Timo Sirainen [Fri, 20 Jan 2023 20:25:27 +0000 (22:25 +0200)] 
lib-storage: Remove unused mail_user_var_expand()

21 months agolib-storage, global: Move settings expansion out of mail_user_init()
Timo Sirainen [Fri, 20 Jan 2023 20:15:22 +0000 (22:15 +0200)] 
lib-storage, global: Move settings expansion out of mail_user_init()

master_service_settings_parser_get() calls can now decide whether to expand
settings or not.