]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
acl: Make sure acl-list and dict is rebuild when replacing/clearing ACLs
authorTimo Sirainen <tss@iki.fi>
Wed, 8 Sep 2010 16:02:48 +0000 (17:02 +0100)
committerTimo Sirainen <tss@iki.fi>
Wed, 8 Sep 2010 16:02:48 +0000 (17:02 +0100)
src/plugins/acl/acl-backend-vfile.c

index 2edc21392ca16178ddd665ee15c322d7a1078e38..9c5b2cd56041a37431dda66b2bf4a2d1e79bb22f 100644 (file)
@@ -1168,9 +1168,11 @@ acl_backend_vfile_object_update(struct acl_object *_aclobj,
                acl_cache_flush(_aclobj->backend->cache, _aclobj->name);
                return -1;
        }
-       /* make sure dovecot-acl-list gets updated if we added any
+       /* make sure dovecot-acl-list gets updated if we changed any
           lookup rights. */
-       if (acl_rights_has_nonowner_lookup_changes(&update->rights))
+       if (acl_rights_has_nonowner_lookup_changes(&update->rights) ||
+           update->modify_mode == ACL_MODIFY_MODE_REPLACE ||
+           update->modify_mode == ACL_MODIFY_MODE_CLEAR)
                (void)acl_backend_vfile_acllist_rebuild(backend);
        return 0;
 }