apparmor.d/apparmor.d/profiles-s-z/umount
ShellCode 0f9b7cb474
Fix #184 (#185)
* Replace @{HOME}/.config with @{user_config_dirs}

* Replace @{HOME}/.cache with @{user_cache_dirs}

* Replace @{HOME}/.local/state with @{user_state_dirs}

* Add missing user_share_dirs to apparmor.d/tunables/home.d/apparmor.d

* Update docs/variables.md

* Replace @{HOME}/.local/share with @{user_share_dirs}

* Replace @{HOME}/.local/lib with @{user_lib_dirs}

* Revert "Add missing user_share_dirs to apparmor.d/tunables/home.d/apparmor.d"

This reverts commit 9525003098.
2023-07-27 11:20:19 +00:00

53 lines
1 KiB
Text

# 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} = @{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,
@{bin}/umount.* rPx,
@{bin}/mount.* rPx,
# Mount points
@{HOME}/ r,
@{HOME}/*/ r,
@{HOME}/*/*/ r,
@{user_cache_dirs}/*/*/ 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>
}