dovecot-2.2: lib-storage: Don't do filesystem permission lookups...

dovecot at dovecot.org dovecot at dovecot.org
Fri Nov 22 23:52:52 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/2b79848b013f
changeset: 17008:2b79848b013f
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Nov 22 23:52:37 2013 +0200
description:
lib-storage: Don't do filesystem permission lookups if storage has no mailbox root dir.

diffstat:

 src/lib-storage/mailbox-list.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r fd071679352a -r 2b79848b013f src/lib-storage/mailbox-list.c
--- a/src/lib-storage/mailbox-list.c	Fri Nov 22 23:31:36 2013 +0200
+++ b/src/lib-storage/mailbox-list.c	Fri Nov 22 23:52:37 2013 +0200
@@ -843,6 +843,7 @@
 				      const char *name,
 				      struct mailbox_permissions *permissions_r)
 {
+	struct mail_storage *storage;
 	const char *path, *parent_name, *parent_path, *p;
 	struct stat st;
 
@@ -865,7 +866,10 @@
 		(void)mailbox_list_get_root_path(list, MAILBOX_LIST_PATH_TYPE_DIR,
 						 &path);
 	}
-	if (path == NULL) {
+	mailbox_list_get_default_storage(list, &storage);
+
+	if (path == NULL ||
+	    (storage->class_flags & MAIL_STORAGE_CLASS_FLAG_NO_ROOT) != 0) {
 		/* no filesystem support in storage */
 	} else if (stat(path, &st) < 0) {
 		if (errno == EACCES) {


More information about the dovecot-cvs mailing list