dovecot-2.1: master: If service { protocol } is set and not incl...

dovecot at dovecot.org dovecot at dovecot.org
Mon Oct 8 08:54:11 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/4d268e810c15
changeset: 14757:4d268e810c15
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Oct 08 08:53:54 2012 +0300
description:
master: If service { protocol } is set and not included in "protocols", ignore its settings

diffstat:

 src/master/master-settings.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r d96313048f17 -r 4d268e810c15 src/master/master-settings.c
--- 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 ||


More information about the dovecot-cvs mailing list