dovecot-1.2: Maildir: Group of the created shared directory wasn...

dovecot at dovecot.org dovecot at dovecot.org
Sun Jul 20 19:27:22 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/a90541a1192c
changeset: 8023:a90541a1192c
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Jul 20 19:26:51 2008 +0300
description:
Maildir: Group of the created shared directory wasn't set.
Patch by Simon Michelson.

diffstat:

1 file changed, 4 insertions(+)
src/lib-storage/index/maildir/maildir-storage.c |    4 ++++

diffs (14 lines):

diff -r d1da922a437d -r a90541a1192c src/lib-storage/index/maildir/maildir-storage.c
--- a/src/lib-storage/index/maildir/maildir-storage.c	Sun Jul 20 18:57:50 2008 +0300
+++ b/src/lib-storage/index/maildir/maildir-storage.c	Sun Jul 20 19:26:51 2008 +0300
@@ -538,6 +538,10 @@ static int maildir_create_shared(struct 
 	if (create_maildir(storage, dir, FALSE) < 0) {
 		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);


More information about the dovecot-cvs mailing list