# HG changeset patch # User Timo Sirainen # Date 1252890573 14400 # Node ID 6df681067e0a3cd5a37b14576f3dfbf16b3f82f9 # Parent 28241a6e1178302ee8eb483cbcc46f504bf10328 acl: Don't crash when creating children under a mailboxes with global ACL. diff -r 28241a6e1178 -r 6df681067e0a src/plugins/acl/acl-storage.c --- a/src/plugins/acl/acl-storage.c Sun Sep 13 19:01:28 2009 -0400 +++ b/src/plugins/acl/acl-storage.c Sun Sep 13 21:09:33 2009 -0400 @@ -156,8 +156,11 @@ parent_aclobj = acl_object_init_from_parent(astorage->rights.backend, storage, name); iter = acl_object_list_init(parent_aclobj); - while (acl_object_list_next(iter, &update.rights) > 0) - (void)acl_object_update(child_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(child_aclobj, &update); + } acl_object_list_deinit(&iter); acl_object_deinit(&parent_aclobj); acl_object_deinit(&child_aclobj);