refractor: move more profiles to groups.
This commit is contained in:
parent
5aab9da030
commit
5870e1ee40
48 changed files with 0 additions and 0 deletions
23
apparmor.d/groups/utils/swaplabel
Normal file
23
apparmor.d/groups/utils/swaplabel
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2019-2021 Mikhail Morfikov
|
||||
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/4.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{bin}/swaplabel
|
||||
profile swaplabel @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/disks-write>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
# SWAP file common locations
|
||||
owner /swapfile rw,
|
||||
|
||||
include if exists <local/swaplabel>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
||||
52
apparmor.d/groups/utils/umount
Normal file
52
apparmor.d/groups/utils/umount
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2019-2021 Mikhail Morfikov
|
||||
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/4.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{bin}/umount
|
||||
profile umount @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/consoles>
|
||||
include <abstractions/disks-read>
|
||||
include <abstractions/nameservice-strict>
|
||||
|
||||
capability chown,
|
||||
capability dac_read_search,
|
||||
capability setgid,
|
||||
capability setuid,
|
||||
capability sys_admin,
|
||||
|
||||
network inet stream,
|
||||
network inet6 stream,
|
||||
|
||||
umount,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
@{bin}/umount.* rPx,
|
||||
@{bin}/mount.* rPx,
|
||||
|
||||
/etc/mtab r,
|
||||
/etc/fstab r,
|
||||
|
||||
# Mount points
|
||||
@{HOME}/ r,
|
||||
@{HOME}/*/ r,
|
||||
@{HOME}/*/*/ r,
|
||||
@{user_cache_dirs}/*/*/ r,
|
||||
@{MOUNTS}/*/ r,
|
||||
@{MOUNTS}/*/*/ r,
|
||||
|
||||
owner @{run}/mount/ rw,
|
||||
owner @{run}/mount/utab{,.*} rwk,
|
||||
|
||||
owner @{PROC}/@{pid}/mountinfo r,
|
||||
|
||||
include if exists <local/umount>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
||||
Loading…
Add table
Add a link
Reference in a new issue