feat(profile): general update.

This commit is contained in:
Alexandre Pujol 2024-03-29 19:45:10 +00:00
parent 1f8507548f
commit 0619f4dcec
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
43 changed files with 160 additions and 208 deletions

View file

@ -26,10 +26,9 @@ profile mutt @{exec_path} {
# Used to exec programs defined in the mailcap.
# There are countless programs that can be executed from the mailcap.
# This profile includes only the most basic.
@{bin}/{,ba,da}sh rix,
@{sh_path} rix,
@{bin}/sendmail rPUx,
@{lib}/sendmail/sendmail rPUx,
@{lib}/{,sendmail/}sendmail rPUx,
@{bin}/ispell rPUx,
@{bin}/abook rPUx,
@{bin}/mutt_dotlock rix,
@ -41,34 +40,33 @@ profile mutt @{exec_path} {
@{bin}/vim rCx -> editor,
@{bin}/vim.* rCx -> editor,
@{bin}/sensible-editor rCx -> editor,
@{bin}/more rCx -> pager,
@{bin}/less rCx -> pager,
@{bin}/pager rCx -> pager,
@{bin}/less rPx -> child-pager,
@{bin}/more rPx -> child-pager,
@{bin}/pager rPx -> child-pager,
@{bin}/gpg{2,} rCx -> gpg,
@{bin}/gpgconf rCx -> gpg,
@{bin}/gpgsm rCx -> gpg,
@{bin}/pgpewrap rCx -> gpg,
/usr/share/terminfo/** r,
/usr/share/mutt/** r,
# Mutt MIME types search path
/etc/mime.types r,
owner @{HOME}/.mime.types r,
@{etc_ro}/mailcap r,
/etc/mime.types r,
/etc/mutt{,**} r,
/etc/Muttrc r,
/etc/Muttrc.d/{*,} r,
# Mutt mailcap search path
/etc/{mutt/,}mailcap r,
/usr/etc/mailcap r,
owner @{HOME}/.mail_aliases r, # Common location for mail aliases
owner @{HOME}/.mailcap r,
# Mutt config files
/usr/share/mutt/** r,
/etc/{mutt/,}Muttrc r,
/etc/{mutt/,}Muttrc.d/{*,} r,
owner @{HOME}/.mutt/** r,
owner @{HOME}/.muttrc* r,
# Needed for the edit operation.
owner @{HOME}/ r,
owner @{HOME}/.mime.types r,
owner @{HOME}/.mutt_certificates rwk,
owner @{HOME}/.mutt/{,**} r,
owner @{HOME}/.mutthistory rwk,
owner @{HOME}/.muttrc* r,
owner @{HOME}/.signature r, # Mutt signature file
# User mbox
# Could be a file or dir depending on mbox_type variable
@ -76,24 +74,14 @@ profile mutt @{exec_path} {
owner @{HOME}/{mbox,postponed,sent}* rwlk,
owner @{HOME}/{mbox,postponed,sent}/ rw,
owner @{HOME}/{mbox,postponed,sent}/** rwlk,
owner @{user_config_dirs}/mutt/{,**} r,
owner @{user_cache_dirs}/mutt rwk,
# User maildir
owner @{user_mail_dirs}/ rw,
owner @{user_mail_dirs}/** rwlk -> @{user_mail_dirs}/**,
# Trusted certificate store
owner @{HOME}/.mutt_certificates rwk,
# Mutt history file
owner @{HOME}/.mutthistory rwk,
# Mutt signature file
owner @{HOME}/.signature r,
# Common location for mail aliases
owner @{HOME}/.mail_aliases r,
owner @{HOME}/.cache/mutt rwk,
# Needed to compose a message
owner /{var/,}tmp/.mutt*/ rw,
owner /{var/,}tmp/.mutt*/* lrwk,
@ -137,35 +125,14 @@ profile mutt @{exec_path} {
# Vim swap file
owner @{HOME}/ r,
owner @{HOME}/.cache/ r,
owner @{HOME}/.cache/vim/** wr,
owner @{user_cache_dirs}/ r,
owner @{user_cache_dirs}/vim/** wr,
# This is the file that holds the message
owner /{var/,}tmp/{.,}mutt* rw,
include if exists <local/mutt_editor>
}
profile pager {
include <abstractions/base>
include <abstractions/consoles>
/usr/share/terminfo/** r,
/usr/share/file/misc/magic.mgc r,
@{bin}/less mr,
@{bin}/more mr,
@{bin}/pager mr,
owner @{HOME}/.lesshs* r,
owner @{HOME}/.local/state/ r,
owner @{HOME}/.local/state/less* rw,
# This is the file that holds the message
owner /{var/,}tmp/mutt* rw,
include if exists <local/mutt_pager>
}
profile gpg {
include <abstractions/base>

View file

@ -10,77 +10,19 @@ include <tunables/global>
@{exec_path} = @{bin}/nemo
profile nemo @{exec_path} {
include <abstractions/base>
include <abstractions/gtk>
include <abstractions/fonts>
include <abstractions/fontconfig-cache-read>
include <abstractions/freedesktop.org>
include <abstractions/desktop>
include <abstractions/nameservice-strict>
# This should be tightened when the "profile has merged rule with conflicting x modifiers" error
# will be fixed. (#FIXME#)
include <abstractions/app-launcher-user>
include <abstractions/app-launcher-root>
# For root window
deny capability dac_read_search,
deny capability dac_override,
# Needed?
deny capability sys_nice,
network inet stream,
network inet6 stream,
@{exec_path} mr,
@{lib}/@{multiarch}/nemo/** mrix,
@{lib}/gvfsd-* rPx,
# @{lib}/@{multiarch}/nemo/** mrix,
owner @{PROC}/@{pid}/mountinfo r,
owner @{PROC}/@{pid}/mounts r,
owner @{PROC}/@{pid}/fd/ r,
# To read/write files in the system. The read permission is granted for all files, the write
# permission only for the owner. Also, dirs like /dev/, /efi/, /proc/, /sys/ are not included in
# the list.
/ r,
/boot/ r,
/boot/** r,
owner /boot/** rw,
/etc/ r,
/etc/** r,
owner /etc/** rw,
/home/ r,
/home/** r,
owner /home/** rw,
/lost+found/ r,
/lost+found/** r,
owner /lost+found/** rw,
@{MOUNTS}/ r,
@{MOUNTS}/** r,
owner @{MOUNTS}/** rw,
/opt/ r,
/opt/** r,
owner /opt/** rw,
/root/ r,
/root/** r,
owner /root/** rw,
@{run}/ r,
@{run}/** r,
owner @{run}/** rw,
/srv/ r,
/srv/** r,
owner /srv/** rw,
/tmp/ r,
/tmp/** r,
owner /tmp/** rw,
/usr/ r,
/usr/** r,
owner /usr/** rw,
/var/ r,
/var/** r,
owner /var/** rw,
include if exists <local/nemo>
}

View file

@ -13,9 +13,9 @@ profile packagekitd @{exec_path} flags=(attach_disconnected) {
include <abstractions/bus/org.freedesktop.login1>
include <abstractions/bus/org.freedesktop.NetworkManager>
include <abstractions/bus/org.freedesktop.PolicyKit1>
include <abstractions/common/apt> #aa:only apt
include <abstractions/nameservice-strict>
include <abstractions/ssl_certs>
include if exists <abstractions/common/apt>
capability chown,
capability dac_override,

View file

@ -21,6 +21,7 @@ profile power-profiles-daemon @{exec_path} flags=(attach_disconnected) {
network netlink raw,
#aa:dbus own bus=system name=net.hadess.PowerProfiles
#aa:dbus own bus=system name=org.freedesktop.UPower.PowerProfiles
@{exec_path} mr,