mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-06 17:31:01 +01:00

Dovecot is hit with this denial on Debian 10 (buster): ``` type=AVC msg=audit(1603647096.369:24514): apparmor="DENIED" operation="open" profile="dovecot" name="/usr/share/dovecot/dh.pem" pid=28774 comm="doveconf" requested_mask="r" denied_mask="r" fsuid=0 ouid=0 ``` This results in fatal error: ``` Oct 25 19:31:36 dovecot[28774]: doveconf: Fatal: Error in configuration file /etc/dovecot/conf.d/10-ssl.conf line 50: ssl_dh: Can't open file /usr/share/dovecot/dh.pem: Permission denied ``` Add rule to allow reading dh.pem.
83 lines
2.6 KiB
Text
83 lines
2.6 KiB
Text
# ------------------------------------------------------------------
|
|
#
|
|
# Copyright (C) 2009-2013 Canonical Ltd.
|
|
# Copyright (C) 2011-2020 Christian Boltz
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of version 2 of the GNU General Public
|
|
# License published by the Free Software Foundation.
|
|
#
|
|
# ------------------------------------------------------------------
|
|
# vim: ft=apparmor
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
profile dovecot /usr/{bin,sbin}/dovecot flags=(attach_disconnected) {
|
|
include <abstractions/authentication>
|
|
include <abstractions/base>
|
|
include <abstractions/dovecot-common>
|
|
include <abstractions/mysql>
|
|
include <abstractions/nameservice>
|
|
include <abstractions/ssl_certs>
|
|
include <abstractions/ssl_keys>
|
|
|
|
capability chown,
|
|
capability dac_override,
|
|
capability dac_read_search,
|
|
capability fsetid,
|
|
capability kill,
|
|
capability net_bind_service,
|
|
capability setuid,
|
|
capability sys_chroot,
|
|
capability sys_resource,
|
|
|
|
signal send set=(int,quit,term,kill) peer=/usr/lib/dovecot/*,
|
|
signal send set=(int,quit,term,kill) peer=dovecot-*,
|
|
|
|
unix (receive, send) type=stream peer=(label=/usr/lib/dovecot/anvil),
|
|
unix (receive, send) type=stream peer=(label=dovecot-anvil),
|
|
|
|
/etc/dovecot/** r,
|
|
/etc/mtab r,
|
|
/etc/lsb-release r,
|
|
/etc/SuSE-release r,
|
|
@{PROC}/@{pid}/mounts r,
|
|
@{PROC}/sys/fs/suid_dumpable r,
|
|
/usr/bin/doveconf rix,
|
|
/usr/lib/dovecot/anvil mrPx,
|
|
/usr/lib/dovecot/auth mrPx,
|
|
/usr/lib/dovecot/config mrPx,
|
|
/usr/lib/dovecot/dict mrPx,
|
|
/usr/lib/dovecot/director mrPx,
|
|
/usr/lib/dovecot/doveadm-server mrPx,
|
|
/usr/lib/dovecot/dovecot-auth Pxmr,
|
|
/usr/lib/dovecot/imap Pxmr,
|
|
/usr/lib/dovecot/imap-login Pxmr,
|
|
/usr/lib/dovecot/lmtp mrPx,
|
|
/usr/lib/dovecot/log mrPx,
|
|
/usr/lib/dovecot/managesieve mrPx,
|
|
/usr/lib/dovecot/managesieve-login Pxmr,
|
|
/usr/lib/dovecot/pop3 mrPx,
|
|
/usr/lib/dovecot/pop3-login Pxmr,
|
|
/usr/lib/dovecot/replicator mrPx,
|
|
/usr/lib/dovecot/script-login Px,
|
|
/usr/lib/dovecot/ssl-build-param rix,
|
|
/usr/lib/dovecot/ssl-params mrPx,
|
|
/usr/lib/dovecot/stats Px,
|
|
/usr/{bin,sbin}/dovecot mrix,
|
|
/usr/share/dovecot/dh.pem r,
|
|
/usr/share/dovecot/protocols.d/ r,
|
|
/usr/share/dovecot/protocols.d/** r,
|
|
/var/lib/dovecot/ w,
|
|
/var/lib/dovecot/* rwkl,
|
|
/var/spool/postfix/private/auth w,
|
|
/var/spool/postfix/private/dovecot-lmtp w,
|
|
@{run}/dovecot/ rw,
|
|
@{run}/dovecot/** rw,
|
|
link @{run}/dovecot/** -> /var/lib/dovecot/**,
|
|
|
|
# Site-specific additions and overrides. See local/README for details.
|
|
include if exists <local/usr.sbin.dovecot>
|
|
}
|