feat(profile): general update.

This commit is contained in:
Alexandre Pujol 2024-07-15 23:12:39 +01:00
parent 9b2470462f
commit 6cd01064ae
Failed to generate hash of commit
27 changed files with 59 additions and 18 deletions

View file

@ -41,6 +41,7 @@
/ r, / r,
/etc/machine-id r, /etc/machine-id r,
/var/db/sudo/lectured/ r,
owner /var/lib/sudo/ts/ rw, owner /var/lib/sudo/ts/ rw,
owner /var/lib/sudo/ts/@{uid} rwk, owner /var/lib/sudo/ts/@{uid} rwk,
owner /var/log/sudo.log wk, owner /var/log/sudo.log wk,

View file

@ -3,7 +3,7 @@
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io> # Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
ptrace (read) peer=@{p_systemd}, ptrace read peer=@{p_systemd},
@{sys}/firmware/efi/efivars/SecureBoot-@{uuid} r, @{sys}/firmware/efi/efivars/SecureBoot-@{uuid} r,
@{sys}/fs/cgroup/system.slice/@{profile_name}.service/memory.pressure rw, @{sys}/fs/cgroup/system.slice/@{profile_name}.service/memory.pressure rw,

View file

@ -13,6 +13,8 @@
member=Introspect member=Introspect
peer=(name=:*, label=gnome-shell), peer=(name=:*, label=gnome-shell),
/usr/share/icu/@{int}.@{int}/*.dat r,
/usr/{local/,}share/ r, /usr/{local/,}share/ r,
/usr/{local/,}share/glib-@{int}.@{int}/schemas/** r, /usr/{local/,}share/glib-@{int}.@{int}/schemas/** r,
/usr/{local/,}share/gvfs/remote-volume-monitors/{,*} r, /usr/{local/,}share/gvfs/remote-volume-monitors/{,*} r,

View file

@ -70,11 +70,8 @@ profile default @{exec_path} flags=(attach_disconnected,mediate_deleted) {
@{MOUNTS}/** rwl, @{MOUNTS}/** rwl,
owner @{HOME}/{,**} rwlk, owner @{HOME}/{,**} rwlk,
owner @{run}/user/@{uid}/{,**} rw, owner @{run}/user/@{uid}/{,**} rw,
owner @{user_config_dirs}/** rwkl,
owner @{user_share_dirs}/** rwkl,
owner @{tmp}/{,**} rwk, owner @{tmp}/{,**} rwk,
owner @{run}/user/@{uid}/{,**} rwlk,
owner @{run}/user/@{uid}/{,**} rw,
@{run}/motd.dynamic.new rw, @{run}/motd.dynamic.new rw,

View file

@ -30,6 +30,9 @@ profile firefox-crashreporter @{exec_path} flags=(attach_disconnected) {
@{exec_path} mr, @{exec_path} mr,
@{bin}/curl rix,
@{bin}/mv rix,
@{lib_dirs}/minidump-analyzer rPx, @{lib_dirs}/minidump-analyzer rPx,
@{bin}/mv rix, @{bin}/mv rix,

View file

@ -71,7 +71,7 @@ profile child-modprobe-nvidia flags=(attach_disconnected) {
# @{sys}/module/{drm,nvidia}/initstate r, # @{sys}/module/{drm,nvidia}/initstate r,
@{sys}/module/compression r, @{sys}/module/compression r,
deny @{HOME}/.steam/** r, deny @{HOME}/.steam/** r,
include if exists <local/child-modprobe-nvidia_kmod> include if exists <local/child-modprobe-nvidia_kmod>
} }

View file

@ -29,6 +29,7 @@ profile gdm-session-worker @{exec_path} flags=(attach_disconnected) {
capability sys_tty_config, capability sys_tty_config,
network netlink raw, network netlink raw,
network unix stream,
signal (receive) set=term peer=gdm, signal (receive) set=term peer=gdm,
signal (send) set=(hup term) peer=gdm-session, signal (send) set=(hup term) peer=gdm-session,

View file

@ -27,6 +27,7 @@ profile gsd-media-keys @{exec_path} flags=(attach_disconnected) {
signal (receive) set=(term, hup) peer=gdm*, signal (receive) set=(term, hup) peer=gdm*,
network inet stream,
network netlink raw, network netlink raw,
#aa:dbus own bus=session name=org.gnome.SettingsDaemon.MediaKeys #aa:dbus own bus=session name=org.gnome.SettingsDaemon.MediaKeys

View file

@ -21,6 +21,8 @@ profile session-migration @{exec_path} {
owner @{gdm_share_dirs}/session_migration-* rw, owner @{gdm_share_dirs}/session_migration-* rw,
owner @{user_share_dirs}/session_migration-* rw, owner @{user_share_dirs}/session_migration-* rw,
/dev/tty@{int} rw,
include if exists <local/session-migration> include if exists <local/session-migration>
} }

View file

@ -29,7 +29,7 @@ profile aurpublish @{exec_path} {
@{bin}/date rix, @{bin}/date rix,
@{bin}/gettext rix, @{bin}/gettext rix,
@{bin}/git rPx, @{bin}/git rPx,
@{bin}/gpg{,2} rPx, @{bin}/gpg{,2} rCx -> gpg,
@{bin}/grep rix, @{bin}/grep rix,
@{bin}/makepkg rix, @{bin}/makepkg rix,
@{bin}/mkdir rix, @{bin}/mkdir rix,
@ -48,10 +48,9 @@ profile aurpublish @{exec_path} {
/etc/makepkg.conf.d/{,**} r, /etc/makepkg.conf.d/{,**} r,
owner @{user_build_dirs}/**/ w, owner @{user_build_dirs}/**/ w,
owner @{user_projects_dirs}/**/ r, owner @{user_projects_dirs}/** r,
owner @{user_projects_dirs}/**/.git/COMMIT_EDITMSG rw, owner @{user_projects_dirs}/**/.git/COMMIT_EDITMSG rw,
owner @{user_projects_dirs}/**/.SRCINFO rw, owner @{user_projects_dirs}/**/.SRCINFO rw,
owner @{user_projects_dirs}/**/PKGBUILD r,
owner @{user_cache_dirs}/makepkg/src/* rw, owner @{user_cache_dirs}/makepkg/src/* rw,
owner @{user_config_dirs}/pacman/makepkg.conf r, owner @{user_config_dirs}/pacman/makepkg.conf r,
@ -62,6 +61,22 @@ profile aurpublish @{exec_path} {
/dev/tty rw, /dev/tty rw,
profile gpg {
include <abstractions/base>
@{bin}/gpg{,2} mr,
@{bin}/gpgconf mr,
owner @{HOME}/@{XDG_GPG_DIR}/ rw,
owner @{HOME}/@{XDG_GPG_DIR}/** rwkl -> @{HOME}/@{XDG_GPG_DIR}/**,
owner @{user_cache_dirs}/makepkg/src/*.asc r,
owner @{tmp}/tmp.@{rand10} rw,
include if exists <local/aurpublish_gpg>
}
include if exists <local/aurpublish> include if exists <local/aurpublish>
} }

View file

@ -12,6 +12,7 @@ profile systemd-cryptsetup @{exec_path} {
include <abstractions/common/systemd> include <abstractions/common/systemd>
include <abstractions/disks-write> include <abstractions/disks-write>
capability dac_read_search,
capability ipc_lock, capability ipc_lock,
capability net_admin, capability net_admin,
capability sys_admin, capability sys_admin,

View file

@ -63,6 +63,7 @@ profile systemd-logind @{exec_path} flags=(attach_disconnected) {
/var/lib/systemd/linger/ r, /var/lib/systemd/linger/ r,
@{run}/.#nologin* rw, @{run}/.#nologin* rw,
@{run}/credentials/getty@tty@{int}.service/ r,
@{run}/host/container-manager r, @{run}/host/container-manager r,
@{run}/nologin rw, @{run}/nologin rw,
@{run}/utmp rk, @{run}/utmp rk,

View file

@ -52,6 +52,7 @@ profile systemd-udevd @{exec_path} flags=(attach_disconnected,complain) {
@{bin}/more rPx -> child-pager, @{bin}/more rPx -> child-pager,
@{bin}/multipath rPx, @{bin}/multipath rPx,
@{bin}/nfsrahead rix, @{bin}/nfsrahead rix,
@{bin}/nvidia-modprobe rPx -> child-modprobe-nvidia,
@{bin}/pager rPx -> child-pager, @{bin}/pager rPx -> child-pager,
@{bin}/perl rix, @{bin}/perl rix,
@{bin}/setfacl rix, @{bin}/setfacl rix,

View file

@ -51,6 +51,7 @@ profile apport-gtk @{exec_path} {
@{bin}/pkexec rPx, # TODO: rCx or something @{bin}/pkexec rPx, # TODO: rCx or something
@{bin}/systemctl rCx -> systemctl, @{bin}/systemctl rCx -> systemctl,
@{bin}/systemd-detect-virt rPx, @{bin}/systemd-detect-virt rPx,
@{bin}/uname rix,
@{bin}/which{,.debianutils} rix, @{bin}/which{,.debianutils} rix,
@{lib}/{,colord/}colord-sane rPx, @{lib}/{,colord/}colord-sane rPx,
@{lib}/@{multiarch}/ld*.so* rix, @{lib}/@{multiarch}/ld*.so* rix,
@ -60,8 +61,8 @@ profile apport-gtk @{exec_path} {
/usr/share/apport/general-hooks/*.py r, /usr/share/apport/general-hooks/*.py r,
/etc/apport/{,**} r, /etc/apport/{,**} r,
/etc/cloud/cloud.cfg.d/{,**} r,
/etc/bash_completion.d/apport_completion r, /etc/bash_completion.d/apport_completion r,
/etc/cloud/{,**} r,
/etc/cron.daily/apport r, /etc/cron.daily/apport r,
/etc/default/apport r, /etc/default/apport r,
/etc/gtk-3.0/settings.ini r, /etc/gtk-3.0/settings.ini r,
@ -69,13 +70,15 @@ profile apport-gtk @{exec_path} {
/etc/logrotate.d/apport r, /etc/logrotate.d/apport r,
/etc/xdg/autostart/*.desktop r, /etc/xdg/autostart/*.desktop r,
/var/crash/{,*.@{uid}.crash} rw,
/var/lib/dpkg/info/ r, /var/lib/dpkg/info/ r,
/var/lib/dpkg/info/*.list r, /var/lib/dpkg/info/*.list r,
/var/lib/usbutils/*.ids r, /var/lib/usbutils/*.ids r,
/var/lib/dpkg/info/*.md5sums r, /var/lib/dpkg/info/*.md5sums r,
/var/log/installer/media-info r, /var/log/installer/media-info r,
/var/crash/ rw,
owner /var/crash/*.@{uid}.{crash,upload} rw,
@{run}/snapd.socket rw, @{run}/snapd.socket rw,
/tmp/[a-z0-9]* rw, /tmp/[a-z0-9]* rw,
@ -104,6 +107,7 @@ profile apport-gtk @{exec_path} {
@{bin}/* r, @{bin}/* r,
/usr/share/gcc/python/{,**/}__pycache__/{,**} rw, /usr/share/gcc/python/{,**/}__pycache__/{,**} rw,
/usr/share/gdb/python/{,**/}__pycache__/{,**} rw,
/usr/share/gdb/{,**} r, /usr/share/gdb/{,**} r,
/usr/share/glib-2.0/schemas/gschemas.compiled r, /usr/share/glib-2.0/schemas/gschemas.compiled r,

