From: Aki Tuomi Date: Thu, 11 Sep 2025 07:51:51 +0000 (+0300) Subject: plugins/acl: doveadm acl - Fix crash if ACLs not enabled X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fef8823fc08fbf37334928db27bbdff5b1b4d158;p=thirdparty%2Fdovecot%2Fcore.git plugins/acl: doveadm acl - Fix crash if ACLs not enabled Ensure ACLs are actually enabled when opening mailbox. Fixes Panic: Module context acl_storage_module missing --- diff --git a/src/plugins/acl/doveadm-acl.c b/src/plugins/acl/doveadm-acl.c index a99aad722a..1c7ff5f4d0 100644 --- a/src/plugins/acl/doveadm-acl.c +++ b/src/plugins/acl/doveadm-acl.c @@ -49,6 +49,16 @@ cmd_acl_mailbox_open(struct doveadm_mail_cmd_context *ctx, mailbox_free(&box); return -1; } + + /* check that ACLs are enabled */ + struct acl_mailbox *abox = ACL_CONTEXT(box); + if (abox == NULL) { + e_error(box->event, "ACL not enabled for %s", user->username); + doveadm_mail_failed_error(ctx, MAIL_ERROR_NOTFOUND); + mailbox_free(&box); + return -1; + } + *box_r = box; return 0; }