]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: master-connection - bail on malformed list
authorPhil Carmody <phil@dovecot.fi>
Tue, 27 May 2014 18:17:34 +0000 (21:17 +0300)
committerPhil Carmody <phil@dovecot.fi>
Tue, 27 May 2014 18:17:34 +0000 (21:17 +0300)
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@dovecot.fi>
src/auth/auth-master-connection.c

index 728a1dafa9da2ba87e4cf3d0253bf60a414ea2cc..ed762390b9e7aa67c25eb1a1fa81d6f5e3b7e7a1 100644 (file)
@@ -527,7 +527,7 @@ master_input_list(struct auth_master_connection *conn, const char *args)
        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++;