Mercurial > dovecot > original-hg > dovecot-2.2
changeset 6784:33f59b91c4bf HEAD
mailbox_list_get_permissions(): If group doesn't have any permissions, don't
bother returning any group either.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 11 Nov 2007 19:18:57 +0200 |
parents | 007cbfcaf3bc |
children | f744f28c7346 |
files | src/lib-storage/mailbox-list.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/mailbox-list.c Sun Nov 11 19:17:15 2007 +0200 +++ b/src/lib-storage/mailbox-list.c Sun Nov 11 19:18:57 2007 +0200 @@ -260,6 +260,10 @@ if (S_ISDIR(st.st_mode) && (st.st_mode & S_ISGID) != 0) { /* directory's GID is used automatically for new files */ list->file_create_gid = (gid_t)-1; + } else if ((st.st_mode & 0060) == 0) { + /* group doesn't have any permissions, so don't bother + changing it */ + list->file_create_gid = (gid_t)-1; } else if (getegid() == st.st_gid) { /* using our own gid, no need to change it */ list->file_create_gid = (gid_t)-1;