From 19d005bf59b1f4b9bafda9f7a5844c7b864a6086 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Fri, 9 Dec 2022 19:13:06 +0000 Subject: [PATCH] feat(profiles): add the @{XDG_WORK_DIR} variable. --- apparmor.d/abstractions/user-read | 1 + apparmor.d/abstractions/user-write.d/complete | 1 + apparmor.d/tunables/xdg-user-dirs | 2 ++ 3 files changed, 4 insertions(+) diff --git a/apparmor.d/abstractions/user-read b/apparmor.d/abstractions/user-read index 911cc288..0cb72292 100644 --- a/apparmor.d/abstractions/user-read +++ b/apparmor.d/abstractions/user-read @@ -20,5 +20,6 @@ owner @{user_templates_dirs}/{,**} r, owner @{user_torrents_dirs}/{,**} r, owner @{user_videos_dirs}/{,**} r, + owner @{user_work_dirs}/{,**} r, include if exists \ No newline at end of file diff --git a/apparmor.d/abstractions/user-write.d/complete b/apparmor.d/abstractions/user-write.d/complete index 21c2fdc8..56106725 100644 --- a/apparmor.d/abstractions/user-write.d/complete +++ b/apparmor.d/abstractions/user-write.d/complete @@ -11,3 +11,4 @@ owner @{user_pictures_dirs}/{,**} rwl, owner @{user_projects_dirs}/{,**} rwl, owner @{user_videos_dirs}/{,**} rwl, + owner @{user_work_dirs}/{,**} rwl, diff --git a/apparmor.d/tunables/xdg-user-dirs b/apparmor.d/tunables/xdg-user-dirs index c2719353..7ad77a89 100644 --- a/apparmor.d/tunables/xdg-user-dirs +++ b/apparmor.d/tunables/xdg-user-dirs @@ -23,6 +23,7 @@ # Extra user personal directories @{XDG_BOOKS_DIR}="Books" @{XDG_PROJECTS_DIR}="Projects" +@{XDG_WORK_DIR}="Work" @{XDG_SCREENSHOTS_DIR}="@{XDG_PICTURES_DIR}/Screenshots" @{XDG_SYNC_DIR}="Sync" @{XDG_TORRENTS_DIR}="Torrents" @@ -66,6 +67,7 @@ @{user_torrents_dirs}=@{HOME}/@{XDG_TORRENTS_DIR} @{MOUNTS}/@{XDG_TORRENTS_DIR} @{user_videos_dirs}=@{HOME}/@{XDG_VIDEOS_DIR} @{MOUNTS}/@{XDG_VIDEOS_DIR} @{user_vm_dirs}=@{HOME}/@{XDG_VM_DIR} @{MOUNTS}/@{XDG_VM_DIR} +@{user_work_dirs}=@{HOME}/@{XDG_WORK_DIR} @{MOUNTS}/@{XDG_WORK_DIR} # Also, include files in tunables/xdg-user-dirs.d for site-specific adjustments # to the various XDG directories