Add zram-generator.

This commit is contained in:
Alexandre Pujol 2021-07-08 12:57:00 +01:00
parent a0d703a3ee
commit b50c926784
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
2 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# 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-makefs
profile systemd-makefs @{exec_path} {
include <abstractions/base>
@{exec_path} mr,
/{usr/,}{s,}bin/mkswap rPx,
include if exists <local/systemd-makefs>
}

View File

@ -0,0 +1,26 @@
# 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/system-generators/zram-generator
profile zram-generator @{exec_path} {
include <abstractions/base>
include <abstractions/systemd-common>
@{exec_path} mr,
/{usr/,}lib/systemd-makefs rPx,
/{usr/,}bin/systemd-detect-virt rPx,
@{sys}/devices/virtual/block/zram[0-9]*/{disksize,reset} rw,
owner @{run}/systemd/generator/systemd-zram-setup@zram[0-9]*.service.d/{,*.conf} rw,
owner @{run}/systemd/generator/dev-zram[0-9]*.swap rw,
owner @{run}/systemd/generator/swap.target.wants/{,dev-zram[0-9]*.swap} rw,
include if exists <local/zram-generator>
}