diff --git a/apparmor.d/abstractions/app/editor b/apparmor.d/abstractions/app/editor new file mode 100644 index 00000000..b4cb1e7d --- /dev/null +++ b/apparmor.d/abstractions/app/editor @@ -0,0 +1,28 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2024 Zane Zakraisek +# SPDX-License-Identifier: GPL-2.0-only + + include + + @{bin}/sensible-editor mr, + @{bin}/vim mrix, + @{bin}/vim.* mrix, + @{sh_path} rix, + @{bin}/which{,.debianutils} rix, + + /usr/share/vim/{,**} r, + /usr/share/terminfo/** r, + + /etc/vimrc r, + /etc/vim/{,**} r, + + owner @{HOME}/.selected_editor r, + owner @{HOME}/.viminfo{,.tmp} rw, + owner @{HOME}/.vimrc r, + + # Vim swap file + owner @{HOME}/ r, + owner @{user_cache_dirs}/ r, + owner @{user_cache_dirs}/vim/** wr, + + include if exists diff --git a/apparmor.d/profiles-m-r/mutt b/apparmor.d/profiles-m-r/mutt index 9ff28b44..dd5a85ee 100644 --- a/apparmor.d/profiles-m-r/mutt +++ b/apparmor.d/profiles-m-r/mutt @@ -105,29 +105,8 @@ profile mutt @{exec_path} { profile editor { include - include + include - @{bin}/sensible-editor mr, - @{bin}/vim mrix, - @{bin}/vim.* mrix, - @{bin}/{,ba,da}sh rix, - @{bin}/which{,.debianutils} rix, - - /usr/share/vim/{,**} r, - /usr/share/terminfo/** r, - - /etc/vimrc r, - /etc/vim/{,**} r, - - owner @{HOME}/.selected_editor r, - owner @{HOME}/.viminfo{,.tmp} rw, - owner @{HOME}/.vimrc r, - - # Vim swap file - owner @{HOME}/ r, - owner @{user_cache_dirs}/ r, - owner @{user_cache_dirs}/vim/** wr, - # This is the file that holds the message owner /{var/,}tmp/{.,}mutt* rw, diff --git a/apparmor.d/profiles-s-z/task b/apparmor.d/profiles-s-z/task index 3c161081..3c0ea26b 100644 --- a/apparmor.d/profiles-s-z/task +++ b/apparmor.d/profiles-s-z/task @@ -36,28 +36,7 @@ profile task @{exec_path} { profile editor { include - include - - @{bin}/sensible-editor mr, - @{bin}/vim mrix, - @{bin}/vim.* mrix, - @{sh_path} rix, - @{bin}/which{,.debianutils} rix, - - /usr/share/vim/{,**} r, - /usr/share/terminfo/** r, - - /etc/vimrc r, - /etc/vim/{,**} r, - - owner @{HOME}/.selected_editor r, - owner @{HOME}/.viminfo{,.tmp} rw, - owner @{HOME}/.vimrc r, - - # Vim swap file - owner @{HOME}/ r, - owner @{user_cache_dirs}/ r, - owner @{user_cache_dirs}/vim/** wr, + include # Taskwarrior related files owner @{HOME}/.task/ r,