dovecot-2.2: auth: master-connection - bail on malformed list

dovecot at dovecot.org dovecot at dovecot.org
Tue May 27 18:19:15 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/9207d1868963
changeset: 17408:9207d1868963
user:      Phil Carmody <phil at dovecot.fi>
date:      Tue May 27 21:17:34 2014 +0300
description:
auth: master-connection - bail on malformed list
If master is not communicating to us in a syntax we understand, just ask for
it to be unplugged. This changes the behaviour in this error case.

Previously, we returned -1, which is TRUE when converted to a boolean, and
thus this changes the error semantics, and may be horribly wrong. However,
the i_error()s in auth_master_input_line follow the same pattern.

Signed-off-by: Phil Carmody <phil at dovecot.fi>

diffstat:

 src/auth/auth-master-connection.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 479d66a8e310 -r 9207d1868963 src/auth/auth-master-connection.c
--- a/src/auth/auth-master-connection.c	Tue May 27 21:17:34 2014 +0300
+++ b/src/auth/auth-master-connection.c	Tue May 27 21:17:34 2014 +0300
@@ -527,7 +527,7 @@
 	list = t_strsplit_tab(args);
 	if (list[0] == NULL || str_to_uint(list[0], &id) < 0) {
 		i_error("BUG: Master sent broken LIST");
-		return -1;
+		return FALSE;
 	}
 	list++;
 


More information about the dovecot-cvs mailing list