[Dovecot] group ownership of new shared folders
Simon Michelson
simon at inpher.com
Thu Jun 26 04:56:45 EEST 2008
Between versions 1.0.4 and 1.0.5 there were some changes to the
way dovecot-shared group ownership is propogated into new maildirs.
Changing the group of new_dir/{tmp,new,cur} was added, but
changing the group of new_dir itself was removed. As far as I
can tell, this latter change may have been accidental.
This patch puts the functionality back, in the 1.1 tree.
----------------------------------
# HG changeset patch
# User Simon Michelson <simon at inpher.com>
# Date 1214444574 -3600
# Branch HEAD
# Node ID 1dae5712e81daacb6923f500c0997aca6853ec3a
# Parent 3c06e14c4731ee1ffe6d8c36bbdc711e3190cb2c
reinstate code to apply gid of dovecot-shared to new maildir directory
diff -r 3c06e14c4731 -r 1dae5712e81d src/lib-storage/index/maildir/maildir-storage.c
--- a/src/lib-storage/index/maildir/maildir-storage.c Tue Jun 24 13:37:55 2008 +0300
+++ b/src/lib-storage/index/maildir/maildir-storage.c Thu Jun 26 02:42:54 2008 +0100
@@ -539,6 +539,10 @@ static int maildir_create_shared(struct
umask(old_mask);
return -1;
}
+ if (chown(dir, (uid_t)-1, gid) < 0) {
+ mail_storage_set_critical(storage,
+ "chown(%s) failed: %m", dir);
+ }
for (i = 0; i < N_ELEMENTS(maildir_subdirs); i++) {
path = t_strconcat(dir, "/", maildir_subdirs[i], NULL);
if (chown(path, (uid_t)-1, gid) < 0) {
More information about the dovecot
mailing list