]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
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
Timo Sirainen [Thu, 13 Apr 2023 21:19:40 +0000 (00:19 +0300)]
lib-master: Rename struct master_service_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_*()
Timo Sirainen [Thu, 13 Apr 2023 21:17:39 +0000 (00:17 +0300)]
lib-master: Rename struct master_settings_mmap to struct settings_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.
Timo Sirainen [Thu, 13 Apr 2023 21:08:58 +0000 (00:08 +0300)]
lib-master: Change master_service_settings_instance_get() to be static
Timo Sirainen [Tue, 18 Apr 2023 10:50:26 +0000 (13:50 +0300)]
lib-storage: Remove unused mail_user.set_instance
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.
Timo Sirainen [Thu, 13 Apr 2023 20:58:07 +0000 (23:58 +0300)]
lib-storage, lmtp: Set MASTER_SERVICE_SETTINGS_INSTANCE for events
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.
Timo Sirainen [Thu, 13 Apr 2023 20:49:43 +0000 (23:49 +0300)]
global: Use more specific events for settings lookups
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.
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.
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
Timo Sirainen [Mon, 3 Apr 2023 18:12:58 +0000 (21:12 +0300)]
lib-test: Add test_create_temp_fd()
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.
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.
Timo Sirainen [Fri, 31 Mar 2023 22:40:04 +0000 (01:40 +0300)]
doveconf: Remove -e parameter from getopt string
Forgotten in
649ab77ece61bee900e9c39b4db24f09fbc22590
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.
Timo Sirainen [Wed, 29 Mar 2023 21:43:27 +0000 (00:43 +0300)]
config: Remove now unused disable-check-settings request parameter
Timo Sirainen [Wed, 29 Mar 2023 21:43:13 +0000 (00:43 +0300)]
doveconf: Remove now unused -E parameter to disable settings checks
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.
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
Timo Sirainen [Wed, 29 Mar 2023 22:51:36 +0000 (01:51 +0300)]
config: Delay handling settings check errors 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.
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.
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.
Timo Sirainen [Tue, 4 Apr 2023 10:18:08 +0000 (13:18 +0300)]
config: Unlink temporary binary config file on failure
Timo Sirainen [Wed, 29 Mar 2023 18:35:31 +0000 (21:35 +0300)]
lib-master: Avoid duplicates in master_service_settings_output.specific_services
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.
Timo Sirainen [Tue, 28 Mar 2023 16:40:31 +0000 (19:40 +0300)]
config: Move config_dump_full_write_filter() earlier
Timo Sirainen [Tue, 28 Mar 2023 00:22:13 +0000 (03:22 +0300)]
config: Rename config_export_parsers() to config_export_set_parsers()
Timo Sirainen [Tue, 28 Mar 2023 00:18:13 +0000 (03:18 +0300)]
config: Handle config_export_by_filter() failures earlier
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
Timo Sirainen [Tue, 28 Mar 2023 00:01:42 +0000 (03:01 +0300)]
config: Rename config_export_finish() to config_export_all_parsers()
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.
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.
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.
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.
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
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).
Timo Sirainen [Wed, 15 Mar 2023 14:02:05 +0000 (16:02 +0200)]
lib-master: Log a warning about leaked settings structs at deinit
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.
Timo Sirainen [Mon, 27 Mar 2023 10:10:01 +0000 (13:10 +0300)]
auth: Stop reading settings multiple times
Timo Sirainen [Fri, 10 Mar 2023 23:15:25 +0000 (01:15 +0200)]
lib-storage, lda: Remove unused MAIL_STORAGE_SERVICE_FLAG_USE_SYSEXITS
Timo Sirainen [Fri, 10 Mar 2023 23:15:04 +0000 (01:15 +0200)]
lib-storage: Remove unused mail_storage_service_read_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.
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
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.
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.
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()
Timo Sirainen [Thu, 9 Mar 2023 22:08:21 +0000 (00:08 +0200)]
lib-master: Use settings_parse_keyvalue_nodup()
Timo Sirainen [Thu, 9 Mar 2023 22:07:38 +0000 (00:07 +0200)]
lib-settings: Add settings_parse_keyvalue_nodup()
Timo Sirainen [Thu, 9 Mar 2023 13:00:59 +0000 (15:00 +0200)]
lib-settings: Remove internal code for multiple settings roots
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.
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
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.
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.
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.
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.
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()
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.
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.
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.
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.
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.
Timo Sirainen [Tue, 7 Mar 2023 12:39:09 +0000 (14:39 +0200)]
lib-master: Delay settings parsing until master_service_settings_*get()
Timo Sirainen [Tue, 7 Mar 2023 12:21:30 +0000 (14:21 +0200)]
lib-master: Change master_service_settings_find() to be static
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.
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()
Timo Sirainen [Mon, 6 Mar 2023 15:36:57 +0000 (17:36 +0200)]
lib-master: Split master_settings_mmap parsing from applying the settings
Timo Sirainen [Mon, 6 Mar 2023 15:21:50 +0000 (17:21 +0200)]
lib-master: Store filters in struct master_settings_mmap
Timo Sirainen [Mon, 6 Mar 2023 14:52:11 +0000 (16:52 +0200)]
lib-master: Remove unused config_cache_size setting
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[]
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[]
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.
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
Timo Sirainen [Mon, 6 Mar 2023 14:37:27 +0000 (16:37 +0200)]
lib-master, global: Prepare master_service_set() for type parameter
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.
Timo Sirainen [Wed, 8 Mar 2023 13:27:23 +0000 (15:27 +0200)]
lib-storage: Remove unused mail_storage_service_user_set_setting()
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()
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.
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.
Timo Sirainen [Tue, 7 Feb 2023 22:46:18 +0000 (00:46 +0200)]
doveadm, lmtp: Use mail_storage_service_user_set_setting()
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
Timo Sirainen [Tue, 7 Feb 2023 22:25:37 +0000 (00:25 +0200)]
lib-master: Add master_service_settings_find()
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.
Timo Sirainen [Tue, 7 Feb 2023 21:46:21 +0000 (23:46 +0200)]
lib-master: Remove unused master_service_get_settings_parser()
Timo Sirainen [Tue, 7 Feb 2023 22:23:21 +0000 (00:23 +0200)]
lib-settings: Remove unused settings_parse_is_valid_key()
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.
Timo Sirainen [Tue, 7 Feb 2023 22:11:01 +0000 (00:11 +0200)]
lib-storage: Use mail_storage_service_user_set_setting() where possible
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.
Timo Sirainen [Tue, 4 Apr 2023 10:09:41 +0000 (13:09 +0300)]
lib-storage: Cleanup - Change set_keyvalue() to return error_r
Timo Sirainen [Tue, 7 Feb 2023 22:06:04 +0000 (00:06 +0200)]
lib-storage: Cleanup - parse userdb settings with settings_parse_keyvalue()
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.
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.
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.
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.
Timo Sirainen [Fri, 20 Jan 2023 20:25:27 +0000 (22:25 +0200)]
lib-storage: Remove unused mail_user_var_expand()
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.