changeset 6785:f744f28c7346 HEAD

If dovecot-shared doesn't have group permissions set, ignore the group.
author Timo Sirainen <tss@iki.fi>
date Sun, 11 Nov 2007 19:20:29 +0200
parents 33f59b91c4bf
children 92768090a106
files src/lib-storage/index/maildir/maildir-storage.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-storage.c	Sun Nov 11 19:18:57 2007 +0200
+++ b/src/lib-storage/index/maildir/maildir-storage.c	Sun Nov 11 19:20:29 2007 +0200
@@ -407,7 +407,8 @@
 	/* for shared mailboxes get the create mode from the
 	   permissions of dovecot-shared file. */
 	if (stat(t_strconcat(path, "/dovecot-shared", NULL), &st) == 0) {
-		if ((st.st_mode & S_ISGID) != 0) {
+		if ((st.st_mode & S_ISGID) != 0 ||
+		    (st.st_mode & 0060) == 0) {
 			/* Ignore GID */
 			st.st_gid = (gid_t)-1;
 		}