]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
director: Add assert to make sure USER-MOVE doesn't change tag
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 20 Jan 2017 13:52:43 +0000 (15:52 +0200)
committerGitLab <gitlab@git.dovecot.net>
Fri, 20 Jan 2017 15:46:57 +0000 (17:46 +0200)
src/director/director.c

index 141788c71ff8b8db35e360fc88a0b7c88577c701..777baca029963d13e47261a0c4b2f98318ce8d7c 100644 (file)
@@ -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++;