apparmor.d/apparmor.d/groups/systemd/zram-generator
2024-02-07 00:16:21 +01:00

35 lines
1 KiB
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{lib}/systemd/system-generators/zram-generator
profile zram-generator @{exec_path} {
include <abstractions/base>
include <abstractions/systemd-common>
@{exec_path} mr,
@{bin}/kmod rix,
@{bin}/systemd-detect-virt rPx,
@{lib}/systemd/systemd-makefs rPx,
/etc/systemd/zram-generator.conf r,
@{sys}/devices/virtual/block/zram[0-9]*/{disksize,reset,comp_algorithm} rw,
@{sys}/block/zram[0-9]*/{disksize,reset} rw,
owner @{run}/systemd/generator/{,*/}var-cache-makepkg.mount rw,
owner @{run}/systemd/generator/dev-zram[0-9]*.swap rw,
owner @{run}/systemd/generator/swap.target.wants/{,dev-zram[0-9]*.swap} rw,
owner @{run}/systemd/generator/systemd-zram-setup@zram[0-9]*.service.d/{,*.conf} rw,
@{PROC}/crypto r,
owner /dev/pts/@{int} rw,
include if exists <local/zram-generator>
}