mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-14 15:33:47 +01:00
Merge 83887799ff
into a9a41ef810
This commit is contained in:
commit
db6925af7c
@ -10,9 +10,9 @@ include <tunables/global>
|
||||
@{exec_path} = @{bin}/hdparm
|
||||
profile hdparm @{exec_path} flags=(complain) {
|
||||
include <abstractions/base>
|
||||
include <abstractions/disks-read>
|
||||
include <abstractions/user-download-strict>
|
||||
include <abstractions/private-files-strict>
|
||||
include <abstractions/disks-read>
|
||||
|
||||
# To remove the following errors:
|
||||
# re-writing sector *: BLKFLSBUF failed: Permission denied
|
||||
|
116
apparmor.d/profiles-s-z/tlp
Normal file
116
apparmor.d/profiles-s-z/tlp
Normal file
@ -0,0 +1,116 @@
|
||||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# Copyright (C) 2024 Barmogund <set508@proton.me>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/4.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{bin}/tlp
|
||||
profile tlp @{exec_path} flags=(attach_disconnected) {
|
||||
include <abstractions/base>
|
||||
include <abstractions/bus-system>
|
||||
include <abstractions/disks-read>
|
||||
include <abstractions/graphics>
|
||||
include <abstractions/bus/org.freedesktop.PolicyKit1>
|
||||
include <abstractions/nameservice-strict>
|
||||
include <abstractions/perl>
|
||||
|
||||
capability dac_read_search,
|
||||
capability net_admin,
|
||||
capability sys_nice,
|
||||
capability sys_rawio,
|
||||
capability sys_tty_config,
|
||||
|
||||
network netlink raw,
|
||||
|
||||
ptrace read peer=unconfined,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
@{bin}/systemctl rCx -> systemctl,
|
||||
@{bin}/logger rix,
|
||||
@{sh_path} rix,
|
||||
@{bin}/cp rix,
|
||||
@{bin}/chmod rix,
|
||||
@{bin}/flock rix,
|
||||
@{bin}/sort rix,
|
||||
@{bin}/head rix,
|
||||
@{bin}/mktemp rix,
|
||||
@{bin}/readlink rix,
|
||||
@{bin}/tr rix,
|
||||
@{bin}/ethtool rix,
|
||||
@{bin}/grep rix,
|
||||
@{bin}/touch rix,
|
||||
@{bin}/cat rix,
|
||||
@{bin}/rm rix,
|
||||
@{bin}/id rPx,
|
||||
@{bin}/iw rPx,
|
||||
@{bin}/hdparm rPx,
|
||||
@{bin}/uname rpx,
|
||||
@{bin}/udevadm rCx -> udevadm,
|
||||
/usr/share/tlp/tlp-readconfs rix,
|
||||
|
||||
/ r,
|
||||
|
||||
/etc/tlp.d/ r,
|
||||
/etc/tlp.d/** rw,
|
||||
/etc/tlp.conf rw,
|
||||
|
||||
/usr/share/tlp/** r,
|
||||
|
||||
/var/lib/power-profiles-daemon/state.ini rw,
|
||||
|
||||
@{run}/udev/data/+platform:* r,
|
||||
owner @{run}/tlp/* rw,
|
||||
owner @{run}/tlp/lock_tlp rwk,
|
||||
|
||||
@{sys}/class/net/ r,
|
||||
@{sys}/class/power_supply/ r,
|
||||
@{sys}/bus/pci/drivers/mei_me/ r,
|
||||
@{sys}/bus/pci/drivers/nouveau/ r,
|
||||
@{sys}/bus/pci/drivers/xhci_hcd/ r,
|
||||
@{sys}/devices/**/power_supply/BAT@{int}/type r,
|
||||
@{sys}/devices/**/power_supply/BAT@{int}/present r,
|
||||
@{sys}/devices/@{pci}/ r,
|
||||
@{sys}/devices/@{pci}/power/control rw,
|
||||
@{sys}/devices/platform/**/power_supply/ADP@{int}/online r,
|
||||
@{sys}/devices/platform/**/power_supply/ADP@{int}/type r,
|
||||
@{sys}/devices/system/cpu/cpufreq/policy@{int}/energy_performance_preference rw,
|
||||
@{sys}/devices/virtual/dmi/id/product_version r,
|
||||
@{sys}/devices/virtual/net/lo/uevent r,
|
||||
@{sys}/module/pcie_aspm/parameters/policy rw,
|
||||
@{sys}/module/snd_hda_intel/parameters/power_save rw,
|
||||
@{sys}/module/snd_hda_intel/parameters/power_save_controller rw,
|
||||
@{sys}/firmware/acpi/platform_profile* rw,
|
||||
@{sys}/firmware/acpi/pm_profile* rw,
|
||||
|
||||
owner @{PROC}/sys/vm/laptop_mode rw,
|
||||
owner @{PROC}/sys/vm/dirty_writeback_centisecs rw,
|
||||
owner @{PROC}/sys/vm/dirty_expire_centisecs rw,
|
||||
owner @{PROC}/sys/fs/xfs/xfssyncd_centisecs rw,
|
||||
owner @{PROC}/sys/kernel/nmi_watchdog rw,
|
||||
|
||||
/dev/disk/by-id/ r,
|
||||
owner /dev/sda r,
|
||||
/dev/tty rw,
|
||||
|
||||
profile systemctl {
|
||||
include <abstractions/base>
|
||||
include <abstractions/app/systemctl>
|
||||
|
||||
include if exists <local/tlp_systemctl>
|
||||
}
|
||||
|
||||
profile udevadm {
|
||||
include <abstractions/base>
|
||||
include <abstractions/app/udevadm>
|
||||
|
||||
include if exists <local/tlp_udevadm>
|
||||
}
|
||||
|
||||
include if exists <local/tlp>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
Loading…
Reference in New Issue
Block a user