mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-15 07:54:17 +01:00
feat(systemd): split systemd-sleep profile.
This commit is contained in:
parent
ad23864094
commit
ff76602843
@ -19,21 +19,17 @@ profile systemd-sleep @{exec_path} {
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/{usr/,}bin/{,ba,da}sh rix,
|
||||
/{usr/,}bin/nvidia-sleep.sh rix,
|
||||
/{usr/,}lib/systemd/system-sleep/hdparm rix,
|
||||
/{usr/,}lib/systemd/system-sleep/nvidia rix,
|
||||
/{usr/,}lib/systemd/system-sleep/sysstat.sleep rPUx,
|
||||
/{usr/,}lib/systemd/system-sleep/unattended-upgrades rix,
|
||||
/{usr/,}lib/systemd/system-sleep/hdparm rPx,
|
||||
/{usr/,}lib/systemd/system-sleep/nvidia rPx,
|
||||
/{usr/,}lib/systemd/system-sleep/sysstat.sleep rPx,
|
||||
/{usr/,}lib/systemd/system-sleep/unattended-upgrades rPx,
|
||||
/{usr/,}lib/systemd/system-sleep/grub2.sleep rPx,
|
||||
|
||||
/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>
|
||||
}
|
||||
|
24
apparmor.d/groups/systemd/systemd-sleep-grub2
Normal file
24
apparmor.d/groups/systemd/systemd-sleep-grub2
Normal file
@ -0,0 +1,24 @@
|
||||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = /{usr/,}lib/systemd/system-sleep/grub2.sleep
|
||||
profile systemd-sleep-nvidia @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/{usr/,}bin/{,ba,da}sh rix,
|
||||
/{usr/,}bin/grep rix,
|
||||
/{usr/,}bin/uname rix,
|
||||
|
||||
/etc/sysconfig/bootloader r,
|
||||
|
||||
@{PROC}/@{pid}/maps r,
|
||||
|
||||
include if exists <local/systemd-sleep-nvidia>
|
||||
}
|
16
apparmor.d/groups/systemd/systemd-sleep-hdparm
Normal file
16
apparmor.d/groups/systemd/systemd-sleep-hdparm
Normal file
@ -0,0 +1,16 @@
|
||||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = /{usr/,}lib/systemd/system-sleep/hdparm
|
||||
profile systemd-sleep-hdparm @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
include if exists <local/systemd-sleep-hdparm>
|
||||
}
|
33
apparmor.d/groups/systemd/systemd-sleep-nvidia
Normal file
33
apparmor.d/groups/systemd/systemd-sleep-nvidia
Normal file
@ -0,0 +1,33 @@
|
||||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = /{usr/,}lib/systemd/system-sleep/nvidia
|
||||
profile systemd-sleep-nvidia @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/nameservice-strict>
|
||||
|
||||
capability sys_admin,
|
||||
capability sys_tty_config,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/{usr/,}bin/{,ba,da}sh rix,
|
||||
/{usr/,}bin/nvidia-sleep.sh rix,
|
||||
/{usr/,}bin/chvt rix,
|
||||
/{usr/,}bin/cat rix,
|
||||
/{usr/,}bin/rm rix,
|
||||
|
||||
@{run}/nvidia-sleep/* rw,
|
||||
|
||||
@{PROC}/driver/nvidia/suspend w,
|
||||
|
||||
/dev/tty rw,
|
||||
/dev/tty[0-9]* rw,
|
||||
|
||||
include if exists <local/systemd-sleep-nvidia>
|
||||
}
|
16
apparmor.d/groups/systemd/systemd-sleep-sysstat
Normal file
16
apparmor.d/groups/systemd/systemd-sleep-sysstat
Normal file
@ -0,0 +1,16 @@
|
||||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = /{usr/,}lib/systemd/system-sleep/sysstat.sleep
|
||||
profile systemd-sleep-sysstat @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
include if exists <local/systemd-sleep-sysstat>
|
||||
}
|
16
apparmor.d/groups/systemd/systemd-sleep-upgrades
Normal file
16
apparmor.d/groups/systemd/systemd-sleep-upgrades
Normal file
@ -0,0 +1,16 @@
|
||||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = /{usr/,}lib/systemd/system-sleep/unattended-upgrades
|
||||
profile systemd-sleep-upgrades @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
include if exists <local/systemd-sleep-upgrades>
|
||||
}
|
Loading…
Reference in New Issue
Block a user