# HG changeset patch # User Timo Sirainen # Date 1509918716 -7200 # Node ID 1789bf2a1e011fc4a54bff85ed3ea08e9dfffa0d # Parent c98a2d05c70284ad392dd721d9c09eeff747f18e 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 -r c98a2d05c702 -r 1789bf2a1e01 src/director/doveadm-connection.c --- a/src/director/doveadm-connection.c Sun Nov 05 23:27:36 2017 +0200 +++ b/src/director/doveadm-connection.c Sun Nov 05 23:51:56 2017 +0200 @@ -592,7 +592,8 @@ 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; }