]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
config: Allow auto-creating new filters based on settings key paths
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 9 Oct 2024 07:39:59 +0000 (10:39 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 17 Jan 2025 08:40:00 +0000 (10:40 +0200)
This is especially needed for old-set-parser where e.g. auth_worker_max_count
converts to service/auth-worker/process_limit. This worked so far because
service/auth was created as a non-default settings filter, so it was simply
updated. However, with the next change service/auth becomes a "service
default" filter, which can't be directly updated. Instead a whole new
non-default service/auth filter must be created.

This change shouldn't break anything, although it will now allow
auto-creating named list filters in configuration file, e.g.
"namespace/inbox/separator=/" will directly work.

src/config/config-parser.c

index 6534a0f4b263cb319d5c01b6e897f7a283f98cb5..abb1ce579480027af19a55a8c61972ee6a1fb491 100644 (file)
@@ -812,12 +812,6 @@ again:
 
                filter_parser = config_filter_parser_find(ctx, &filter);
                if (filter_parser == NULL) {
-                       if (filter.filter_name_array &&
-                           !filter.default_settings) {
-                               /* don't create new arrays, except for
-                                  default settings */
-                               break;
-                       }
                        /* Verify that this is a filter_name/ prefix. If not,
                           it should be a list/ */
                        if (l->info->defines[config_key->define_idx].type != SET_FILTER_NAME &&