changeset 7004:421226dbdce1 HEAD

If protocols=none, don't check if mail/login executables are usable.
author Timo Sirainen <tss@iki.fi>
date Fri, 21 Dec 2007 17:11:15 +0200
parents f622ddfb69b2
children d8555d377101
files src/master/master-settings.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/master/master-settings.c	Fri Dec 21 16:57:26 2007 +0200
+++ b/src/master/master-settings.c	Fri Dec 21 17:11:15 2007 +0200
@@ -709,7 +709,8 @@
 			return FALSE;
 	}
 
-	if (access(t_strcut(set->mail_executable, ' '), X_OK) < 0) {
+	if (set->protocol != MAIL_PROTOCOL_ANY &&
+	    access(t_strcut(set->mail_executable, ' '), X_OK) < 0) {
 		i_error("Can't use mail executable %s: %m",
 			t_strcut(set->mail_executable, ' '));
 		return FALSE;
@@ -786,7 +787,8 @@
 		return FALSE;
 	}
 
-	if (access(t_strcut(set->login_executable, ' '), X_OK) < 0) {
+	if (set->protocol != MAIL_PROTOCOL_ANY &&
+	    access(t_strcut(set->login_executable, ' '), X_OK) < 0) {
 		i_error("Can't use login executable %s: %m",
 			t_strcut(set->login_executable, ' '));
 		return FALSE;
@@ -1469,6 +1471,7 @@
 		   of what's in protocols setting. */
 		if (!settings_is_active(server->imap) && !nochecks) {
 			if (strcmp(server->imap->protocols, "none") == 0) {
+				server->imap->protocol = MAIL_PROTOCOL_ANY;
 				if (!settings_fix(server->imap, nochecks,
 						  nofixes))
 					return FALSE;