dovecot-2.2: acl: Don't iterate ACL attributes if prefix has no ...

dovecot at dovecot.org dovecot at dovecot.org
Tue Mar 19 18:48:56 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/64c0449b8fec
changeset: 16049:64c0449b8fec
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Mar 19 18:48:47 2013 +0200
description:
acl: Don't iterate ACL attributes if prefix has no chance of matching them.

diffstat:

 src/plugins/acl/acl-attributes.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r 394e1c6f0aaf -r 64c0449b8fec src/plugins/acl/acl-attributes.c
--- a/src/plugins/acl/acl-attributes.c	Tue Mar 19 14:00:49 2013 +0200
+++ b/src/plugins/acl/acl-attributes.c	Tue Mar 19 18:48:47 2013 +0200
@@ -169,7 +169,9 @@
 		aiter->super = abox->module_ctx.super.
 			attribute_iter_init(box, type, prefix);
 		if (box->storage->user->admin &&
-		    type == MAIL_ATTRIBUTE_TYPE_SHARED) {
+		    type == MAIL_ATTRIBUTE_TYPE_SHARED &&
+		    strncmp(prefix, MAILBOX_ATTRIBUTE_PREFIX_ACL,
+			    strlen(prefix)) == 0) {
 			aiter->acl_iter = acl_object_list_init(abox->aclobj);
 			aiter->acl_name = str_new(default_pool, 128);
 			str_append(aiter->acl_name, MAILBOX_ATTRIBUTE_PREFIX_ACL);


More information about the dovecot-cvs mailing list