[dovecot-cvs] dovecot/src/imap-login client-authenticate.c, 1.34, 1.35

cras at dovecot.org cras at dovecot.org
Fri Jan 7 19:29:27 EET 2005


Update of /var/lib/cvs/dovecot/src/imap-login
In directory talvi:/tmp/cvs-serv11326/imap-login

Modified Files:
	client-authenticate.c 
Log Message:
If authentication failed because of temporary failure, show different error
message to clients.



Index: client-authenticate.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap-login/client-authenticate.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- client-authenticate.c	18 Oct 2004 23:07:01 -0000	1.34
+++ client-authenticate.c	7 Jan 2005 17:29:25 -0000	1.35
@@ -85,13 +85,15 @@
 	const char *reason = NULL, *host = NULL, *destuser = NULL, *pass = NULL;
 	string_t *reply;
 	unsigned int port = 143;
-	int proxy = FALSE;
+	int proxy = FALSE, temp = FALSE;
 
 	for (; *args != NULL; args++) {
 		if (strcmp(*args, "nologin") == 0)
 			nologin = TRUE;
 		else if (strcmp(*args, "proxy") == 0)
 			proxy = TRUE;
+		else if (strcmp(*args, "temp") == 0)
+			temp = TRUE;
 		else if (strncmp(*args, "reason=", 7) == 0)
 			reason = *args + 7;
 		else if (strncmp(*args, "host=", 5) == 0)
@@ -146,6 +148,8 @@
 		reply = t_str_new(128);
 		if (reason != NULL)
 			str_printfa(reply, "NO %s", reason);
+		else if (temp)
+			str_append(reply, "NO "AUTH_TEMP_FAILED_MSG);
 		else
 			str_append(reply, "NO "AUTH_FAILED_MSG);
 		client_send_tagline(client, str_c(reply));



More information about the dovecot-cvs mailing list