Merge add profile names to dovecot profiles

Update the dovecot profiles to use names instead of pathnames.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/565
Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
John Johansen 2020-06-12 10:25:32 +00:00
commit e15fdd1be9
18 changed files with 40 additions and 35 deletions

View file

@ -1,6 +1,6 @@
# ------------------------------------------------------------------
#
# Copyright (C) 2013 Christian Boltz
# Copyright (C) 2013-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
@ -13,7 +13,7 @@ abi <abi/3.0>,
include <tunables/global>
/usr/lib/dovecot/anvil {
profile dovecot-anvil /usr/lib/dovecot/anvil {
include <abstractions/base>
include <abstractions/dovecot-common>

View file

@ -1,6 +1,6 @@
# ------------------------------------------------------------------
#
# Copyright (C) 2013-2018 Christian Boltz
# Copyright (C) 2013-2020 Christian Boltz
# Copyright (C) 2014 Christian Wittmer
#
# This program is free software; you can redistribute it and/or
@ -14,7 +14,7 @@ abi <abi/3.0>,
include <tunables/global>
/usr/lib/dovecot/auth {
profile dovecot-auth /usr/lib/dovecot/auth {
include <abstractions/authentication>
include <abstractions/base>
include <abstractions/mysql>

View file

@ -1,6 +1,6 @@
# ------------------------------------------------------------------
#
# Copyright (C) 2013-2018 Christian Boltz
# Copyright (C) 2013-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
@ -13,7 +13,7 @@ abi <abi/3.0>,
include <tunables/global>
/usr/lib/dovecot/config {
profile dovecot-config /usr/lib/dovecot/config {
include <abstractions/base>
include <abstractions/nameservice>
include <abstractions/dovecot-common>

View file

@ -2,7 +2,7 @@
#
# Copyright (C) 2009 Dulmandakh Sukhbaatar <dulmandakh@gmail.com>
# Copyright (C) 2009-2014 Canonical Ltd.
# Copyright (C) 2011-2013 Christian Boltz
# 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
@ -16,7 +16,7 @@ abi <abi/3.0>,
include <tunables/global>
include <tunables/dovecot>
/usr/lib/dovecot/deliver {
profile dovecot-deliver /usr/lib/dovecot/deliver {
include <abstractions/base>
include <abstractions/nameservice>
include <abstractions/dovecot-common>

View file

@ -1,6 +1,6 @@
# ------------------------------------------------------------------
#
# Copyright (C) 2013 Christian Boltz
# Copyright (C) 2013-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
@ -13,7 +13,7 @@ abi <abi/3.0>,
include <tunables/global>
/usr/lib/dovecot/dict {
profile dovecot-dict /usr/lib/dovecot/dict {
include <abstractions/base>
include <abstractions/mysql>
include <abstractions/nameservice>

View file

@ -1,7 +1,7 @@
# ------------------------------------------------------------------
#
# Copyright (C) 2009-2013 Canonical Ltd.
# Copyright (C) 2013 Christian Boltz
# Copyright (C) 2013-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
@ -14,7 +14,7 @@ abi <abi/3.0>,
include <tunables/global>
/usr/lib/dovecot/dovecot-auth {
profile dovecot-dovecot-auth /usr/lib/dovecot/dovecot-auth {
include <abstractions/authentication>
include <abstractions/base>
include <abstractions/nameservice>

View file

@ -1,6 +1,6 @@
# ------------------------------------------------------------------
#
# Copyright (C) 2013-2016 Christian Boltz
# Copyright (C) 2013-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
@ -14,7 +14,7 @@ abi <abi/3.0>,
include <tunables/global>
include <tunables/dovecot>
/usr/lib/dovecot/dovecot-lda flags=(attach_disconnected) {
profile dovecot-dovecot-lda /usr/lib/dovecot/dovecot-lda flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/nameservice>
include <abstractions/dovecot-common>

View file

@ -1,7 +1,7 @@
# ------------------------------------------------------------------
#
# Copyright (C) 2009-2010 Canonical Ltd.
# Copyright (C) 2011-2013 Christian Boltz
# 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
@ -15,7 +15,7 @@ abi <abi/3.0>,
include <tunables/global>
include <tunables/dovecot>
/usr/lib/dovecot/imap {
profile dovecot-imap /usr/lib/dovecot/imap {
include <abstractions/base>
include <abstractions/nameservice>
include <abstractions/dovecot-common>

View file

@ -1,7 +1,7 @@
# ------------------------------------------------------------------
#
# Copyright (C) 2009-2011 Canonical Ltd.
# Copyright (C) 2013 Christian Boltz
# Copyright (C) 2013-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
@ -13,7 +13,8 @@
abi <abi/3.0>,
include <tunables/global>
/usr/lib/dovecot/imap-login {
profile dovecot-imap-login /usr/lib/dovecot/imap-login {
include <abstractions/base>
include <abstractions/dovecot-common>
include <abstractions/openssl>

View file

@ -1,6 +1,6 @@
# ------------------------------------------------------------------
#
# Copyright (C) 2013 Christian Boltz
# Copyright (C) 2013-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
@ -14,7 +14,7 @@ abi <abi/3.0>,
include <tunables/global>
include <tunables/dovecot>
/usr/lib/dovecot/lmtp {
profile dovecot-lmtp /usr/lib/dovecot/lmtp {
include <abstractions/base>
include <abstractions/nameservice>
include <abstractions/dovecot-common>

View file

@ -1,6 +1,6 @@
# ------------------------------------------------------------------
#
# Copyright (C) 2013 Christian Boltz
# Copyright (C) 2013-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
@ -13,7 +13,7 @@ abi <abi/3.0>,
include <tunables/global>
/usr/lib/dovecot/log flags=(attach_disconnected) {
profile dovecot-log /usr/lib/dovecot/log flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/dovecot-common>

View file

@ -1,6 +1,6 @@
# ------------------------------------------------------------------
#
# Copyright (C) 2013 Christian Boltz
# Copyright (C) 2013-2020 Christian Boltz
# Copyright (C) 2014 Christian Wittmer
#
# This program is free software; you can redistribute it and/or
@ -15,7 +15,7 @@ abi <abi/3.0>,
include <tunables/global>
include <tunables/dovecot>
/usr/lib/dovecot/managesieve {
profile dovecot-managesieve /usr/lib/dovecot/managesieve {
include <abstractions/base>
include <abstractions/dovecot-common>

View file

@ -2,7 +2,7 @@
#
# Copyright (c) 2009 Dulmandakh Sukhbaatar <dulmandakh@gmail.com>
# Copyright (C) 2009-2011 Canonical Ltd.
# Copyright (C) 2013 Christian Boltz
# Copyright (C) 2013-2020 Christian Boltz
# Copyright (C) 2014 Christian Wittmer
#
# This program is free software; you can redistribute it and/or
@ -15,7 +15,8 @@
abi <abi/3.0>,
include <tunables/global>
/usr/lib/dovecot/managesieve-login {
profile dovecot-managesieve-login /usr/lib/dovecot/managesieve-login {
include <abstractions/base>
include <abstractions/dovecot-common>
include <abstractions/openssl>

View file

@ -1,7 +1,7 @@
# ------------------------------------------------------------------
#
# Copyright (C) 2009-2010 Canonical Ltd.
# Copyright (C) 2011-2013 Christian Boltz
# 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
@ -15,7 +15,7 @@ abi <abi/3.0>,
include <tunables/global>
include <tunables/dovecot>
/usr/lib/dovecot/pop3 {
profile dovecot-pop3 /usr/lib/dovecot/pop3 {
include <abstractions/base>
include <abstractions/nameservice>
include <abstractions/dovecot-common>

View file

@ -1,7 +1,7 @@
# ------------------------------------------------------------------
#
# Copyright (C) 2009-2011 Canonical Ltd.
# Copyright (C) 2013 Christian Boltz
# Copyright (C) 2013-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
@ -13,7 +13,8 @@
abi <abi/3.0>,
include <tunables/global>
/usr/lib/dovecot/pop3-login {
profile dovecot-pop3-login /usr/lib/dovecot/pop3-login {
include <abstractions/base>
include <abstractions/dovecot-common>
include <abstractions/openssl>

View file

@ -1,6 +1,6 @@
# ------------------------------------------------------------------
#
# Copyright (C) 2013 Christian Boltz
# Copyright (C) 2013-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
@ -13,7 +13,7 @@ abi <abi/3.0>,
include <tunables/global>
/usr/lib/dovecot/ssl-params {
profile dovecot-ssl-params /usr/lib/dovecot/ssl-params {
include <abstractions/base>
include <abstractions/dovecot-common>

View file

@ -1,6 +1,6 @@
# ------------------------------------------------------------------
#
# Copyright (C) 2018 Christian Boltz
# Copyright (C) 2018-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
@ -13,7 +13,7 @@ abi <abi/3.0>,
include <tunables/global>
/usr/lib/dovecot/stats {
profile dovecot-stats /usr/lib/dovecot/stats {
include <abstractions/base>
include <abstractions/dovecot-common>

View file

@ -1,7 +1,7 @@
# ------------------------------------------------------------------
#
# Copyright (C) 2009-2013 Canonical Ltd.
# Copyright (C) 2011-2013 Christian Boltz
# 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
@ -34,8 +34,10 @@ profile dovecot /usr/{bin,sbin}/dovecot flags=(attach_disconnected) {
capability sys_resource,
signal send set=(int,quit,term) peer=/usr/lib/dovecot/*,
signal send set=(int,quit,term) 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,