]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
acl: acl_mailbox_exists() - Add missing error handling
authorMarco Bettini <marco.bettini@open-xchange.com>
Tue, 23 Nov 2021 14:56:45 +0000 (15:56 +0100)
committermarco.bettini <marco.bettini@open-xchange.com>
Wed, 24 Nov 2021 08:58:34 +0000 (08:58 +0000)
Set mailbox storage error to "internal error" when acl_object_get_my_rights() fails (as per contract).

src/plugins/acl/acl-mailbox.c

index 4208e2d1ae1088d1c5a417b151c1124522477bd9..134be7feccb8119912c8577256401f318f5043e4 100644 (file)
@@ -480,9 +480,10 @@ static int acl_mailbox_exists(struct mailbox *box, bool auto_boxes,
        const char *const *rights;
        unsigned int i;
 
-       if (acl_object_get_my_rights(abox->aclobj, pool_datastack_create(),
-                                    &rights) < 0)
+       if (acl_object_get_my_rights(abox->aclobj, pool_datastack_create(), &rights) < 0) {
+               mail_storage_set_internal_error(box->storage);
                return -1;
+       }
 
        /* for now this is used only by IMAP SUBSCRIBE. we'll intentionally
           violate RFC 4314 here, because it says SUBSCRIBE should succeed only