mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-18 08:58:15 +01:00
refractor(profile): merge swapon & swapoff
This commit is contained in:
parent
9a614a3502
commit
73ff7efe60
2 changed files with 2 additions and 31 deletions
|
@ -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 <abi/3.0>,
|
|
||||||
|
|
||||||
include <tunables/global>
|
|
||||||
|
|
||||||
@{exec_path} = @{bin}/swapoff
|
|
||||||
profile swapoff @{exec_path} {
|
|
||||||
include <abstractions/base>
|
|
||||||
include <abstractions/disks-write>
|
|
||||||
|
|
||||||
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 <local/swapoff>
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
# apparmor.d - Full set of apparmor profiles
|
# apparmor.d - Full set of apparmor profiles
|
||||||
# Copyright (C) 2019-2021 Mikhail Morfikov
|
# Copyright (C) 2019-2021 Mikhail Morfikov
|
||||||
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
|
# Copyright (C) 2021-2023 Alexandre Pujol <alexandre@pujol.io>
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
abi <abi/3.0>,
|
abi <abi/3.0>,
|
||||||
|
|
||||||
include <tunables/global>
|
include <tunables/global>
|
||||||
|
|
||||||
@{exec_path} = @{bin}/swapon
|
@{exec_path} = @{bin}/swapon @{bin}/swapoff
|
||||||
profile swapon @{exec_path} {
|
profile swapon @{exec_path} {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
include <abstractions/disks-write>
|
include <abstractions/disks-write>
|
||||||
|
|
Loading…
Reference in a new issue