refractor: move more profiles to groups.
This commit is contained in:
parent
33681e14f2
commit
8ba3dbd90f
38 changed files with 3 additions and 2 deletions
|
|
@ -1,69 +0,0 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2021-2022 Mikhail Morfikov
|
||||
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/4.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{bin}/blueman-*
|
||||
profile blueman @{exec_path} flags=(attach_disconnected) {
|
||||
include <abstractions/base>
|
||||
include <abstractions/audio-client>
|
||||
include <abstractions/bus-session>
|
||||
include <abstractions/dconf-write>
|
||||
include <abstractions/desktop>
|
||||
include <abstractions/fontconfig-cache-read>
|
||||
include <abstractions/nameservice-strict>
|
||||
include <abstractions/python>
|
||||
include <abstractions/thumbnails-cache-read>
|
||||
include <abstractions/user-download-strict>
|
||||
|
||||
network inet stream,
|
||||
network inet6 stream,
|
||||
network netlink raw,
|
||||
network bluetooth raw,
|
||||
|
||||
ptrace (read) peer=gjs-console,
|
||||
|
||||
#aa:dbus own bus=session name=org.blueman.Applet
|
||||
#aa:dbus own bus=session name=org.blueman.Manager
|
||||
|
||||
@{exec_path} mrix,
|
||||
|
||||
@{sh_path} rix,
|
||||
@{open_path} rix,
|
||||
|
||||
/usr/share/blueman/{,**} r,
|
||||
|
||||
/var/lib/blueman/network.state r,
|
||||
|
||||
owner @{HOME}/ r,
|
||||
owner @{HOME}/bluetooth*/ r,
|
||||
owner @{HOME}/bluetooth*/* rw,
|
||||
|
||||
owner @{user_cache_dirs}/blueman-tray-@{int} rw,
|
||||
owner @{user_cache_dirs}/blueman-services-@{int} rw,
|
||||
owner @{user_cache_dirs}/blueman-adapters-@{int} rw,
|
||||
owner @{user_cache_dirs}/blueman-manager-@{int} rw,
|
||||
owner @{user_cache_dirs}/blueman-applet-@{int} rw,
|
||||
|
||||
owner @{user_cache_dirs}/obexd/ rw,
|
||||
owner @{user_cache_dirs}/obexd/* rw,
|
||||
|
||||
@{PROC}/@{pids}/cmdline r,
|
||||
owner @{PROC}/@{pid}/fd/ r,
|
||||
owner @{PROC}/@{pid}/mounts r,
|
||||
|
||||
/dev/dri/card@{int} rw,
|
||||
/dev/rfkill r,
|
||||
/dev/shm/ r,
|
||||
/dev/tty rw,
|
||||
|
||||
deny owner @{user_share_dirs}/gvfs-metadata/{,*} r,
|
||||
|
||||
include if exists <local/blueman>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2021 Mikhail Morfikov
|
||||
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/4.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{lib}/blueman-mechanism @{lib}/blueman/blueman-mechanism
|
||||
profile blueman-mechanism @{exec_path} flags=(attach_disconnected) {
|
||||
include <abstractions/base>
|
||||
include <abstractions/nameservice-strict>
|
||||
include <abstractions/python>
|
||||
|
||||
capability mknod,
|
||||
capability net_admin,
|
||||
capability sys_nice,
|
||||
|
||||
network inet stream,
|
||||
network inet6 stream,
|
||||
network netlink raw,
|
||||
|
||||
#aa:dbus own bus=system name=org.blueman.Mechanism
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
@{lib}/ r,
|
||||
|
||||
/var/lib/blueman/network.state rw,
|
||||
|
||||
owner @{PROC}/@{pid}/fd/ r,
|
||||
owner @{PROC}/@{pid}/mounts r,
|
||||
|
||||
/dev/rfkill rw,
|
||||
|
||||
# For network AP
|
||||
#@{bin}/ip rix,
|
||||
#@{bin}/xtables-nft-multi rix,
|
||||
#@{bin}/dnsmasq rPx,
|
||||
#@{bin}/dhclient rPx,
|
||||
# @{PROC}/sys/net/ipv4/ip_forward w,
|
||||
# @{PROC}/sys/net/ipv4/conf/ r,
|
||||
# @{PROC}/sys/net/ipv4/conf/*/forwarding w,
|
||||
#owner @{run}/blueman-iptables rw,
|
||||
#owner @{run}/blueman-netconfig rw,
|
||||
|
||||
include if exists <local/blueman-mechanism>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2021 Mikhail Morfikov
|
||||
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/4.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{lib}/blueman-rfcomm-watcher
|
||||
profile blueman-rfcomm-watcher @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/python>
|
||||
|
||||
@{exec_path} r,
|
||||
|
||||
@{lib}/ r,
|
||||
|
||||
owner @{PROC}/@{pid}/mounts r,
|
||||
|
||||
owner @{HOME}/.Xauthority r,
|
||||
|
||||
include if exists <local/blueman-rfcomm-watcher>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2021 Mikhail Morfikov
|
||||
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/4.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{bin}/bluemoon
|
||||
profile bluemoon @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
include if exists <local/bluemoon>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2015-2021 Mikhail Morfikov
|
||||
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/4.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{bin}/bluetoothctl
|
||||
profile bluetoothctl @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/etc/inputrc r,
|
||||
|
||||
owner @{user_cache_dirs}/ rw,
|
||||
owner @{user_cache_dirs}/.bluetoothctl_history rw,
|
||||
owner @{user_cache_dirs}/.bluetoothctl_history-@{pid}.tmp rw,
|
||||
|
||||
include if exists <local/bluetoothctl>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2015-2022 Mikhail Morfikov
|
||||
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/4.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{lib}/bluetooth/bluetoothd
|
||||
profile bluetoothd @{exec_path} flags=(attach_disconnected) {
|
||||
include <abstractions/base>
|
||||
include <abstractions/bus-system>
|
||||
include <abstractions/bus/org.freedesktop.hostname1>
|
||||
|
||||
# Needed for configuring HCI interfaces
|
||||
capability net_admin,
|
||||
capability net_bind_service,
|
||||
|
||||
network bluetooth raw,
|
||||
network bluetooth seqpacket,
|
||||
network bluetooth stream,
|
||||
network alg seqpacket,
|
||||
network netlink raw,
|
||||
|
||||
#aa:dbus own bus=system name=org.bluez
|
||||
|
||||
dbus send bus=system path=/{,MediaEndpoint}
|
||||
interface=org.freedesktop.DBus.ObjectManager
|
||||
member=GetManagedObjects
|
||||
peer=(name=@{busname}),
|
||||
|
||||
dbus send bus=system path=/
|
||||
interface=org.freedesktop.DBus.ObjectManager
|
||||
member=InterfacesRemoved
|
||||
peer=(name=org.freedesktop.DBus),
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
@{lib}/@{multiarch}/bluetooth/plugins/*.so mr,
|
||||
|
||||
/etc/bluetooth/{,*.conf} r,
|
||||
|
||||
/var/lib/bluetooth/{,**} rw,
|
||||
|
||||
@{run}/sdp rw,
|
||||
owner @{run}/systemd/notify w,
|
||||
@{run}/udev/data/+hid:* r, # for HID-Compliant Keyboard
|
||||
|
||||
@{sys}/devices/@{pci}/rfkill@{int}/name r,
|
||||
@{sys}/devices/@{pci}/**/{uevent,name} r,
|
||||
@{sys}/devices/platform/**/rfkill/**/name r,
|
||||
@{sys}/devices/virtual/dmi/id/chassis_type r,
|
||||
@{sys}/devices/virtual/misc/uhid/**/uevent r,
|
||||
|
||||
@{PROC}/sys/kernel/hostname r,
|
||||
|
||||
/dev/uhid rw,
|
||||
/dev/uinput rw,
|
||||
/dev/rfkill rw,
|
||||
/dev/hidraw@{int} rw,
|
||||
|
||||
include if exists <local/bluetoothd>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2022-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/4.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{lib}/boltd
|
||||
profile boltd @{exec_path} flags=(attach_disconnected) {
|
||||
include <abstractions/base>
|
||||
include <abstractions/bus-system>
|
||||
include <abstractions/bus/org.freedesktop.PolicyKit1>
|
||||
include <abstractions/nameservice-strict>
|
||||
|
||||
capability net_admin,
|
||||
|
||||
network netlink raw,
|
||||
|
||||
#aa:dbus own bus=system name=org.freedesktop.bolt
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/var/lib/boltd/{,**} rw,
|
||||
|
||||
owner @{run}/boltd/{,**} rw,
|
||||
|
||||
@{att}/@{run}/systemd/notify w,
|
||||
|
||||
@{run}/udev/data/+thunderbolt:* r,
|
||||
|
||||
@{sys}/bus/ r,
|
||||
@{sys}/bus/thunderbolt/devices/ r,
|
||||
@{sys}/bus/wmi/devices/ r,
|
||||
@{sys}/class/ r,
|
||||
@{sys}/devices/@{pci}/@{uuid}/uevent r,
|
||||
@{sys}/devices/@{pci}/device r,
|
||||
@{sys}/devices/@{pci}/domain@{int}/ r,
|
||||
@{sys}/devices/@{pci}/domain@{int}/{security,uevent} r,
|
||||
@{sys}/devices/@{pci}/domain@{int}/**/ r,
|
||||
@{sys}/devices/@{pci}/domain@{int}/**/{authorized,generation} r,
|
||||
@{sys}/devices/@{pci}/domain@{int}/**/{boot,rx_lanes,rx_speed,tx_lanes,tx_speed} r,
|
||||
@{sys}/devices/@{pci}/domain@{int}/**/{uevent,unique_id} r,
|
||||
@{sys}/devices/@{pci}/domain@{int}/**/{vendor,device}_name r,
|
||||
@{sys}/devices/@{pci}/domain@{int}/boot_acl rw,
|
||||
@{sys}/devices/@{pci}/domain@{int}/iommu_dma_protection r,
|
||||
@{sys}/devices/platform/**/uevent r,
|
||||
@{sys}/devices/platform/*/wmi_bus/wmi_bus-*/@{uuid}/force_power rw,
|
||||
@{sys}/devices/virtual/dmi/id/{sys_vendor,product_version,product_name} r,
|
||||
|
||||
include if exists <local/boltd>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2019-2022 Mikhail Morfikov
|
||||
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/4.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{bin}/dmesg
|
||||
profile dmesg @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/consoles>
|
||||
|
||||
capability dac_read_search,
|
||||
capability syslog,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
@{sh_path} rix,
|
||||
@{pager_path} rPx -> child-pager,
|
||||
|
||||
/usr/share/terminfo/** r,
|
||||
|
||||
@{PROC}/sys/kernel/pid_max r,
|
||||
|
||||
/dev/kmsg r,
|
||||
|
||||
deny @{bin}/{,*/} r,
|
||||
deny /{usr/,}local/{,s}bin/ r,
|
||||
deny /var/lib/flatpak/exports/bin/ r,
|
||||
deny @{HOME}/.go/bin/ r,
|
||||
deny @{user_bin_dirs}/ r,
|
||||
|
||||
include if exists <local/dmesg>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/4.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{bin}/firewall-applet
|
||||
profile firewall-applet @{exec_path} flags=(attach_disconnected) {
|
||||
include <abstractions/base>
|
||||
include <abstractions/consoles>
|
||||
include <abstractions/dconf-write>
|
||||
include <abstractions/desktop>
|
||||
include <abstractions/python>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
@{bin}/ r,
|
||||
@{bin}/python3.@{int} r,
|
||||
|
||||
owner @{PROC}/@{pid}/cmdline r,
|
||||
owner @{PROC}/@{pid}/mounts r,
|
||||
|
||||
include if exists <local/firewall-applet>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/4.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{bin}/firewall-config
|
||||
profile firewall-config @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/dconf-write>
|
||||
include <abstractions/desktop>
|
||||
include <abstractions/python>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
@{open_path} rPx -> child-open-help,
|
||||
|
||||
/usr/share/firewalld/__pycache__/ rw,
|
||||
|
||||
/usr/share/firewalld/{,**} r,
|
||||
|
||||
owner @{PROC}/@{pid}/mounts r,
|
||||
|
||||
include if exists <local/firewall-config>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2023-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/4.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{bin}/firewalld
|
||||
profile firewalld @{exec_path} flags=(attach_disconnected) {
|
||||
include <abstractions/base>
|
||||
include <abstractions/app/kmod>
|
||||
include <abstractions/bus-session>
|
||||
include <abstractions/bus-system>
|
||||
include <abstractions/bus/org.freedesktop.NetworkManager>
|
||||
include <abstractions/bus/org.freedesktop.PolicyKit1>
|
||||
include <abstractions/nameservice-strict>
|
||||
|
||||
capability dac_read_search,
|
||||
capability mknod,
|
||||
capability net_admin,
|
||||
capability net_raw,
|
||||
capability setpcap,
|
||||
capability sys_module,
|
||||
|
||||
network inet raw,
|
||||
network inet6 raw,
|
||||
network netlink raw,
|
||||
|
||||
#aa:dbus own bus=system name=org.fedoraproject.FirewallD1
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
@{bin}/ r,
|
||||
@{bin}/alts rix,
|
||||
@{bin}/ebtables-legacy rix,
|
||||
@{bin}/ebtables-legacy-restore rix,
|
||||
@{bin}/false rix,
|
||||
@{bin}/ipset rix,
|
||||
@{bin}/kmod rix,
|
||||
@{bin}/modprobe rix,
|
||||
@{bin}/xtables-legacy-multi rix,
|
||||
@{bin}/xtables-nft-multi rix,
|
||||
|
||||
/usr/local/lib/python3.@{int}/dist-packages/ r,
|
||||
|
||||
/usr/share/iproute2/{,**} r,
|
||||
/usr/share/libalternatives/{,**} r,
|
||||
|
||||
/etc/firewalld/{,**} rw,
|
||||
/etc/iproute2/group r,
|
||||
/etc/iproute2/rt_realms r,
|
||||
|
||||
/var/lib/ebtables/lock rwk,
|
||||
|
||||
/var/log/firewalld rw,
|
||||
|
||||
@{run}/firewalld/{,*} rw,
|
||||
@{run}/modprobe.d/{,*.conf} r,
|
||||
@{run}/xtables.lock rwk,
|
||||
|
||||
@{sys}/module/compression r,
|
||||
@{sys}/module/*/initstate r,
|
||||
|
||||
@{PROC}/sys/kernel/modprobe r,
|
||||
@{PROC}/sys/net/ipv{4,6}/ip_forward rw,
|
||||
owner @{PROC}/@{pid}/fd/ r,
|
||||
owner @{PROC}/@{pid}/mounts r,
|
||||
owner @{PROC}/@{pids}/net/ip_tables_names r,
|
||||
|
||||
include if exists <local/firewalld>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
||||
Loading…
Add table
Add a link
Reference in a new issue