From: Timo Sirainen Date: Fri, 20 Jan 2017 13:52:43 +0000 (+0200) Subject: director: Add assert to make sure USER-MOVE doesn't change tag X-Git-Tag: 2.3.0.rc1~2282 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7a380e77afc69a81725d410cd67082a37cf140d2;p=thirdparty%2Fdovecot%2Fcore.git director: Add assert to make sure USER-MOVE doesn't change tag --- diff --git a/src/director/director.c b/src/director/director.c index 141788c71f..777baca029 100644 --- a/src/director/director.c +++ b/src/director/director.c @@ -1062,6 +1062,10 @@ void director_move_user(struct director *dir, struct director_host *src, /* user is already in this host */ return; } + /* user is looked up via the new host's tag, so if it's found + the old tag has to be the same. */ + i_assert(user->host->tag == host->tag); + user->host->user_count--; user->host = host; user->host->user_count++;