From 73ff7efe60c384e0abd4f049a63c6eb1fcd802f5 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Tue, 5 Sep 2023 19:09:11 +0100 Subject: [PATCH] refractor(profile): merge swapon & swapoff --- apparmor.d/profiles-s-z/swapoff | 29 ----------------------------- apparmor.d/profiles-s-z/swapon | 4 ++-- 2 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 apparmor.d/profiles-s-z/swapoff diff --git a/apparmor.d/profiles-s-z/swapoff b/apparmor.d/profiles-s-z/swapoff deleted file mode 100644 index 8c10f2d7..00000000 --- a/apparmor.d/profiles-s-z/swapoff +++ /dev/null @@ -1,29 +0,0 @@ -# apparmor.d - Full set of apparmor profiles -# Copyright (C) 2019-2021 Mikhail Morfikov -# SPDX-License-Identifier: GPL-2.0-only - -abi , - -include - -@{exec_path} = @{bin}/swapoff -profile swapoff @{exec_path} { - include - include - - capability sys_admin, - - @{exec_path} mr, - - /etc/fstab r, - - @{PROC}/swaps r, - - # SWAP file common locations - owner /swapfile rw, - - /dev/pts/@{int} rw, - - include if exists -} - diff --git a/apparmor.d/profiles-s-z/swapon b/apparmor.d/profiles-s-z/swapon index acd2d218..c5dd6ded 100644 --- a/apparmor.d/profiles-s-z/swapon +++ b/apparmor.d/profiles-s-z/swapon @@ -1,13 +1,13 @@ # apparmor.d - Full set of apparmor profiles # Copyright (C) 2019-2021 Mikhail Morfikov -# Copyright (C) 2023 Alexandre Pujol +# Copyright (C) 2021-2023 Alexandre Pujol # SPDX-License-Identifier: GPL-2.0-only abi , include -@{exec_path} = @{bin}/swapon +@{exec_path} = @{bin}/swapon @{bin}/swapoff profile swapon @{exec_path} { include include