apparmor.d/apparmor.d/profiles-s-z/umount
2023-02-22 21:52:55 +00:00

54 lines
1.0 KiB
Plaintext

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2019-2021 Mikhail Morfikov
# 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/,}{s,}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,
umount,
network inet stream,
network inet6 stream,
@{exec_path} mr,
/{usr/,}{s,}bin/umount.* rPx,
/{usr/,}{s,}bin/mount.* rPx,
# Mount points
@{HOME}/ r,
@{HOME}/*/ r,
@{HOME}/*/*/ r,
@{HOME}/.cache/*/*/ r,
@{MOUNTS}/*/ r,
@{MOUNTS}/*/*/ r,
/media/cdrom[0-9]/ r,
/etc/mtab r,
/etc/fstab r,
owner @{PROC}/@{pid}/mountinfo r,
owner @{run}/mount/ rw,
owner @{run}/mount/utab.lock wk,
@{run}/mount/utab{,.*} rw,
include if exists <local/umount>
}