mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-18 00:48:10 +01:00
refactor: simplify the trash abstraction.
This commit is contained in:
parent
a59387ac9e
commit
9d40327b00
1 changed files with 7 additions and 54 deletions
|
@ -1,6 +1,6 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2018-2021 Mikhail Morfikov
|
||||
# 2021 Alexandre Pujol <alexandre@pujol.io>
|
||||
# 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>,
|
||||
|
@ -14,65 +14,18 @@
|
|||
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/ rw,
|
||||
owner @{user_share_dirs}/Trash/#[0-9]*[0-9] rw,
|
||||
owner @{user_share_dirs}/Trash/directorysizes{,.*} rwl -> @{user_share_dirs}/Trash/#[0-9]*[0-9],
|
||||
owner @{user_share_dirs}/Trash/files/{,**} rw,
|
||||
owner @{user_share_dirs}/Trash/info/ rw,
|
||||
owner @{user_share_dirs}/Trash/info/*.trashinfo{,.*} rw,
|
||||
owner @{user_share_dirs}/Trash/expunged/ rw,
|
||||
owner @{user_share_dirs}/Trash/expunged/[0-9]* rw,
|
||||
owner @{user_share_dirs}/Trash/expunged/[0-9]*/ rw,
|
||||
owner @{user_share_dirs}/Trash/expunged/[0-9]*/** rw,
|
||||
owner @{user_share_dirs}/Trash/{,**} rw,
|
||||
|
||||
# Partitions' trash location when the admin creates the .Trash/ folder in the top lvl dir
|
||||
owner /{media,mnt}/*/.Trash/ rw,
|
||||
owner /{media,mnt}/*/.Trash/[0-9]*/ rw,
|
||||
owner /{media,mnt}/*/.Trash/[0-9]*/#[0-9]*[0-9] rw,
|
||||
owner /{media,mnt}/*/.Trash/[0-9]*/directorysizes{,.*} rwl -> /{media,mnt}/*/.Trash/[0-9]*/#[0-9]*[0-9],
|
||||
owner /{media,mnt}/*/.Trash/[0-9]*/files/{,**} rw,
|
||||
owner /{media,mnt}/*/.Trash/[0-9]*/info/ rw,
|
||||
owner /{media,mnt}/*/.Trash/[0-9]*/info/*.trashinfo{,.*} rw,
|
||||
owner /{media,mnt}/*/.Trash/[0-9]*/expunged/ rw,
|
||||
owner /{media,mnt}/*/.Trash/[0-9]*/expunged/[0-9]* rw,
|
||||
owner /{media,mnt}/*/.Trash/[0-9]*/expunged/[0-9]*/ rw,
|
||||
owner /{media,mnt}/*/.Trash/[0-9]*/expunged/[0-9]*/** rw,
|
||||
owner /{media,mnt}/*/.Trash/{,**} rw,
|
||||
|
||||
# Partitions' trash location when the admin doesn't create the .Trash/ folder in the top lvl dir
|
||||
owner /{media,mnt}/*/.Trash-[0-9]*/ rw,
|
||||
owner /{media,mnt}/*/.Trash-[0-9]*/#[0-9]*[0-9] rw,
|
||||
owner /{media,mnt}/*/.Trash-[0-9]*/directorysizes{,.*} rwl -> /{media,mnt}/*/.Trash-[0-9]*/#[0-9]*[0-9],
|
||||
owner /{media,mnt}/*/.Trash-[0-9]*/files/{,**} rw,
|
||||
owner /{media,mnt}/*/.Trash-[0-9]*/info/ rw,
|
||||
owner /{media,mnt}/*/.Trash-[0-9]*/info/*.trashinfo{,.*} rw,
|
||||
owner /{media,mnt}/*/.Trash-[0-9]*/expunged/ rw,
|
||||
owner /{media,mnt}/*/.Trash-[0-9]*/expunged/[0-9]* rw,
|
||||
owner /{media,mnt}/*/.Trash-[0-9]*/expunged/[0-9]*/ rw,
|
||||
owner /{media,mnt}/*/.Trash-[0-9]*/expunged/[0-9]*/** rw,
|
||||
owner /{media,mnt}/*/.Trash-[0-9]*/{,**} rw,
|
||||
|
||||
# Removable media's trash location when the admin creates the .Trash/ folder in the top lvl dir
|
||||
owner /{media,mnt}/*/*/.Trash/ rw,
|
||||
owner /{media,mnt}/*/*/.Trash/[0-9]*/ rw,
|
||||
owner /{media,mnt}/*/*/.Trash/[0-9]*/#[0-9]*[0-9] rw,
|
||||
owner /{media,mnt}/*/*/.Trash/[0-9]*/directorysizes{,.*} rwl -> /{media,mnt}/*/.Trash/[0-9]*/#[0-9]*[0-9],
|
||||
owner /{media,mnt}/*/*/.Trash/[0-9]*/files/{,**} rw,
|
||||
owner /{media,mnt}/*/*/.Trash/[0-9]*/info/ rw,
|
||||
owner /{media,mnt}/*/*/.Trash/[0-9]*/info/*.trashinfo{,.*} rw,
|
||||
owner /{media,mnt}/*/*/.Trash/[0-9]*/expunged/ rw,
|
||||
owner /{media,mnt}/*/*/.Trash/[0-9]*/expunged/[0-9]* rw,
|
||||
owner /{media,mnt}/*/*/.Trash/[0-9]*/expunged/[0-9]*/ rw,
|
||||
owner /{media,mnt}/*/*/.Trash/[0-9]*/expunged/[0-9]*/** rw,
|
||||
owner /{media,mnt}/*/*/.Trash/{,**} rw,
|
||||
|
||||
# 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]*/ rw,
|
||||
owner /{media,mnt}/*/*/.Trash-[0-9]*/#[0-9]*[0-9] rw,
|
||||
owner /{media,mnt}/*/*/.Trash-[0-9]*/directorysizes{,.*} rwl -> /{media,mnt}/*/.Trash-[0-9]*/#[0-9]*[0-9],
|
||||
owner /{media,mnt}/*/*/.Trash-[0-9]*/files/{,**} rw,
|
||||
owner /{media,mnt}/*/*/.Trash-[0-9]*/info/ rw,
|
||||
owner /{media,mnt}/*/*/.Trash-[0-9]*/info/*.trashinfo{,.*} rw,
|
||||
owner /{media,mnt}/*/*/.Trash-[0-9]*/expunged/ rw,
|
||||
owner /{media,mnt}/*/*/.Trash-[0-9]*/expunged/[0-9]* rw,
|
||||
owner /{media,mnt}/*/*/.Trash-[0-9]*/expunged/[0-9]*/ rw,
|
||||
owner /{media,mnt}/*/*/.Trash-[0-9]*/expunged/[0-9]*/** rw,
|
||||
owner /{media,mnt}/*/*/.Trash-[0-9]*/{,**} rw,
|
||||
|
||||
include if exists <abstractions/trash.d>
|
||||
|
|
Loading…
Reference in a new issue