diff --git a/apparmor.d/groups/avahi/avahi-autoipd b/apparmor.d/groups/avahi/avahi-autoipd new file mode 100644 index 000000000..2a68007c6 --- /dev/null +++ b/apparmor.d/groups/avahi/avahi-autoipd @@ -0,0 +1,27 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2022 Jeroen Rijken +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}{s,}bin/avahi-autoipd +profile avahi-autoipd @{exec_path} flags=(complain) { + include + include + + network inet dgram, + network inet6 dgram, + network inet stream, + network inet6 stream, + network netlink raw, + + signal receive set=kill,term, + + @{exec_path} rm, + /etc/avahi/avahi-autoipd.action rix, + + include if exists +} + diff --git a/apparmor.d/groups/avahi/avahi-browse b/apparmor.d/groups/avahi/avahi-browse new file mode 100644 index 000000000..e46b439b1 --- /dev/null +++ b/apparmor.d/groups/avahi/avahi-browse @@ -0,0 +1,32 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2022 Jeroen Rijken +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}bin/avahi-browse /{usr/,}bin/avahi-browse-domains +profile avahi-browse @{exec_path} flags=(complain) { + include + include + include + + dbus send bus=system path=/ + interface=org.freedesktop.DBus.Peer + member=Ping, + + dbus send bus=system path=/ + interface=org.freedesktop.Avahi.Server + member={GetAPIVersion,GetState,ServiceTypeBrowserNew,ServiceBrowserNew}, + + dbus receive bus=system path=/Client[0-9]/ServiceTypeBrowser[0-9] + interface=org.freedesktop.Avahi.ServiceTypeBrowser + member={ItemNew,CacheExhausted,AllForNow}, + + @{exec_path} rm, + + /{usr/,}lib/x86_64-linux-gnu/avahi/service-types.db rwk, + + include if exists +} diff --git a/apparmor.d/groups/avahi/avahi-daemon b/apparmor.d/groups/avahi/avahi-daemon new file mode 100644 index 000000000..439377d13 --- /dev/null +++ b/apparmor.d/groups/avahi/avahi-daemon @@ -0,0 +1,23 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2022 Jeroen Rijken +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}bin/avahi-daemon +profile avahi-daemon @{exec_path} flags=(complain) { + include + include + + network inet dgram, + network inet6 dgram, + + @{exec_path} rm, + + /etc/avahi/** r, + + include if exists +} + diff --git a/apparmor.d/groups/avahi/avahi-publish b/apparmor.d/groups/avahi/avahi-publish new file mode 100644 index 000000000..16256223b --- /dev/null +++ b/apparmor.d/groups/avahi/avahi-publish @@ -0,0 +1,18 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2022 Jeroen Rijken +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}bin/avahi-publish /{usr/,}bin/avahi-publish-address /{usr/,}bin/avahi-publish-service +profile avahi-publish @{exec_path} flags=(complain) { + include + include + + @{exec_path} rm, + + include if exists +} + diff --git a/apparmor.d/groups/avahi/avahi-resolve b/apparmor.d/groups/avahi/avahi-resolve new file mode 100644 index 000000000..b4dca2949 --- /dev/null +++ b/apparmor.d/groups/avahi/avahi-resolve @@ -0,0 +1,34 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2022 Jeroen Rijken +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}bin/avahi-resolve /{usr/,}bin/avahi-resolve-address /{usr/,}bin/avahi-resolve-host-name +profile avahi-resolve @{exec_path} flags=(complain) { + include + include + include + + dbus send bus=system path=/ + interface=org.freedesktop.DBus.Peer + member=Ping, + + dbus send bus=system path=/ + interface=org.freedesktop.Avahi.Server + member={GetAPIVersion,GetState,AddressResolverNew}, + + dbus send bus=system path=/Client[0-9]/AddressResolver[0-9] + interface=org.freedesktop.Avahi.AddressResolver + member={Free,HostNameResolverNew,}, + + dbus receive bus=system path=/Client[0-9]/AddressResolver[0-9] + interface=org.freedesktop.Avahi.AddressResolver + member={Failure,Found}, + + @{exec_path} rm, + + include if exists +} diff --git a/apparmor.d/groups/avahi/avahi-set-host-name b/apparmor.d/groups/avahi/avahi-set-host-name new file mode 100644 index 000000000..f970b63ca --- /dev/null +++ b/apparmor.d/groups/avahi/avahi-set-host-name @@ -0,0 +1,18 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2022 Jeroen Rijken +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}bin/avahi-set-host-name +profile avahi-set-host-name @{exec_path} flags=(complain) { + include + include + + @{exec_path} rm, + + include if exists +} +