[dovecot-cvs] dovecot/src/pop3-login client-authenticate.c, 1.39, 1.40

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


Update of /var/lib/cvs/dovecot/src/pop3-login
In directory talvi:/tmp/cvs-serv11326/pop3-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/pop3-login/client-authenticate.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- client-authenticate.c	29 Oct 2004 17:56:46 -0000	1.39
+++ client-authenticate.c	7 Jan 2005 17:29:25 -0000	1.40
@@ -86,13 +86,15 @@
 	const char *reason = NULL, *host = NULL, *destuser = NULL, *pass = NULL;
 	string_t *reply;
 	unsigned int port = 110;
-	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)
@@ -124,6 +126,8 @@
 	str_append(reply, "-ERR ");
 	if (reason != NULL)
 		str_append(reply, reason);
+	else if (temp)
+		str_append(reply, AUTH_TEMP_FAILED_MSG);
 	else
 		str_append(reply, AUTH_FAILED_MSG);
 



More information about the dovecot-cvs mailing list