apparmor.d/apparmor.d/groups/systemd/systemd-sleep

44 lines
1.1 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/,}lib/systemd/systemd-sleep
profile systemd-sleep @{exec_path} {
include <abstractions/base>
include <abstractions/nameservice-strict>
include <abstractions/systemd-common>
capability net_admin,
capability sys_admin,
capability sys_resource,
dbus send bus=system path=/org/freedesktop/DBus
interface=org.freedesktop.DBus
member=Hello
peer=(name=org.freedesktop.DBus, label=dbus-daemon),
@{run}/dbus/system_bus_socket rw,
@{exec_path} mr,
/{usr/,}bin/{,ba,da}sh rix,
/{usr/,}bin/nvidia-sleep.sh rix,
/{usr/,}lib/systemd/system-sleep/nvidia rix,
/{usr/,}lib/systemd/system-sleep/hdparm rix,
/{usr/,}lib/systemd/system-sleep/unattended-upgrades rix,
/etc/systemd/sleep.conf r,
/etc/systemd/sleep.conf.d/{,*} r,
@{sys}/power/state rw,
@{PROC}/driver/nvidia/suspend w,
/dev/tty rw,
include if exists <local/systemd-sleep>
}