apparmor.d/apparmor.d/profiles-a-f/btop
2023-01-28 15:25:01 +00:00

47 lines
1.4 KiB
Text

# apparmor.d - Full set of apparmor profiles
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{,usr/}{,local/}bin/btop
profile btop @{exec_path} {
include <abstractions/base>
include <abstractions/nameservice-strict>
include <abstractions/consoles>
capability sys_ptrace,
network netlink raw,
signal (send),
ptrace (read),
@{exec_path} mr,
owner @{user_config_dirs}/btop/{,**} rw,
@{sys}/class/power_supply/ r,
@{sys}/class/hwmon/ r,
@{sys}/devices/system/cpu/cpufreq/policy[0-9]*/scaling_{cur,min,max}_freq r,
@{sys}/devices/virtual/thermal/thermal_zone[0-9]*/ r,
@{sys}/devices/virtual/thermal/thermal_zone[0-9]*/hwmon[0-9]*/{,*} r,
@{sys}/devices/platform/coretemp.[0-9]*/hwmon/hwmon[0-9]*/{,*} r,
@{sys}/devices/virtual/block/dm-[0-9]*/stat r,
@{sys}/devices/pci[0-9]*/**/host[0-9]*/*/*/block/*/*/stat r,
@{sys}/devices/{pci[0-9]*,virtual}/{,**/}net/*/statistics/{rx,tx}_bytes r,
@{sys}/devices/{pci[0-9]*,virtual}/{,**/}net/*/address r,
@{sys}/devices/pci[0-9]*/*/*/usb[0-9]*/**/power_supply/hidpp_battery_[0-9]*/{,hwmon[0-9]*/} r,
@{PROC} r,
@{PROC}/loadavg r,
@{PROC}/uptime r,
@{PROC}/@{pids}/comm r,
@{PROC}/@{pids}/cmdline r,
@{PROC}/@{pids}/stat r,
@{PROC}/@{pids}/io r,
owner @{PROC}/@{pid}/mounts r,
include if exists <local/btop>
}