dovecot: If dovecot-shared doesn't have group permissions set, i...

dovecot at dovecot.org dovecot at dovecot.org
Sun Nov 11 19:20:32 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/f744f28c7346
changeset: 6785:f744f28c7346
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Nov 11 19:20:29 2007 +0200
description:
If dovecot-shared doesn't have group permissions set, ignore the group.

diffstat:

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

diffs (13 lines):

diff -r 33f59b91c4bf -r f744f28c7346 src/lib-storage/index/maildir/maildir-storage.c
--- 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 @@ maildir_open(struct maildir_storage *sto
 	/* 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;
 		}


More information about the dovecot-cvs mailing list