changeset 22879:685a613c315f

login-common: Enable config filtering by local name Prevents servername misuse.
author Aki Tuomi <aki.tuomi@dovecot.fi>
date Thu, 30 Nov 2017 20:52:11 +0200
parents 6b75bab3ec79
children 256a456b2af1
files src/login-common/login-settings.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/login-common/login-settings.c	Thu Nov 30 15:47:25 2017 +0200
+++ b/src/login-common/login-settings.c	Thu Nov 30 20:52:11 2017 +0200
@@ -185,6 +185,14 @@
 		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,