From 751bc683d9b56f3759adaab62dc8e981eb48f047 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Mon, 1 Apr 2024 21:42:58 +0100 Subject: [PATCH] fix(profile): ensure mutt pager can read its local storage. Revert some mutt related change from 0619f4dcec81630f6758ebc0476b0ab8514149e9 See #309 --- apparmor.d/profiles-m-r/mutt | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/apparmor.d/profiles-m-r/mutt b/apparmor.d/profiles-m-r/mutt index 3367f75a..9ff28b44 100644 --- a/apparmor.d/profiles-m-r/mutt +++ b/apparmor.d/profiles-m-r/mutt @@ -41,9 +41,9 @@ profile mutt @{exec_path} { @{bin}/vim.* rCx -> editor, @{bin}/sensible-editor rCx -> editor, - @{bin}/less rPx -> child-pager, - @{bin}/more rPx -> child-pager, - @{bin}/pager rPx -> child-pager, + @{bin}/less rCx -> pager, + @{bin}/more rCx -> pager, + @{bin}/pager rCx -> pager, @{bin}/gpg{2,} rCx -> gpg, @{bin}/gpgconf rCx -> gpg, @@ -134,6 +134,30 @@ profile mutt @{exec_path} { include if exists } + profile pager { + include + include + + @{bin}/less mr, + @{bin}/more mr, + @{bin}/pager mr, + + /usr/share/terminfo/** r, + /usr/share/file/misc/magic.mgc r, + + owner @{HOME}/ r, + owner @{HOME}/.lesshs* rw, + owner @{HOME}/.terminfo/@{int}/* r, + owner @{user_cache_dirs}/lesshs* rw, + owner @{user_state_dirs}/ r, + owner @{user_state_dirs}/lesshs* rw, + + # This is the file that holds the message + owner /{var/,}tmp/mutt* rw, + + include if exists + } + profile gpg { include include