diff --git a/apparmor.d/groups/systemd/zram-generator b/apparmor.d/groups/systemd/zram-generator index dbde5b6da..796d12be1 100644 --- a/apparmor.d/groups/systemd/zram-generator +++ b/apparmor.d/groups/systemd/zram-generator @@ -11,6 +11,8 @@ profile zram-generator @{exec_path} flags=(attach_disconnected) { include include + capability sys_module, + @{exec_path} mr, @{bin}/kmod rix, @@ -18,14 +20,16 @@ profile zram-generator @{exec_path} flags=(attach_disconnected) { @{lib}/systemd/systemd-makefs rPx, /etc/systemd/zram-generator.conf r, + /etc/modprobe.d/{,**} r, owner @{run}/systemd/generator/{,*/}var-cache-makepkg.mount rw, owner @{run}/systemd/generator/dev-zram@{int}.swap rw, owner @{run}/systemd/generator/swap.target.wants/{,dev-zram@{int}.swap} rw, owner @{run}/systemd/generator/systemd-zram-setup@zram@{int}.service.d/{,*.conf} rw, - @{sys}/devices/virtual/block/zram@{int}/{disksize,reset,comp_algorithm} rw, @{sys}/block/zram@{int}/{disksize,reset} rw, + @{sys}/devices/virtual/block/zram@{int}/{disksize,reset,comp_algorithm} rw, + @{sys}/module/compression r, @{PROC}/crypto r,