]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Thu, 4 May 2023 15:36:28 +0000 (18:36 +0300)]
lib-settings: Change settings event filter matching to be case-sensitive
This will be required for matching mailbox names, which are case-sensitive.
Timo Sirainen [Fri, 28 Apr 2023 12:46:43 +0000 (15:46 +0300)]
lib-settings: Add SETTINGS_GET_FLAG_FAKE_EXPAND
This can be used by settings ext_check_func()s to access other settings when
they can't yet expand the variables, but don't want the 0/1 expansion prefix
character either.
Timo Sirainen [Wed, 26 Apr 2023 12:27:35 +0000 (15:27 +0300)]
lib-settings, config: Add setting_parser_info.ext_check_func()
This can be used to implement a check function that accesses other settings
structs as well using settings_get*().
Timo Sirainen [Wed, 19 Apr 2023 22:29:04 +0000 (01:29 +0300)]
lib-settings, config: Add support for named filters
Timo Sirainen [Mon, 8 May 2023 19:48:59 +0000 (22:48 +0300)]
doveconf: Redesign output handling
Filters are now written out by walking the tree of filters.
Also merge filtered and non-filtered output handling code.
Timo Sirainen [Mon, 15 May 2023 20:25:48 +0000 (23:25 +0300)]
doveconf: Fail if -h parameter is used when output has multiple settings
Timo Sirainen [Wed, 19 Apr 2023 21:05:08 +0000 (00:05 +0300)]
lib-settings: Add support for named filter lookups
Timo Sirainen [Thu, 4 May 2023 15:33:55 +0000 (18:33 +0300)]
lib: Add event_filter_parse_case_sensitive()
Timo Sirainen [Mon, 15 May 2023 10:42:03 +0000 (13:42 +0300)]
config: Change config_filter to a tree
The child filters no longer contain parent filters' contents. For example
local { protocol { ... } } will now contain a parent config_filter that
contains the "local" filter and a child filter containing only the
"protocol" filter (not both local and protocol as before). Config filter
matching is changed to look at also the parent filters to preserve the
correct behavior.
Timo Sirainen [Fri, 12 May 2023 16:26:51 +0000 (19:26 +0300)]
config: Store config_filter_parsers in a tree
Timo Sirainen [Tue, 2 May 2023 13:18:11 +0000 (16:18 +0300)]
config: Escape wildcard characters in written event filters
protocol and local_name are now compared as exact strings rather than
wildcards.
Timo Sirainen [Fri, 5 May 2023 14:10:55 +0000 (17:10 +0300)]
lib: Add pool_add_external_ref() to allow pools to reference other pools
When the pool is destroyed, all its external references are unreferenced.
Timo Sirainen [Wed, 19 Apr 2023 21:04:00 +0000 (00:04 +0300)]
lib: Add event_filter_find_field_exact()
Timo Sirainen [Wed, 19 Apr 2023 19:52:59 +0000 (22:52 +0300)]
lib: Add event_get_pool()
Timo Sirainen [Wed, 19 Apr 2023 23:47:10 +0000 (02:47 +0300)]
configure.ac, config: Redesign how all-settings.c is built
Later commits will start adding settings to all kinds of files, not just
*-settings.[ch] files. Use grep instead to find the files that contain
settings that are needed for all-settings.c.
Timo Sirainen [Mon, 8 May 2023 20:03:36 +0000 (23:03 +0300)]
doveconf: Remove -S parameter
The "simple output" is no longer relevant. -F parameter replaces it.
Timo Sirainen [Mon, 15 May 2023 21:12:02 +0000 (00:12 +0300)]
config: Replace config_export_dup_module_parsers() with config_export_set_module_parsers()
Now that settings checks are done while parsing the config, the parsers no
longer change afterwards so there is no need to duplicate them.
Timo Sirainen [Wed, 3 May 2023 13:10:37 +0000 (16:10 +0300)]
config: Refer to config_filter_parser as "filter_parser"
This is to differentiate them from all the other parsers.
Timo Sirainen [Wed, 3 May 2023 13:10:19 +0000 (16:10 +0300)]
config: Remove unused config_filter_parsers array type
Timo Sirainen [Wed, 3 May 2023 13:05:35 +0000 (16:05 +0300)]
config: Refer to config_module_parser as "module_parser"
This is to differentiate them from all the other parsers.
Timo Sirainen [Wed, 3 May 2023 10:17:16 +0000 (13:17 +0300)]
config: Replace config_filter_context with config_parsed
This describes better what it does.
Timo Sirainen [Tue, 2 May 2023 09:05:29 +0000 (12:05 +0300)]
config: Add struct config_line and use it to pass around the parse line
Timo Sirainen [Wed, 3 May 2023 09:57:33 +0000 (12:57 +0300)]
config: Move global filter parsers duplication code
Timo Sirainen [Wed, 3 May 2023 09:53:16 +0000 (12:53 +0300)]
config: Rename config_filter_parsers_free() to config_module_parsers_free()
Timo Sirainen [Wed, 3 May 2023 09:41:37 +0000 (12:41 +0300)]
config: Split off public config_filter_sort_cmp()
Timo Sirainen [Wed, 3 May 2023 09:39:46 +0000 (12:39 +0300)]
config: Remove config_filter_parser_cmp_rev() wrapper
Timo Sirainen [Wed, 3 May 2023 09:29:26 +0000 (12:29 +0300)]
config: Fix memory leak on config parsing failure
Timo Sirainen [Sun, 28 May 2023 21:59:42 +0000 (00:59 +0300)]
lib-settings: Remove unused settings_parser_apply_changes()
Timo Sirainen [Tue, 25 Apr 2023 14:53:53 +0000 (17:53 +0300)]
config: Remove dead code caused by previous filtering changes
Timo Sirainen [Tue, 25 Apr 2023 14:07:09 +0000 (17:07 +0300)]
config: Remove filter parameter from functions where callers only used empty filters
Some of the function names no longer make sense, but these will be fixed by
later commits.
Timo Sirainen [Tue, 25 Apr 2023 12:38:36 +0000 (15:38 +0300)]
doveconf: Remove -f parameter
This is making it difficult to simplify the code further. It could maybe be
added back later with a different implementation.
Timo Sirainen [Wed, 26 Apr 2023 12:03:25 +0000 (15:03 +0300)]
config: Remove CONFIG_DUMP_FLAG_CHECK_SETTINGS
The settings are now always checked while parsing the config, and there
is no filtering done on config process side. So there is no need to check
settings again when exporting settings.
Timo Sirainen [Wed, 26 Apr 2023 11:58:25 +0000 (14:58 +0300)]
config: Remove CONFIG_DUMP_FLAG_CALLBACK_ERRORS
Timo Sirainen [Wed, 26 Apr 2023 11:56:50 +0000 (14:56 +0300)]
config: Gather the full errors list already while parsing config
This way there is no need for config exporting to check settings again.
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_*()