dovecot-2.2: acl: Optimize failing mailbox_move() when expunge r...

dovecot at dovecot.org dovecot at dovecot.org
Wed Jun 20 06:22:14 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/544dc10d4b04
changeset: 14614:544dc10d4b04
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jun 20 06:17:00 2012 +0300
description:
acl: Optimize failing mailbox_move() when expunge right is missing.

diffstat:

 src/plugins/acl/acl-mailbox.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 8d596b5adbab -r 544dc10d4b04 src/plugins/acl/acl-mailbox.c
--- a/src/plugins/acl/acl-mailbox.c	Wed Jun 20 06:15:46 2012 +0300
+++ b/src/plugins/acl/acl-mailbox.c	Wed Jun 20 06:17:00 2012 +0300
@@ -392,6 +392,12 @@
 	struct acl_mailbox *abox = ACL_CONTEXT(t->box);
 	enum acl_storage_rights save_right;
 
+	if (ctx->moving) {
+		if (acl_mailbox_right_lookup(mail->box,
+					     ACL_STORAGE_RIGHT_EXPUNGE) <= 0)
+			return -1;
+	}
+
 	save_right = (t->box->flags & MAILBOX_FLAG_POST_SESSION) != 0 ?
 		ACL_STORAGE_RIGHT_POST : ACL_STORAGE_RIGHT_INSERT;
 	if (acl_mailbox_right_lookup(t->box, save_right) <= 0)


More information about the dovecot-cvs mailing list