diff --git a/apparmor.d/profiles-m-r/mutt b/apparmor.d/profiles-m-r/mutt index b06846327..22535b691 100644 --- a/apparmor.d/profiles-m-r/mutt +++ b/apparmor.d/profiles-m-r/mutt @@ -25,22 +25,21 @@ profile mutt @{exec_path} { @{exec_path} mr, # Mutt config files - /usr/share/mutt/** r, - /etc/{mutt/,}Muttrc r, - owner @{HOME}/.mutt/** r, - owner @{HOME}/.muttrc* r, + /usr/share/mutt/** r, + /etc/{mutt/,}Muttrc r, + /etc/{mutt/,}Muttrc.d/{*,} r, + owner @{HOME}/.mutt/** r, + owner @{HOME}/.muttrc* r, owner @{HOME}/.cache/mutt rwk, # Used When viewing attachments owner /tmp/* lrw, - #Needed to open a mailbox (at least an imap one) - owner /tmp/.mutt*/ rw, - owner /tmp/.mutt*/* lrwk, - - # Might be able to get away without this - owner /tmp/mutt* lrwk, + # Needed to compose a message + owner /{var/,}tmp/.mutt*/ rw, + owner /{var/,}tmp/.mutt*/* lrwk, + owner /{var/,}tmp/mutt* lrwk, # Needed for the edit operation. @{HOME}/ r, @@ -89,6 +88,7 @@ profile mutt @{exec_path} { @{bin}/w3m rCx -> html-renderer, @{bin}/lynx rCx -> html-renderer, @{bin}/vim rCx -> editor, + @{bin}/vim.* rCx -> editor, @{bin}/sensible-editor rCx -> editor, @{bin}/more rCx -> pager, @{bin}/less rCx -> pager, @@ -105,7 +105,7 @@ profile mutt @{exec_path} { owner @{HOME}/.w3m/* rw, - owner /tmp/mutt* rw, + owner /{var/,}tmp/mutt* rw, include if exists } @@ -136,7 +136,7 @@ profile mutt @{exec_path} { owner @{HOME}/.cache/vim/** wr, # This is the file that holds the message - owner /tmp/mutt* rw, + owner /{var/,}tmp/{.,}mutt* rw, include if exists } @@ -157,7 +157,7 @@ profile mutt @{exec_path} { /usr/share/file/misc/magic.mgc r, # This is the file that holds the message - owner /tmp/mutt* rw, + owner /{var/,}tmp/mutt* rw, include if exists } @@ -172,7 +172,7 @@ profile mutt @{exec_path} { owner @{HOME}/@{XDG_GPG_DIR}/ rw, owner @{HOME}/@{XDG_GPG_DIR}/** rwkl -> @{HOME}/@{XDG_GPG_DIR}/**, - owner /tmp/mutt* lrw, + owner /{var/,}tmp/mutt* lrw, include if exists }