]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
global: Use mail_user_deinit() wherever possible
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 26 Jul 2019 07:31:12 +0000 (10:31 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Sat, 31 Aug 2019 12:49:24 +0000 (12:49 +0000)
commitd164df52a9a5d7051bb8e9642524a81613dafb22
tree9a11b7292f2b18fce2eea6835cecb4c15144379d
parentff26529199d2230816f503ba0a1f53d48cd7ad2f
global: Use mail_user_deinit() wherever possible

This makes sure that the user is fully deinitialized in the places where we
expect it to be.

This mainly makes sure that lmtp won't continue running code for the user
after lmtp has already switched to running as root. That could then end up
reading/writing files as root. This can happen only if there are bugs in
the code that leaks user references. Normally user is supposed to be fully
unreferenced before switching to root, so this change just adds an assert
to make sure it is.
24 files changed:
src/doveadm/doveadm-auth-server.c
src/doveadm/doveadm-auth.c
src/doveadm/doveadm-dsync.c
src/doveadm/doveadm-mail-copymove.c
src/doveadm/doveadm-mail-import.c
src/doveadm/doveadm-mail.c
src/imap-urlauth/imap-urlauth-worker.c
src/imap/imap-client.c
src/imap/main.c
src/indexer/master-connection.c
src/lda/main.c
src/lib-storage/index/shared/shared-storage.c
src/lib-storage/mail-storage-service.c
src/lib-storage/test-mail-storage.c
src/lmtp/lmtp-client.c
src/lmtp/lmtp-local.c
src/plugins/mail-crypt/doveadm-mail-crypt.c
src/plugins/mail-crypt/mail-crypt-acl-plugin.c
src/plugins/mail-crypt/test-mail-key.c
src/plugins/quota/quota-status.c
src/pop3/main.c
src/pop3/pop3-client.c
src/submission/main.c
src/submission/submission-client.c