]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login-common: Enable config filtering by local name
authorAki Tuomi <aki.tuomi@dovecot.fi>
Thu, 30 Nov 2017 18:52:11 +0000 (20:52 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 6 Mar 2018 10:13:24 +0000 (12:13 +0200)
Prevents servername misuse.

src/login-common/login-settings.c

index aaa9d0b0f20b4bb0e8da9fca96018bc334febe98..2fc3613ac1da360df32add2f968c46bed214c170 100644 (file)
@@ -185,6 +185,14 @@ login_settings_read(pool_t pool,
                set_cache = master_service_settings_cache_init(master_service,
                                                               input.module,
                                                               input.service);
+               /* lookup filters
+
+                  this is only enabled if service_count > 1 because otherwise
+                  login process will process only one request and this is only
+                  useful when more than one request is processed.
+               */
+               if (master_service_get_service_count(master_service) > 1)
+                       master_service_settings_cache_init_filter(set_cache);
        }
 
        if (master_service_settings_cache_read(set_cache, &input, NULL,