Mercurial > dovecot > original-hg > dovecot-1.2
diff src/lib-storage/index/dbox/dbox-storage.c @ 9168:2bbf175bb6d3 HEAD
Whenever file's group changing fails, show the group origin in the error message.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 27 Jun 2009 20:39:30 -0400 |
parents | ecf7b65fdda1 |
children | 68af994e7f3c |
line wrap: on
line diff
--- a/src/lib-storage/index/dbox/dbox-storage.c Sat Jun 27 19:55:17 2009 -0400 +++ b/src/lib-storage/index/dbox/dbox-storage.c Sat Jun 27 20:39:30 2009 -0400 @@ -160,11 +160,13 @@ static int create_dbox(struct mail_storage *storage, const char *path) { + const char *origin; mode_t mode; gid_t gid; - mailbox_list_get_dir_permissions(storage->list, NULL, &mode, &gid); - if (mkdir_parents_chown(path, mode, (uid_t)-1, gid) < 0 && + mailbox_list_get_dir_permissions(storage->list, NULL, + &mode, &gid, &origin); + if (mkdir_parents_chgrp(path, mode, gid, origin) < 0 && errno != EEXIST) { if (!mail_storage_set_error_from_errno(storage)) { mail_storage_set_critical(storage,