Add zram-generator.
This commit is contained in:
parent
a0d703a3ee
commit
b50c926784
2 changed files with 44 additions and 0 deletions
18
apparmor.d/groups/systemd/systemd-makefs
Normal file
18
apparmor.d/groups/systemd/systemd-makefs
Normal 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>
|
||||||
|
}
|
||||||
26
apparmor.d/groups/systemd/zram-generator
Normal file
26
apparmor.d/groups/systemd/zram-generator
Normal 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>
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue