aboutsummaryrefslogtreecommitdiff
path: root/straper/db/public/apparmor/apparmor.d/abstractions/trash
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukasz.kasprzak@pm.me>2026-03-20 19:16:32 +0100
committerLukasz Kasprzak <lukasz.kasprzak@pm.me>2026-03-20 19:16:32 +0100
commit39711cf6c2ec5a3b4480dcb4800cc3802bda5bf2 (patch)
tree9221704f413398cfb5d5759083b1e7032566820e /straper/db/public/apparmor/apparmor.d/abstractions/trash
parent6b59b75c3a294060dea66bdee16ffaf95ae92889 (diff)
downloadbin-39711cf6c2ec5a3b4480dcb4800cc3802bda5bf2.tar.gz
bin-39711cf6c2ec5a3b4480dcb4800cc3802bda5bf2.zip
feat: first fully successful run e2e on straper
Diffstat (limited to 'straper/db/public/apparmor/apparmor.d/abstractions/trash')
-rw-r--r--straper/db/public/apparmor/apparmor.d/abstractions/trash75
1 files changed, 75 insertions, 0 deletions
diff --git a/straper/db/public/apparmor/apparmor.d/abstractions/trash b/straper/db/public/apparmor/apparmor.d/abstractions/trash
new file mode 100644
index 0000000..96d80ed
--- /dev/null
+++ b/straper/db/public/apparmor/apparmor.d/abstractions/trash
@@ -0,0 +1,75 @@
+abi <abi/4.0>,
+
+# requires <tunables/home>
+
+ owner @{HOME}/.config/trashrc rw,
+ owner @{HOME}/.config/trashrc.lock rwk,
+ owner @{HOME}/.config/#[0-9]*[0-9] rwk,
+ owner @{HOME}/.config/trashrc.* rwl -> @{HOME}/.config/#[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 @{HOME}/.local/share/Trash/ rw,
+ owner @{HOME}/.local/share/Trash/#[0-9]*[0-9] rw,
+ owner @{HOME}/.local/share/Trash/directorysizes{,.*} rwl -> @{HOME}/.local/share/Trash/#[0-9]*[0-9],
+ owner @{HOME}/.local/share/Trash/files/{,**} rw,
+ owner @{HOME}/.local/share/Trash/info/ rw,
+ owner @{HOME}/.local/share/Trash/info/*.trashinfo{,.*} rw,
+ owner @{HOME}/.local/share/Trash/expunged/ rw,
+ owner @{HOME}/.local/share/Trash/expunged/[0-9]* rw,
+ owner @{HOME}/.local/share/Trash/expunged/[0-9]*/ rw,
+ owner @{HOME}/.local/share/Trash/expunged/[0-9]*/** rw,
+
+ # Partitions' trash location when the admin creates the .Trash/ folder in the top lvl dir
+ owner /media/*/.Trash/ rw,
+ owner /media/*/.Trash/@{uid}/ rw,
+ owner /media/*/.Trash/@{uid}/#[0-9]*[0-9] rw,
+ owner /media/*/.Trash/@{uid}/directorysizes{,.*} rwl -> /media/*/.Trash/@{uid}/#[0-9]*[0-9],
+ owner /media/*/.Trash/@{uid}/files/{,**} rw,
+ owner /media/*/.Trash/@{uid}/info/ rw,
+ owner /media/*/.Trash/@{uid}/info/*.trashinfo{,.*} rw,
+ owner /media/*/.Trash/@{uid}/expunged/ rw,
+ owner /media/*/.Trash/@{uid}/expunged/[0-9]* rw,
+ owner /media/*/.Trash/@{uid}/expunged/[0-9]*/ rw,
+ owner /media/*/.Trash/@{uid}/expunged/[0-9]*/** rw,
+
+ # Partitions' trash location when the admin doesn't create the .Trash/ folder in the top lvl dir
+ owner /media/*/.Trash-@{uid}/ rw,
+ owner /media/*/.Trash-@{uid}/#[0-9]*[0-9] rw,
+ owner /media/*/.Trash-@{uid}/directorysizes{,.*} rwl -> /media/*/.Trash-@{uid}/#[0-9]*[0-9],
+ owner /media/*/.Trash-@{uid}/files/{,**} rw,
+ owner /media/*/.Trash-@{uid}/info/ rw,
+ owner /media/*/.Trash-@{uid}/info/*.trashinfo{,.*} rw,
+ owner /media/*/.Trash-@{uid}/expunged/ rw,
+ owner /media/*/.Trash-@{uid}/expunged/[0-9]* rw,
+ owner /media/*/.Trash-@{uid}/expunged/[0-9]*/ rw,
+ owner /media/*/.Trash-@{uid}/expunged/[0-9]*/** rw,
+
+ # Removable media's trash location when the admin creates the .Trash/ folder in the top lvl dir
+ owner /media/*/*/.Trash/ rw,
+ owner /media/*/*/.Trash/@{uid}/ rw,
+ owner /media/*/*/.Trash/@{uid}/#[0-9]*[0-9] rw,
+ owner /media/*/*/.Trash/@{uid}/directorysizes{,.*} rwl -> /media/*/*/.Trash/@{uid}/#[0-9]*[0-9],
+ owner /media/*/*/.Trash/@{uid}/files/{,**} rw,
+ owner /media/*/*/.Trash/@{uid}/info/ rw,
+ owner /media/*/*/.Trash/@{uid}/info/*.trashinfo{,.*} rw,
+ owner /media/*/*/.Trash/@{uid}/expunged/ rw,
+ owner /media/*/*/.Trash/@{uid}/expunged/[0-9]* rw,
+ owner /media/*/*/.Trash/@{uid}/expunged/[0-9]*/ rw,
+ owner /media/*/*/.Trash/@{uid}/expunged/[0-9]*/** rw,
+
+ # Removable media's trash location when the admin doesn't create the .Trash/ folder in the top lvl dir
+ owner /media/*/*/.Trash-@{uid}/ rw,
+ owner /media/*/*/.Trash-@{uid}/#[0-9]*[0-9] rw,
+ owner /media/*/*/.Trash-@{uid}/directorysizes{,.*} rwl -> /media/*/*/.Trash-@{uid}/#[0-9]*[0-9],
+ owner /media/*/*/.Trash-@{uid}/files/{,**} rw,
+ owner /media/*/*/.Trash-@{uid}/info/ rw,
+ owner /media/*/*/.Trash-@{uid}/info/*.trashinfo{,.*} rw,
+ owner /media/*/*/.Trash-@{uid}/expunged/ rw,
+ owner /media/*/*/.Trash-@{uid}/expunged/[0-9]* rw,
+ owner /media/*/*/.Trash-@{uid}/expunged/[0-9]*/ rw,
+ owner /media/*/*/.Trash-@{uid}/expunged/[0-9]*/** rw,
+
+ include if exists <abstractions/trash.d>