dovecot-2.0: acl: Don't crash when creating children under a mai...

dovecot at dovecot.org dovecot at dovecot.org
Mon Sep 14 04:10:39 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/364ee96c6195
changeset: 9935:364ee96c6195
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Sep 13 21:10:33 2009 -0400
description:
acl: Don't crash when creating children under a mailboxes with global ACL.

diffstat:

1 file changed, 5 insertions(+), 2 deletions(-)
src/plugins/acl/acl-mailbox.c |    7 +++++--

diffs (17 lines):

diff -r 9444d7964766 -r 364ee96c6195 src/plugins/acl/acl-mailbox.c
--- a/src/plugins/acl/acl-mailbox.c	Sun Sep 13 19:01:01 2009 -0400
+++ b/src/plugins/acl/acl-mailbox.c	Sun Sep 13 21:10:33 2009 -0400
@@ -116,8 +116,11 @@ static void acl_mailbox_copy_acls_from_p
 	parent_aclobj = acl_object_init_from_parent(alist->rights.backend,
 						    box->name);
 	iter = acl_object_list_init(parent_aclobj);
-	while (acl_object_list_next(iter, &update.rights) > 0)
-		(void)acl_object_update(abox->aclobj, &update);
+	while (acl_object_list_next(iter, &update.rights) > 0) {
+		/* don't copy global ACL rights. */
+		if (!update.rights.global)
+			(void)acl_object_update(abox->aclobj, &update);
+	}
 	acl_object_list_deinit(&iter);
 	acl_object_deinit(&parent_aclobj);
 }


More information about the dovecot-cvs mailing list