Update acpid

Another case. Tested on Debian 11 and Ubuntu LTS.
This commit is contained in:
nobodysu 2022-01-10 21:29:53 +00:00 committed by GitHub
parent 5c1a1f6f8e
commit 80bd1028c5
Failed to generate hash of commit

View file

@ -22,7 +22,6 @@ profile acpid @{exec_path} flags=(attach_disconnected) {
/etc/acpi/{,**} r,
/etc/acpi/handler.sh rix,
/etc/acpi/powerbtn-acpi-support.sh rix,
/dev/input/{,**} r,
/dev/tty rw,
@ -33,12 +32,43 @@ profile acpid @{exec_path} flags=(attach_disconnected) {
owner @{run}/acpid.socket rw,
owner @{run}/acpid.pid rw,
/etc/acpi/powerbtn-acpi-support.sh rPx -> acpid//powerbtn-acpi-support.sh,
include if exists <local/acpid>
}
profile acpid//powerbtn-acpi-support.sh flags=(attach_disconnected) {
/etc/acpi/powerbtn-acpi-support.sh r,
include <abstractions/base>
include <abstractions/wutmp>
capability sys_ptrace,
deny capability net_admin, # ??
ptrace (read), # unconfined, tighten later, TODO
deny / r,
@{PROC} r,
@{PROC}/uptime r,
@{PROC}/sys/kernel/osrelease r,
@{PROC}/@{pid}/stat r,
@{PROC}/@{pid}/cmdline r,
/usr/share/acpi-support/** r,
# powerbtn-acpi-support.sh
/{usr/,}bin/sed rix,
/{usr/,}bin/sed rix,
/{usr/,}bin/pgrep rix,
/{usr/,}bin/{,e}grep rix,
/{usr/,}bin/pinky rix,
/{usr/,}bin/{,ba,da}sh rix,
/{usr/,}bin/dbus-send rix,
/{usr/,}bin/systemctl rix,
/{usr/,}sbin/killall5 rix,
/{usr/,}sbin/shutdown rix,
/etc/acpi/powerbtn.sh rix,
/{usr/,}bin/ps rPx,
/{usr/,}bin/ps rPx,
/{usr/,}bin/fgconsole rCx,
profile fgconsole /usr/bin/fgconsole {
@ -51,5 +81,5 @@ profile acpid @{exec_path} flags=(attach_disconnected) {
owner /dev/tty[0-9]* rw,
}
include if exists <local/acpid>
include if exists <local/powerbtn-acpi-support.sh>
}