mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-02-07 02:35:06 +01:00
81 lines
1.7 KiB
Text
81 lines
1.7 KiB
Text
# apparmor.d - Full set of apparmor profiles
|
|
# 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/,}{s,}bin/acpid
|
|
profile acpid @{exec_path} flags=(attach_disconnected) {
|
|
include <abstractions/base>
|
|
include <abstractions/nameservice-strict>
|
|
|
|
capability dac_read_search,
|
|
capability mknod,
|
|
|
|
network netlink raw,
|
|
|
|
@{exec_path} mr,
|
|
|
|
/{usr/,}bin/{ba,da,}sh rix,
|
|
/{usr/,}bin/logger rix,
|
|
|
|
/etc/acpi/powerbtn-acpi-support.sh rPx -> powerbtn-acpi-support,
|
|
|
|
/etc/acpi/{,**} r,
|
|
/etc/acpi/handler.sh rix,
|
|
|
|
owner @{run}/acpid.socket rw,
|
|
owner @{run}/acpid.pid rw,
|
|
|
|
owner @{PROC}/@{pids}/fd/ r,
|
|
owner @{PROC}/@{pids}/loginuid r,
|
|
|
|
/dev/input/{,**} r,
|
|
/dev/tty rw,
|
|
|
|
include if exists <local/acpid>
|
|
}
|
|
|
|
profile powerbtn-acpi-support flags=(attach_disconnected) {
|
|
include <abstractions/base>
|
|
|
|
/etc/acpi/powerbtn-acpi-support.sh r,
|
|
|
|
/{usr/,}{s,}bin/killall5 rix,
|
|
/{usr/,}{s,}bin/shutdown rix,
|
|
/{usr/,}bin/{ba,da,}sh rix,
|
|
/{usr/,}bin/{e,}grep rix,
|
|
/{usr/,}bin/dbus-send rix,
|
|
/{usr/,}bin/pgrep rix,
|
|
/{usr/,}bin/pinky rix,
|
|
/{usr/,}bin/sed rix,
|
|
/etc/acpi/powerbtn.sh rix,
|
|
|
|
/{usr/,}bin/systemctl rPx -> child-systemctl,
|
|
/{usr/,}bin/ps rPx,
|
|
|
|
/{usr/,}bin/fgconsole rCx,
|
|
|
|
/usr/share/acpi-support/** r,
|
|
|
|
@{PROC} r,
|
|
@{PROC}/uptime r,
|
|
@{PROC}/@{pids}/cmdline r,
|
|
|
|
deny / r,
|
|
|
|
profile fgconsole {
|
|
include <abstractions/base>
|
|
|
|
capability sys_tty_config,
|
|
|
|
/{usr/,}bin/fgconsole r,
|
|
|
|
/dev/tty rw,
|
|
owner /dev/tty[0-9]* rw,
|
|
}
|
|
|
|
include if exists <local/powerbtn-acpi-support>
|
|
}
|