Update profiles.

This commit is contained in:
Alexandre Pujol 2022-02-05 20:02:10 +00:00
parent c61bd95b3a
commit dc19fc72a8
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
11 changed files with 40 additions and 25 deletions

View File

@ -18,6 +18,7 @@ profile dbus-daemon @{exec_path} flags=(attach_disconnected) {
capability sys_resource,
signal (receive) set=(term hup kill) peer=gdm*,
signal (receive) set=(term hup kill) peer=at-spi-bus-launcher,
signal (send) set=(term hup kill) peer=at-spi-bus-launcher,
signal (send) set=(term hup kill) peer=xdg-permission-store,

View File

@ -51,6 +51,7 @@ profile pacman @{exec_path} {
/{usr/,}bin/chmod rix,
/{usr/,}bin/dot rix,
/{usr/,}bin/env rix,
/{usr/,}bin/filecap rix,
/{usr/,}bin/getent rix,
/{usr/,}bin/gettext rix,
/{usr/,}bin/ghc-pkg-* rix,

View File

@ -32,6 +32,8 @@ profile bootctl @{exec_path} {
/boot/loader/.#bootctlrandom-seed[0-9a-f]* rw,
/boot/loader/random-seed w,
/etc/machine-id r,
@{sys}/devices/virtual/dmi/id/{sys_vendor,product_version,product_name} r,
@{sys}/firmware/efi/efivars/ r,

View File

@ -11,6 +11,7 @@ profile acpid @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/nameservice-strict>
capability dac_read_search,
capability mknod,
network netlink raw,
@ -20,7 +21,7 @@ profile acpid @{exec_path} flags=(attach_disconnected) {
/{usr/,}bin/{ba,da,}sh rix,
/{usr/,}bin/logger rix,
/etc/acpi/powerbtn-acpi-support.sh rPx -> acpid//powerbtn-acpi-support.sh,
/etc/acpi/powerbtn-acpi-support.sh rPx -> powerbtn-acpi-support,
/etc/acpi/{,**} r,
/etc/acpi/handler.sh rix,
@ -37,26 +38,35 @@ profile acpid @{exec_path} flags=(attach_disconnected) {
include if exists <local/acpid>
}
profile acpid//powerbtn-acpi-support.sh flags=(attach_disconnected) {
profile powerbtn-acpi-support flags=(attach_disconnected) {
include <abstractions/base>
/etc/acpi/powerbtn-acpi-support.sh r,
/{usr/,}bin/sed rix,
/{usr/,}bin/pgrep rix,
/{usr/,}bin/{e,}grep rix,
/{usr/,}bin/pinky rix,
/{usr/,}bin/{ba,da,}sh rix,
/{usr/,}bin/dbus-send rix,
/{usr/,}{s,}bin/killall5 rix,
/{usr/,}{s,}bin/shutdown rix,
/{usr/,}bin/{ba,da,}sh rix,
/{usr/,}bin/{e,}grep rix,
/{usr/,}bin/dbus-send rix,
/{usr/,}bin/pgrep rix,
/{usr/,}bin/pinky rix,
/{usr/,}bin/sed rix,
/etc/acpi/powerbtn.sh rix,
/{usr/,}bin/systemctl rPx -> child-systemctl,
/{usr/,}bin/ps rPx,
/{usr/,}bin/fgconsole rCx,
profile fgconsole /usr/bin/fgconsole {
/usr/share/acpi-support/** r,
@{PROC} r,
@{PROC}/uptime r,
@{PROC}/@{pids}/cmdline r,
deny / r,
profile fgconsole {
include <abstractions/base>
capability sys_tty_config,
@ -67,13 +77,5 @@ profile acpid//powerbtn-acpi-support.sh flags=(attach_disconnected) {
owner /dev/tty[0-9]* rw,
}
/usr/share/acpi-support/** r,
deny / r,
@{PROC} r,
@{PROC}/uptime r,
@{PROC}/@{pids}/cmdline r,
include if exists <local/acpid_powerbtn-acpi-support.sh>
include if exists <local/powerbtn-acpi-support>
}

View File

@ -13,10 +13,17 @@ profile aurpublish @{exec_path} {
@{exec_path} mr,
/{usr/,}bin/{,ba,da}sh rix,
/{usr/,}bin/cat rix,
/{usr/,}bin/git rPx,
/{usr/,}bin/makepkg rUx,
/{usr/,}bin/rm rix,
/{usr/,}bin/wc rix,
owner @{HOME}/@{XDG_PROJECTS_DIR}/**/.git/COMMIT_EDITMSG rw,
owner @{HOME}/@{XDG_PROJECTS_DIR}/**/.SRCINFO rw,
owner @{HOME}/@{XDG_PROJECTS_DIR}/**/PKGBUILD r,
/dev/tty rw,
include if exists <local/aurpublish>
}

View File

@ -7,8 +7,6 @@ abi <abi/3.0>,
include <tunables/global>
@{BACKUP_DIR} = @{MOUNTS}/Arti/backup-*
@{exec_path} = /{usr/,}bin/borg
profile borg @{exec_path} {
include <abstractions/base>
@ -82,8 +80,8 @@ profile borg @{exec_path} {
/var/{,**} r,
# The backup dirs
owner @{BACKUP_DIR}/ r,
owner @{BACKUP_DIR}/** rwkl -> @{BACKUP_DIR}/**,
owner @{MOUNTS}/ r,
owner @{MOUNTS}/** rwkl -> @{MOUNTS}/**,
# For exporting the key
owner /**/key w,

View File

@ -34,9 +34,10 @@ profile browserpass @{exec_path} flags=(attach_disconnected) {
deny network inet dgram,
deny network inet6 stream,
deny network inet stream,
deny owner @{user_share_dirs}/gvfs-metadata/{,**} r,
deny owner @{HOME}/.mozilla/firefox/[0-9a-z]*.default/storage/default/{,**} r,
deny owner @{HOME}/@{XDG_DOWNLOAD_DIR}/{,**} rw,
deny owner @{run}/user/@{uid}/gnome-shell-disable-extensions w,
deny owner @{user_share_dirs}/gvfs-metadata/{,**} r,
deny /dev/dri/card[0-9]* rw,
deny /dev/dri/renderD128 rw,

View File

@ -21,7 +21,7 @@ profile fusermount @{exec_path} {
owner @{HOME}/*/ rw,
owner @{HOME}/*/*/ rw,
owner @{user_cache_dirs}/**/ rw,
owner @{run}/user/@{uid}/doc/ r,
@{run}/user/@{uid}/doc/ r,
# Be able to mount ISO images
mount fstype={fuse,fuse.*} -> @{HOME}/*/,

View File

@ -49,6 +49,9 @@ profile ntfs-3g @{exec_path} {
mount fstype=fuseblk /dev/dm-[0-9]* -> /mnt/,
mount fstype=fuseblk /dev/dm-[0-9]* -> /mnt/*/,
umount @{MOUNTS}/*/,
umount /mnt/*/,
# kmod is used to load the fuse kernel module
/{usr/,}bin/kmod rPx,

View File

@ -36,6 +36,7 @@ profile wireplumber @{exec_path} {
@{sys}/class/ r,
@{sys}/class/sound/ r,
@{sys}/class/video4linux/ r,
@{sys}/devices/**/sound/**/pcm_class r,
@{sys}/devices/**/sound/**/uevent r,
@{sys}/devices/pci[0-9]*/**/modalias r,
@{sys}/devices/pci[0-9]*/**/video4linux/video[0-9]*/uevent r,

View File

@ -7,7 +7,6 @@ agetty complain
askpass complain
at-spi-bus-launcher attach_disconnected
auditd complain
aurpublish complain
badblocks complain
biosdecode complain
blkid complain