]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
acl: vfile_object_modify_right() - Remove the whole identifier if it has no rights...
authorMarco Bettini <marco.bettini@open-xchange.com>
Wed, 22 Oct 2025 15:25:17 +0000 (15:25 +0000)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Thu, 30 Oct 2025 11:46:19 +0000 (11:46 +0000)
src/plugins/acl/acl-backend-vfile-update.c

index 1c81a4f8fe528faf144641a858598f13c5219d79..df2aad25509bbc81c7e365fd49339b2c2d10ec0b 100644 (file)
@@ -72,7 +72,8 @@ vfile_object_modify_right(struct acl_object *aclobj, unsigned int idx,
                                    update->rights.neg_rights,
                                    update->neg_modify_mode);
 
-       if (right->rights == NULL && right->neg_rights == NULL) {
+       if ((right->rights == NULL || right->rights[0] == NULL) &&
+           (right->neg_rights == NULL || right->neg_rights[0] == NULL)) {
                /* this identifier no longer exists */
                array_delete(&aclobj->rights, idx, 1);
                c1 = TRUE;