View file

@ -34,6 +34,7 @@ profile agetty @{exec_path} {
/etc/os-release r, /etc/os-release r,
/usr/etc/login.defs r, /usr/etc/login.defs r,
@{run}/credentials/getty@tty@{int}.service/ r,
@{run}/credentials/serial-getty@ttyS@{int}.service/ r, @{run}/credentials/serial-getty@ttyS@{int}.service/ r,
owner @{run}/agetty.reload rw, owner @{run}/agetty.reload rw,

View file

@ -11,10 +11,8 @@ include <tunables/global>
profile dino-im @{exec_path} { profile dino-im @{exec_path} {
include <abstractions/base> include <abstractions/base>
include <abstractions/dconf-write> include <abstractions/dconf-write>
include <abstractions/desktop>
include <abstractions/fontconfig-cache-read> include <abstractions/fontconfig-cache-read>
include <abstractions/fonts>
include <abstractions/freedesktop.org>
include <abstractions/gtk>
include <abstractions/nameservice-strict> include <abstractions/nameservice-strict>
include <abstractions/ssl_certs> include <abstractions/ssl_certs>
@ -46,6 +44,7 @@ profile dino-im @{exec_path} {
owner @{HOME}/.gnupg/ rw, owner @{HOME}/.gnupg/ rw,
owner @{HOME}/.gnupg/** rwkl -> @{HOME}/.gnupg/**, owner @{HOME}/.gnupg/** rwkl -> @{HOME}/.gnupg/**,
include if exists <local/dino-im_gpg>
} }
include if exists <local/dino-im> include if exists <local/dino-im>

View file

@ -104,7 +104,7 @@ profile dkms @{exec_path} flags=(attach_disconnected) {
owner /boot/System.map-* r, owner /boot/System.map-* r,
audit owner @{tmp}/tmp.* r, owner @{tmp}/tmp.@{rand10} r,
@{sys}/module/compression r, @{sys}/module/compression r,

View file

@ -23,6 +23,8 @@ profile fractal @{exec_path} flags=(attach_disconnected) {
@{exec_path} mr, @{exec_path} mr,
/usr/share/xml/iso-codes/{,**} r,
owner @{tmp}/.@{rand6} rw, owner @{tmp}/.@{rand6} rw,
owner @{tmp}/.goutputstream-@{rand6} rw, owner @{tmp}/.goutputstream-@{rand6} rw,
owner @{tmp}/@{rand6} rw, owner @{tmp}/@{rand6} rw,

View file

@ -142,7 +142,8 @@ profile fwupd @{exec_path} flags=(complain,attach_disconnected) {
owner /var/lib/fwupd/gnupg/ rw, owner /var/lib/fwupd/gnupg/ rw,
owner /var/lib/fwupd/gnupg/** rwkl -> /var/lib/fwupd/gnupg/**, owner /var/lib/fwupd/gnupg/** rwkl -> /var/lib/fwupd/gnupg/**,
owner @{PROC}/@{pids}/fd/ r, owner @{PROC}/@{pid}/fd/ r,
owner @{PROC}/@{pid}/task/@{tid}/comm rw,
include if exists <local/fwupd_gpg> include if exists <local/fwupd_gpg>
} }

View file

@ -26,6 +26,8 @@ profile issue-generator @{exec_path} {
@{run}/issue.@{rand10} rw, @{run}/issue.@{rand10} rw,
@{run}/issue.d/{,**} r, @{run}/issue.d/{,**} r,
/dev/tty rw,
include if exists <local/issue-generator> include if exists <local/issue-generator>
} }

View file

@ -74,6 +74,7 @@ profile keepassxc @{exec_path} {
owner @{tmp}/keepassxc-*.socket rw, owner @{tmp}/keepassxc-*.socket rw,
owner @{tmp}/keepassxc.lock rw, owner @{tmp}/keepassxc.lock rw,
owner @{tmp}/keepassxc.socket rw, owner @{tmp}/keepassxc.socket rw,
owner @{tmp}/runtime-user/ w,
owner @{run}/user/@{pid}/app/ w, owner @{run}/user/@{pid}/app/ w,
owner @{run}/user/@{pid}/app/org.keepassxc.KeePassXC/{,**} rw, owner @{run}/user/@{pid}/app/org.keepassxc.KeePassXC/{,**} rw,

View file

@ -40,6 +40,7 @@ profile snapd @{exec_path} {
network inet dgram, network inet dgram,
network inet6 dgram, network inet6 dgram,
network netlink raw, network netlink raw,
network unix stream,
mount fstype=squashfs /dev/loop@{int} -> /tmp/syscheck-mountpoint-@{int}/, mount fstype=squashfs /dev/loop@{int} -> /tmp/syscheck-mountpoint-@{int}/,
umount /tmp/syscheck-mountpoint-@{int}/, umount /tmp/syscheck-mountpoint-@{int}/,

View file

@ -41,6 +41,9 @@ profile spice-vdagent @{exec_path} flags=(attach_disconnected) {
@{run}/spice-vdagentd/spice-vdagent-sock rw, @{run}/spice-vdagentd/spice-vdagent-sock rw,
@{sys}/devices/virtual/dmi/id/product_name r,
@{sys}/devices/virtual/dmi/id/sys_vendor r,
owner @{PROC}/@{pids}/task/@{tid}/comm rw, owner @{PROC}/@{pids}/task/@{tid}/comm rw,
owner /dev/tty@{int} rw, owner /dev/tty@{int} rw,

View file

@ -18,6 +18,7 @@ profile steam-gameoverlayui @{exec_path} flags=(attach_disconnected) {
include <abstractions/base> include <abstractions/base>
include <abstractions/audio-client> include <abstractions/audio-client>
include <abstractions/desktop> include <abstractions/desktop>
include <abstractions/fontconfig-cache-write>
include <abstractions/graphics> include <abstractions/graphics>
network inet stream, network inet stream,

View file

@ -35,6 +35,8 @@ profile sudo @{exec_path} flags=(attach_disconnected) {
/opt/*/** PUx, /opt/*/** PUx,
/snap/snapd/@{int}@{bin}/snap rPUx, /snap/snapd/@{int}@{bin}/snap rPUx,
/etc/default/locale r,
/var/db/sudo/lectured/ r, /var/db/sudo/lectured/ r,
owner /var/db/sudo/lectured/@{uid} rw, owner /var/db/sudo/lectured/@{uid} rw,
owner /var/lib/extrausers/shadow r, owner /var/lib/extrausers/shadow r,

View file

@ -26,7 +26,7 @@ profile update-ca-trust @{exec_path} {
/etc/ca-certificates/extracted/** rw, /etc/ca-certificates/extracted/** rw,
/etc/ssl/certs/{,*} rw, /etc/ssl/certs/{,*} rw,
/etc/ssl/certs/java/cacerts{,.*} w, /etc/ssl/certs/java/** rw,
/dev/tty rw, /dev/tty rw,

View file

@ -7,7 +7,6 @@ abi <abi/3.0>,
include <tunables/global> include <tunables/global>
@{exec_path} = @{bin}/waybar @{exec_path} = @{bin}/waybar
profile waybar @{exec_path} flags=(attach_disconnected) { profile waybar @{exec_path} flags=(attach_disconnected) {
include <abstractions/base> include <abstractions/base>
include <abstractions/audio> include <abstractions/audio>