changeset 5565:2298061b424a branch_1_0

Maildir: Group of the created shared directory wasn't set. Patch by Simon Michelson.
author Timo Sirainen <tss@iki.fi>
date Sun, 20 Jul 2008 19:27:09 +0300
parents c311c66a2d1b
children 2d0520777c4b
files src/lib-storage/index/maildir/maildir-storage.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-storage.c	Sun Jul 20 17:58:22 2008 +0300
+++ b/src/lib-storage/index/maildir/maildir-storage.c	Sun Jul 20 19:27:09 2008 +0300
@@ -663,6 +663,10 @@
 		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_MAILDIR_SUBDIRS; i++) {
 		path = t_strconcat(dir, "/", maildir_subdirs[i], NULL);
 		if (chown(path, (uid_t)-1, gid) < 0) {