From ca6006152a05dff9ca36fa2653613bf0f0fbb135 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Thu, 8 Apr 2021 22:42:48 +0100 Subject: [PATCH] Add initial acpid --- apparmor.d/profiles-a-l/acpid | 36 +++++++++++++++++++++++++++++++++++ profiles.manifest | 1 + 2 files changed, 37 insertions(+) create mode 100644 apparmor.d/profiles-a-l/acpid diff --git a/apparmor.d/profiles-a-l/acpid b/apparmor.d/profiles-a-l/acpid new file mode 100644 index 000000000..dfb18ca5a --- /dev/null +++ b/apparmor.d/profiles-a-l/acpid @@ -0,0 +1,36 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2021 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}bin/acpid +profile acpid @{exec_path} flags=(attach_disconnected) { + include + include + + capability mknod, + + network netlink raw, + + @{exec_path} mr, + + /{usr/,}bin/{,ba,da}sh rix, + /{usr/,}bin/logger rix, + + /etc/acpi/{,**} r, + /etc/acpi/handler.sh rix, + + /dev/input/{,**} r, + /dev/tty rw, + /dev/null r, + + owner @{PROC}/@{pid}/fd/ r, + owner @{PROC}/@{pid}/loginuid r, + + @{run}/acpid.socket rw, + + include if exists +} diff --git a/profiles.manifest b/profiles.manifest index 13689d7d7..db4293c29 100644 --- a/profiles.manifest +++ b/profiles.manifest @@ -1,6 +1,7 @@ aa-notify complain accounts-daemon acpi +acpid attach_disconnected,complain adb complain adduser amixer