dovecot-1.0: If user didn't have "lookup" right to mailbox, "ins...

dovecot at dovecot.org dovecot at dovecot.org
Wed Jul 18 00:03:23 EEST 2007


details:   http://hg.dovecot.org/dovecot-1.0/rev/e0b3d8f7883b
changeset: 5350:e0b3d8f7883b
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jul 17 23:58:03 2007 +0300
description:
If user didn't have "lookup" right to mailbox, "insert" right didn't work.

diffstat:

1 file changed, 9 insertions(+)
src/plugins/acl/acl-storage.c |    9 +++++++++

diffs (19 lines):

diff -r bb7d6acd625f -r e0b3d8f7883b src/plugins/acl/acl-storage.c
--- a/src/plugins/acl/acl-storage.c	Tue Jul 17 20:39:27 2007 +0300
+++ b/src/plugins/acl/acl-storage.c	Tue Jul 17 23:58:03 2007 +0300
@@ -245,6 +245,15 @@ static int acl_get_mailbox_name_status(s
 				     ACL_STORAGE_RIGHT_LOOKUP, NULL);
 	if (ret < 0)
 		return -1;
+
+	if (ret == 0) {
+		/* If we have INSERT right for the mailbox, we'll need to
+		   reveal its existence so that APPEND and COPY works. */
+		ret = acl_storage_have_right(storage, name,
+					     ACL_STORAGE_RIGHT_INSERT, NULL);
+		if (ret < 0)
+			return -1;
+	}
 
 	if (astorage->super.get_mailbox_name_status(storage, name, status) < 0)
 		return -1;


More information about the dovecot-cvs mailing list