dovecot-1.3: imap-login: Generated IMAP capability wasn't being ...

dovecot at dovecot.org dovecot at dovecot.org
Wed Apr 22 21:31:35 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.3/rev/213c2f313bc1
changeset: 9154:213c2f313bc1
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Apr 22 14:27:33 2009 -0400
description:
imap-login: Generated IMAP capability wasn't being used.

diffstat:

2 files changed, 5 insertions(+), 4 deletions(-)
src/imap-login/client.c    |    4 ++--
src/master/login-process.c |    5 +++--

diffs (36 lines):

diff -r f8508e7aca6c -r 213c2f313bc1 src/imap-login/client.c
--- a/src/imap-login/client.c	Wed Apr 22 14:26:31 2009 -0400
+++ b/src/imap-login/client.c	Wed Apr 22 14:27:33 2009 -0400
@@ -46,7 +46,6 @@
 	"* OK Waiting for authentication process to respond.."
 
 const char *login_protocol = "IMAP";
-const char *capability_string = CAPABILITY_STRING;
 
 static void client_set_title(struct imap_client *client)
 {
@@ -97,7 +96,8 @@ static const char *get_capability(struct
 	const char *auths;
 
 	auths = client_authenticate_get_capabilities(client->common.secured);
-	return t_strconcat(full ? capability_string : CAPABILITY_BANNER_STRING,
+	return t_strconcat(full ? login_settings->capability_string :
+			   CAPABILITY_BANNER_STRING,
 			   (ssl_initialized && !client->common.tls) ?
 			   " STARTTLS" : "",
 			   login_settings->disable_plaintext_auth &&
diff -r f8508e7aca6c -r 213c2f313bc1 src/master/login-process.c
--- a/src/master/login-process.c	Wed Apr 22 14:26:31 2009 -0400
+++ b/src/master/login-process.c	Wed Apr 22 14:27:33 2009 -0400
@@ -547,8 +547,9 @@ static void login_process_init_env(struc
 	}
 
 	env_put(t_strconcat("PROCESS_UID=", dec2str(pid), NULL));
-	if (group->mail_process_type == PROCESS_TYPE_IMAP) {
-		env_put(t_strconcat("GENERATED_CAPABILITY=",
+	if (group->mail_process_type == PROCESS_TYPE_IMAP &&
+	    set->imap_generated_capability != NULL) {
+		env_put(t_strconcat("CAPABILITY_STRING=",
 				    set->imap_generated_capability, NULL));
 	}
 	env_put(t_strconcat("LOGIN_DIR=", set->login_dir, NULL));


More information about the dovecot-cvs mailing list