Mercurial > dovecot > core-2.2
changeset 9935:364ee96c6195 HEAD
acl: Don't crash when creating children under a mailboxes with global ACL.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 13 Sep 2009 21:10:33 -0400 |
parents | 9444d7964766 |
children | 6fac2ade5dd6 |
files | src/plugins/acl/acl-mailbox.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ 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); }