Mercurial > dovecot > core-2.2
changeset 15303:4d268e810c15
master: If service { protocol } is set and not included in "protocols", ignore its settings
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 08 Oct 2012 08:53:54 +0300 |
parents | d96313048f17 |
children | 7bc24fc1667e |
files | src/master/master-settings.c |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/master/master-settings.c Mon Oct 08 03:14:12 2012 +0300 +++ b/src/master/master-settings.c Mon Oct 08 08:53:54 2012 +0300 @@ -496,6 +496,13 @@ for (i = 0; i < count; i++) { struct service_settings *service = services[i]; + if (*service->protocol != '\0' && + !str_array_find((const char **)set->protocols_split, + service->protocol)) { + /* protocol not enabled, ignore its settings */ + continue; + } + if (*service->executable == '\0') { *error_r = t_strdup_printf("service(%s): " "executable is empty", service->name); @@ -550,9 +557,7 @@ } #endif - if (*service->protocol != '\0' && - str_array_find((const char **)set->protocols_split, - service->protocol)) { + if (*service->protocol != '\0') { /* each imap/pop3/lmtp process can use up a connection, although if service_count=1 it's only temporary */ if (service->service_count != 1 ||