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

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


details:   http://hg.dovecot.org/dovecot-1.1/rev/e2e0aeff36eb
changeset: 7768:e2e0aeff36eb
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 ecc57955b99d -r e2e0aeff36eb src/lib-storage/index/maildir/maildir-storage.c
--- a/src/lib-storage/index/maildir/maildir-storage.c	Sun Jul 20 18:57:15 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