apparmor.d/apparmor.d/profiles-g-l/htop
2022-06-01 17:54:31 +00:00

108 lines
3.1 KiB
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2019-2021 Mikhail Morfikov
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/htop
profile htop @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
include <abstractions/nameservice-strict>
capability dac_read_search,
capability kill,
capability sys_nice,
capability sys_ptrace,
signal (send),
ptrace (read),
network netlink raw,
@{exec_path} mr,
/usr/share/terminfo/x/xterm-256color r,
/etc/sensors.d/ r,
/etc/sensors3.conf r,
owner @{user_config_dirs}/ r,
owner @{user_config_dirs}/htop/ rw,
owner @{user_config_dirs}/htop/htoprc rw,
owner @{PROC}/@{pid}/smaps_rollup r,
@{PROC}/ r,
@{PROC}/diskstats r,
@{PROC}/loadavg r,
@{PROC}/pressure/cpu r,
@{PROC}/pressure/io r,
@{PROC}/pressure/memory r,
@{PROC}/sys/kernel/osrelease r,
@{PROC}/sys/kernel/pid_max r,
@{PROC}/sys/kernel/sched_autogroup_enabled r,
@{PROC}/tty/drivers r,
@{PROC}/uptime r,
@{PROC}/@{pids}/ r,
@{PROC}/@{pids}/attr/current r,
@{PROC}/@{pids}/autogroup rw,
@{PROC}/@{pids}/cgroup r,
@{PROC}/@{pids}/cmdline r,
@{PROC}/@{pids}/comm r,
@{PROC}/@{pids}/environ r,
@{PROC}/@{pids}/io r,
@{PROC}/@{pids}/mounts r,
@{PROC}/@{pids}/net/dev r,
@{PROC}/@{pids}/oom_{,score_}adj r,
@{PROC}/@{pids}/oom_score r,
@{PROC}/@{pids}/stat r,
@{PROC}/@{pids}/statm r,
@{PROC}/@{pids}/wchan r,
@{PROC}/@{pids}/task/ r,
@{PROC}/@{pids}/task/@{tid}/ r,
@{PROC}/@{pids}/task/@{tid}/attr/current r,
@{PROC}/@{pids}/task/@{tid}/cgroup r,
@{PROC}/@{pids}/task/@{tid}/cmdline r,
@{PROC}/@{pids}/task/@{tid}/comm r,
@{PROC}/@{pids}/task/@{tid}/environ r,
@{PROC}/@{pids}/task/@{tid}/io r,
@{PROC}/@{pids}/task/@{tid}/oom_{,score_}adj r,
@{PROC}/@{pids}/task/@{tid}/oom_score r,
@{PROC}/@{pids}/task/@{tid}/stat r,
@{PROC}/@{pids}/task/@{tid}/statm r,
@{PROC}/@{pids}/task/@{tid}/status r,
@{PROC}/@{pids}/task/@{tid}/wchan r,
@{sys}/class/hwmon/ r,
@{sys}/class/i2c-adapter/ r,
@{sys}/class/power_supply/ r,
@{sys}/devices/**/hwmon[0-9]*/ r,
@{sys}/devices/**/hwmon[0-9]*/{name,temp*} r,
@{sys}/devices/**/hwmon[0-9]*/**/ r,
@{sys}/devices/**/hwmon[0-9]*/**/{name,temp*} r,
@{sys}/devices/**/hwmon/ r,
@{sys}/devices/**/hwmon/{name,temp*} r,
@{sys}/devices/**/hwmon/**/ r,
@{sys}/devices/**/hwmon/**/{name,temp*} r,
@{sys}/devices/**/power_supply/**/{uevent,type,online} r,
@{sys}/devices/*/name r,
@{sys}/devices/i2c-[0-9]*/name r,
@{sys}/devices/pci[0-9]*/**/i2c-[0-9]*/name r,
@{sys}/devices/system/cpu/cpu[0-9]*/online r,
@{sys}/devices/system/cpu/cpufreq/policy[0-9]*/scaling_{cur,min,max}_freq r,
@{sys}/devices/system/cpu/cpufreq/policy[0-9]*/cpuinfo_{cur,min,max}_freq r,
@{sys}/devices/virtual/block/zram[0-9]*/{disksize,mm_stat} r,
@{sys}/devices/virtual/thermal/thermal_zone[0-9]*/temp r,
@{sys}/kernel/mm/hugepages/ r,
@{sys}/kernel/mm/hugepages/hugepages-*/nr_hugepages r,
/dev/tty[0-9]* rw,
include if exists <local/htop>
}