From: Timo Sirainen Date: Sun, 5 Nov 2017 21:51:56 +0000 (+0200) Subject: director: Make sure HOST-RESET-USERS isn't used with max_moving_users=0 X-Git-Tag: 2.2.34~233 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a65be8295754f957e61881c48022052aedbb738a;p=thirdparty%2Fdovecot%2Fcore.git director: Make sure HOST-RESET-USERS isn't used with max_moving_users=0 The reset command would just hang in that case. doveadm would never have sent this, so this is just an extra sanity check. --- diff --git a/src/director/doveadm-connection.c b/src/director/doveadm-connection.c index 2b61787327..e622691fa0 100644 --- a/src/director/doveadm-connection.c +++ b/src/director/doveadm-connection.c @@ -592,7 +592,8 @@ doveadm_cmd_host_reset_users(struct doveadm_connection *conn, unsigned int max_moving_users = DEFAULT_MAX_MOVING_USERS; if (args[0] != NULL && args[1] != NULL && - str_to_uint(args[1], &max_moving_users) < 0) { + (str_to_uint(args[1], &max_moving_users) < 0 || + max_moving_users == 0)) { i_error("doveadm sent invalid HOST-RESET-USERS parameters"); return DOVEADM_DIRECTOR_CMD_RET_FAIL; }