apparmor.d/apparmor.d/abstractions/trash
2022-04-07 20:53:35 +01:00

31 lines
1.2 KiB
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2018-2022 Mikhail Morfikov
# Copyright (C) 2021-2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
owner @{user_config_dirs}/trashrc rw,
owner @{user_config_dirs}/trashrc.lock rwk,
owner @{user_config_dirs}/#[0-9]*[0-9] rwk,
owner @{user_config_dirs}/trashrc.* rwl -> @{user_config_dirs}/#[0-9]*[0-9],
owner @{run}/user/@{uid}/#[0-9]*[0-9] rw,
owner @{run}/user/@{uid}/trash.so*.[0-9].slave-socket rwl -> @{run}/user/@{uid}/#[0-9]*[0-9],
# Home trash location
owner @{user_share_dirs}/Trash/{,**} rwl,
# Partitions' trash location when the admin creates the .Trash/ folder in the top lvl dir
owner /{media,mnt}/*/.Trash/{,**} rwl,
# Partitions' trash location when the admin doesn't create the .Trash/ folder in the top lvl dir
owner /{media,mnt}/*/.Trash-[0-9]*/{,**} rwl,
# Removable media's trash location when the admin creates the .Trash/ folder in the top lvl dir
owner /{media,mnt}/*/*/.Trash/{,**} rwl,
# Removable media's trash location when the admin doesn't create the .Trash/ folder in the top lvl dir
owner /{media,mnt}/*/*/.Trash-[0-9]*/{,**} rwl,
include if exists <abstractions/trash.d>