dovecot-2.1: login: Make SASL auth buffer size define public.

dovecot at dovecot.org dovecot at dovecot.org
Sun Jan 22 21:39:00 EET 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/83a2e1ba3ab6
changeset: 13982:83a2e1ba3ab6
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Jan 22 21:38:48 2012 +0200
description:
login: Make SASL auth buffer size define public.

diffstat:

 src/login-common/client-common-auth.c |  4 +---
 src/login-common/client-common.h      |  3 +++
 2 files changed, 4 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r 8f5cdb88d047 -r 83a2e1ba3ab6 src/login-common/client-common-auth.c
--- a/src/login-common/client-common-auth.c	Sat Jan 21 22:23:28 2012 +0200
+++ b/src/login-common/client-common-auth.c	Sun Jan 22 21:38:48 2012 +0200
@@ -19,8 +19,6 @@
 #define AUTH_WAITING_TIMEOUT_MSECS (30*1000)
 #define GREETING_WARNING_TIMEOUT_MSECS (10*1000)
 
-#define CLIENT_AUTH_BUF_MAX_SIZE 8192
-
 void client_auth_failed(struct client *client)
 {
 	i_free_and_null(client->master_data_prefix);
@@ -355,7 +353,7 @@
 	}
 	if (client->auth_response == NULL)
 		client->auth_response = str_new(default_pool, I_MAX(i+1, 256));
-	if (str_len(client->auth_response) + i > CLIENT_AUTH_BUF_MAX_SIZE) {
+	if (str_len(client->auth_response) + i > LOGIN_MAX_AUTH_BUF_SIZE) {
 		client_destroy(client, "Authentication response too large");
 		return -1;
 	}
diff -r 8f5cdb88d047 -r 83a2e1ba3ab6 src/login-common/client-common.h
--- a/src/login-common/client-common.h	Sat Jan 21 22:23:28 2012 +0200
+++ b/src/login-common/client-common.h	Sun Jan 22 21:38:48 2012 +0200
@@ -19,6 +19,9 @@
    SASL authentication gives the largest output. */
 #define LOGIN_MAX_OUTBUF_SIZE 4096
 
+/* Max. length of SASL authentication buffer. */
+#define LOGIN_MAX_AUTH_BUF_SIZE 8192
+
 /* Disconnect client after this many milliseconds if it hasn't managed
    to log in yet. */
 #define CLIENT_LOGIN_TIMEOUT_MSECS (MASTER_LOGIN_TIMEOUT_SECS*1000)


More information about the dovecot-cvs mailing list