Univention Bugzilla – Bug 46892
[4.3] Dovecot listener does not copy uid+gid, when moving files over filesystem boundaries
Last modified: 2018-05-09 14:21:14 CEST
Turns out shutil.move() → copytree() → copy2() → copystat() does not copy the uid and gid of files/dirs. Add the required code to move_user_home() in mail/univention-mail-dovecot/modules/univention/mail/dovecot.py
[4.3-0] 64bd00c5c8 Bug #46892: set UID and GID on move target [4.3-0] 32be370739 Bug #46892: changelog [4.3-0] d027f5b125 Bug #46892: advisory univention-mail-dovecot (4.0.0-9)
[4.3-0] bb4c6a82b9 Bug #46892: chown only if necessary [4.3-0] 51e7d3bb09 Bug #46892: changelog [4.3-0] e900f3a2aa Bug #46892: advisory update univention-mail-dovecot (4.0.0-10)
# dd if=/dev/zero of=/mailspool bs=1M count=500 # mkfs.ext4 /mailspool # mount /mailspool /var/spool/dovecot/private/domainb.local # Delivered 10000 mails to abc@domaina.local and changed mailPrimaryAddress afterwards to abc@domainb.local → mails have been copied from /var/spool/dovecot/private/domaina.local/abc/Maildir to /var/spool/dovecot/private/domainb.local/abc/Maildir → with old package: files were owned by root:nogroup → with new package: files were owned by dovemail:dovemail Moving 10.000 mails took less than 3 seconds inclusive recursive chown. OK: code change OK: functional change OK: tests FIXED: advisory
--- mirror/ftp/4.3/unmaintained/4.3-0/source/univention-mail-dovecot_4.0.0-8A~4.3.0.201803011723.dsc +++ apt/ucs_4.3-0-errata4.3-0/source/univention-mail-dovecot_4.0.0-10A~4.3.0.201804271106.dsc @@ -1,6 +1,14 @@ -4.0.0-8A~4.3.0.201803011723 [Thu, 01 Mar 2018 17:23:49 +0100] Univention builddaemon <buildd@univention.de>: +4.0.0-10A~4.3.0.201804271106 [Fri, 27 Apr 2018 11:06:51 +0200] Univention builddaemon <buildd@univention.de>: * UCS auto build. No patches were applied to the original source package + +4.0.0-10 [Fri, 27 Apr 2018 11:04:24 +0200] Daniel Troeder <troeder@univention.de>: + + * Bug #46892: chown only if necessary + +4.0.0-9 [Fri, 27 Apr 2018 10:10:58 +0200] Daniel Troeder <troeder@univention.de>: + + * Bug #46892: set UID and GID on move target 4.0.0-8 [Thu, 01 Mar 2018 17:19:57 +0100] Daniel Troeder <troeder@univention.de>:
<http://errata.software-univention.de/ucs/4.3/30.html>