]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Wed, 26 Apr 2023 11:45:28 +0000 (14:45 +0300)]
config: Rename config_module_parser.error to delayed_error
Timo Sirainen [Wed, 26 Apr 2023 11:32:12 +0000 (14:32 +0300)]
config: Replace global config_filter variable with local/static ones
It is still a static variable in some cases, but that's still more
manageable.
Timo Sirainen [Wed, 26 Apr 2023 11:30:39 +0000 (14:30 +0300)]
config: config_dump_full() - Add config_filter parameter
Use the parameter instead of global variable.
Timo Sirainen [Wed, 26 Apr 2023 11:24:03 +0000 (14:24 +0300)]
config: config_export_by_filter() - Add config_filter parameter
Use the parameter instead of global variable.
Timo Sirainen [Wed, 26 Apr 2023 11:22:16 +0000 (14:22 +0300)]
config: config_parse_file() - Return config_filter instead of setting it globally
Timo Sirainen [Tue, 25 Apr 2023 12:30:43 +0000 (15:30 +0300)]
config: Run settings check_func()s individually for each filter sections
The previous behavior was to apply parent filters as well before running the
check_func()s. This is currently causing too much complexity for the code to
be worth it though.
Timo Sirainen [Fri, 28 Apr 2023 13:12:08 +0000 (16:12 +0300)]
doveconf: Remove unnecessary "static" from variables
Timo Sirainen [Thu, 4 May 2023 23:46:56 +0000 (02:46 +0300)]
config: Remove wrongly used ATTR_UNUSED
Timo Sirainen [Mon, 24 Apr 2023 14:18:59 +0000 (17:18 +0300)]
config: Remove unused master_service_settings_output handling
Timo Sirainen [Wed, 26 Apr 2023 13:17:00 +0000 (16:17 +0300)]
config: Fix memory leak when exporting filters
Timo Sirainen [Thu, 20 Apr 2023 00:17:23 +0000 (03:17 +0300)]
config: Fix doveconf section output when char is unsigned
This happened at least with ARM CPU.
Timo Sirainen [Wed, 26 Apr 2023 20:24:52 +0000 (23:24 +0300)]
config: Add missing data stack frame when exporting filters
Timo Sirainen [Mon, 15 May 2023 19:03:07 +0000 (22:03 +0300)]
lib-settings: settings_*dup*() - Update pool field in destination settings
Timo Sirainen [Wed, 26 Apr 2023 20:25:35 +0000 (23:25 +0300)]
lib-settings: Add data stack frame when filling specific_services
Timo Sirainen [Fri, 21 Apr 2023 12:30:01 +0000 (15:30 +0300)]
doveconf -F: Don't write binary garbage to stdout
Timo Sirainen [Wed, 26 Apr 2023 19:15:59 +0000 (22:15 +0300)]
doveadm: Fix -O parameter handling broken by earlier changes
Aki Tuomi [Thu, 6 Apr 2023 06:29:22 +0000 (09:29 +0300)]
lib-login: Optimize session ID parsing
Aki Tuomi [Mon, 3 Apr 2023 06:11:59 +0000 (09:11 +0300)]
*-login: Send local_name to next hop
Aki Tuomi [Mon, 3 Apr 2023 09:35:02 +0000 (12:35 +0300)]
*-login: Accept local_name from remote host
Aki Tuomi [Thu, 13 Apr 2023 10:23:30 +0000 (13:23 +0300)]
imap-login: Fail ID with invalid parameters
Aki Tuomi [Thu, 13 Apr 2023 10:16:33 +0000 (13:16 +0300)]
imap-login: Move client_try_update_info() into cmd_id_handle_keyvalue()
Simplifies next commit.
Aki Tuomi [Thu, 13 Apr 2023 10:13:05 +0000 (13:13 +0300)]
imap-login: Use temporary structure for handling ID parameters
This allows discarding values if the ID request had problems.
Aki Tuomi [Mon, 3 Apr 2023 09:24:04 +0000 (12:24 +0300)]
lmtp: Send local_name with XCLIENT to next hop
Aki Tuomi [Mon, 3 Apr 2023 09:29:50 +0000 (12:29 +0300)]
lmtp: Accept local_name from XCLIENT
Aki Tuomi [Mon, 3 Apr 2023 09:15:11 +0000 (12:15 +0300)]
lmtp: Include local_name in auth request, so it ends up lib-storage
Aki Tuomi [Tue, 4 Apr 2023 11:25:09 +0000 (14:25 +0300)]
auth: Include local_name in userdb reply if it's available
Timo Sirainen [Sun, 14 May 2023 21:24:52 +0000 (00:24 +0300)]
auth: Fix use-after-free at deinit
Aki Tuomi [Mon, 17 Apr 2023 13:14:24 +0000 (16:14 +0300)]
login-common: Fail proxying if local_name is invalid
This is safeguard against sending malformed data that could
lead to unexpected override of fields in remote end.
Aki Tuomi [Mon, 3 Apr 2023 09:23:56 +0000 (12:23 +0300)]
lib-smtp: Send and accept DESTNAME parameter for XCLIENT
Aki Tuomi [Tue, 4 Apr 2023 11:54:43 +0000 (14:54 +0300)]
lib-storage: Allow filtering settings by local name {}
Aki Tuomi [Mon, 3 Apr 2023 06:45:19 +0000 (09:45 +0300)]
lib-smtp: Add accessor for TLS servername
Aki Tuomi [Wed, 12 Apr 2023 13:10:01 +0000 (16:10 +0300)]
lib-master: Reject invalid hostname in master_service_haproxy_parse_tlv()
Aki Tuomi [Wed, 12 Apr 2023 13:04:03 +0000 (16:04 +0300)]
lib-ssl-iostream: Reject bad servername extension
Aki Tuomi [Mon, 17 Apr 2023 05:12:39 +0000 (08:12 +0300)]
lib: connection - Add connection_is_valid_dns_name()
Checks that given name is valid DNS servername, including
characters _ and RFC5891 section 4.2.1 specified ones.
Timo Sirainen [Wed, 19 Apr 2023 10:06:10 +0000 (13:06 +0300)]
lib-master, global: master-service-settings.h - Don't automatically include settings.h
Timo Sirainen [Wed, 19 Apr 2023 09:28:47 +0000 (12:28 +0300)]
lib-master: Move settings_*() to lib-settings
Timo Sirainen [Wed, 19 Apr 2023 09:27:38 +0000 (12:27 +0300)]
lib-master: Add and use settings_has_mmap()
Timo Sirainen [Tue, 18 Apr 2023 00:43:37 +0000 (03:43 +0300)]
lib-master: master-service-settings.h - Remove unnecessary includes
Timo Sirainen [Mon, 17 Apr 2023 23:43:03 +0000 (02:43 +0300)]
lib-master: Split off settings_read()
Timo Sirainen [Mon, 17 Apr 2023 23:32:02 +0000 (02:32 +0300)]
lib-master: Settings reading - Fix failure handling when executed via doveconf
The DOVECOT_CONFIG_FD_ENV environment check didn't work, because it was
already unset.
Also this simplifies the code a bit. There's no need to re-parse the config
if it wasn't just mmaped, since nothing would have changed.
Timo Sirainen [Mon, 17 Apr 2023 23:23:58 +0000 (02:23 +0300)]
lib-master: Access settings_root via all created event roots
Timo Sirainen [Mon, 17 Apr 2023 22:53:26 +0000 (01:53 +0300)]
lib-master: settings_get*() - Require event to be non-NULL
Timo Sirainen [Mon, 17 Apr 2023 22:51:15 +0000 (01:51 +0300)]
global: Replace NULL event for settings_get*() with master_service.event
Timo Sirainen [Mon, 17 Apr 2023 22:49:04 +0000 (01:49 +0300)]
lib-lua: Get settings using dlua_script.event
Timo Sirainen [Mon, 17 Apr 2023 22:46:14 +0000 (01:46 +0300)]
lib-master: Add master_service_get_event()
Timo Sirainen [Mon, 17 Apr 2023 22:39:45 +0000 (01:39 +0300)]
lib-master: Move master_service.settings_pools tracking to settings_root
Timo Sirainen [Mon, 17 Apr 2023 22:32:48 +0000 (01:32 +0300)]
lib-master: Rename master_settings_pool to settings_mmap_pool
Timo Sirainen [Mon, 17 Apr 2023 22:43:21 +0000 (01:43 +0300)]
lib-master: Rename master_service_var_expand_init() to settings_var_expand_init()
Timo Sirainen [Mon, 17 Apr 2023 22:42:55 +0000 (01:42 +0300)]
lib-master: Rename master_service_settings_var_expand_t to settings_var_expand_t
Timo Sirainen [Mon, 17 Apr 2023 22:29:49 +0000 (01:29 +0300)]
lib-master, global: Rename MASTER_SERVICE_VAR_EXPAND_* macros to SETTINGS_VAR_EXPAND_*
Timo Sirainen [Mon, 17 Apr 2023 22:23:27 +0000 (01:23 +0300)]
lib-master, global: Rename master_service_settings_free() to settings_free()
Timo Sirainen [Mon, 17 Apr 2023 22:20:45 +0000 (01:20 +0300)]
lib-master, global: Rename master_service_settings_get*() to settings_get*()
Timo Sirainen [Mon, 17 Apr 2023 22:13:58 +0000 (01:13 +0300)]
lib-master, global: Rename master_service_settings_get_flags to settings_get_flags
Timo Sirainen [Mon, 17 Apr 2023 22:25:44 +0000 (01:25 +0300)]
lib-master, global: Rename master_service_set() to settings_override()
Timo Sirainen [Mon, 17 Apr 2023 22:11:39 +0000 (01:11 +0300)]
lib-master, global: Rename master_service_set_type to settings_override_type
Timo Sirainen [Mon, 17 Apr 2023 22:08:27 +0000 (01:08 +0300)]
lib-master: Change settings_{mmap|instance} to not depend on master_service
Timo Sirainen [Mon, 17 Apr 2023 22:03:34 +0000 (01:03 +0300)]
lib-master: Use master_service.config_overrides via settings_root
Copy them to settings_root the first time settings are read.
The following settings lookups use them via the settings_root.
Timo Sirainen [Mon, 17 Apr 2023 22:01:09 +0000 (01:01 +0300)]
lib-master: Move struct settings_override earlier
Timo Sirainen [Mon, 17 Apr 2023 21:50:44 +0000 (00:50 +0300)]
lib-master: Move master_service.set_protocol_name to settings_root
Timo Sirainen [Mon, 17 Apr 2023 23:13:38 +0000 (02:13 +0300)]
lib-master: Change settings_mmap_[un]ref() to be static
Timo Sirainen [Mon, 17 Apr 2023 23:12:44 +0000 (02:12 +0300)]
lib-master: Introduce struct settings_root
It contains the latest created settings_mmap.
Timo Sirainen [Thu, 13 Apr 2023 21:33:34 +0000 (00:33 +0300)]
lib-master: Rename struct master_service_set to struct settings_override
Also rename settings_instance.settings to overrides.
Timo Sirainen [Thu, 13 Apr 2023 21:26:03 +0000 (00:26 +0300)]
lib-master, global: Rename MASTER_SERVICE_SETTINGS_INSTANCE to SETTINGS_EVENT_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
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.