fix(profile): multiple minor fixes.

fix #493 #480
This commit is contained in:
Alexandre Pujol 2024-09-17 12:55:08 +01:00
parent 7858cae330
commit 516a1fd36d
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
9 changed files with 24 additions and 2 deletions

View file

@ -37,6 +37,8 @@ profile child-pager {
owner @{user_state_dirs}/ r, owner @{user_state_dirs}/ r,
owner @{user_state_dirs}/lesshs* rw, owner @{user_state_dirs}/lesshs* rw,
/dev/tty@{int} rw,
include if exists <local/child-pager> include if exists <local/child-pager>
} }

View file

@ -30,7 +30,7 @@ profile archlinux-keyring-wkd-sync @{exec_path} {
/etc/pacman.conf r, /etc/pacman.conf r,
/etc/pacman.d/*-mirrorlist r, /etc/pacman.d/*-mirrorlist r,
/etc/pacman.d/gnupg/ rw, /etc/pacman.d/gnupg/ rw,
/etc/pacman.d/gnupg/** rwk -> /etc/pacman.d/gnupg/**, /etc/pacman.d/gnupg/** rwlk -> /etc/pacman.d/gnupg/**,
/etc/pacman.d/mirrorlist r, /etc/pacman.d/mirrorlist r,
owner @{PROC}/@{pid}/fd/ r, owner @{PROC}/@{pid}/fd/ r,

View file

@ -12,6 +12,8 @@ profile systemd-generator-user-environment @{exec_path} {
include <abstractions/common/systemd> include <abstractions/common/systemd>
include <abstractions/nameservice-strict> include <abstractions/nameservice-strict>
capability net_admin,
@{exec_path} mr, @{exec_path} mr,
@{sh_path} rix, @{sh_path} rix,

View file

@ -49,6 +49,7 @@ profile systemd-journald @{exec_path} {
@{run}/udev/data/+acpi:* r, @{run}/udev/data/+acpi:* r,
@{run}/udev/data/+bluetooth:* r, @{run}/udev/data/+bluetooth:* r,
@{run}/udev/data/+hid:* r, # for HID-Compliant Keyboard @{run}/udev/data/+hid:* r, # for HID-Compliant Keyboard
@{run}/udev/data/+ieee80211:* r,
@{run}/udev/data/+input:input@{int} r, # for mouse, keyboard, touchpad @{run}/udev/data/+input:input@{int} r, # for mouse, keyboard, touchpad
@{run}/udev/data/+mdio_bus:* r, @{run}/udev/data/+mdio_bus:* r,
@{run}/udev/data/+pci:* r, @{run}/udev/data/+pci:* r,

View file

@ -31,6 +31,7 @@ profile auditd @{exec_path} flags=(attach_disconnected) {
owner @{run}/auditd.pid rwl, owner @{run}/auditd.pid rwl,
owner @{run}/auditd.state rw, owner @{run}/auditd.state rw,
@{PROC}/@{pid}/ r,
owner @{PROC}/@{pid}/attr/current r, owner @{PROC}/@{pid}/attr/current r,
owner @{PROC}/@{pid}/loginuid r, owner @{PROC}/@{pid}/loginuid r,
owner @{PROC}/@{pid}/oom_score_adj rw, owner @{PROC}/@{pid}/oom_score_adj rw,

View file

@ -54,13 +54,15 @@ profile login @{exec_path} flags=(attach_disconnected) {
/etc/security/pam_env.conf r, /etc/security/pam_env.conf r,
/etc/shells r, /etc/shells r,
/var/lib/faillock/@{user} rwk,
/var/log/btmp{,.@{int}} r, /var/log/btmp{,.@{int}} r,
owner @{user_cache_dirs}/motd.legal-displayed rw, owner @{user_cache_dirs}/motd.legal-displayed rw,
@{run}/motd.d/{,*} r, @{run}/credentials/getty@tty@{int}.service/ r,
@{run}/dbus/system_bus_socket rw, @{run}/dbus/system_bus_socket rw,
@{run}/faillock/@{user} rwk, @{run}/faillock/@{user} rwk,
@{run}/motd.d/{,*} r,
@{run}/motd.dynamic{,.new} rw, @{run}/motd.dynamic{,.new} rw,
@{run}/systemd/sessions/*.ref rw, @{run}/systemd/sessions/*.ref rw,

View file

@ -20,6 +20,8 @@ profile nft @{exec_path} {
@{exec_path} mr, @{exec_path} mr,
/usr/share/iproute2/{,**} r,
/etc/iproute2/** r, /etc/iproute2/** r,
/etc/nftables.conf r, /etc/nftables.conf r,
/etc/nftables/{,**} r, /etc/nftables/{,**} r,

View file

@ -9,6 +9,7 @@ include <tunables/global>
@{exec_path} = @{bin}/pidof @{exec_path} = @{bin}/pidof
profile pidof @{exec_path} { profile pidof @{exec_path} {
include <abstractions/base> include <abstractions/base>
include <abstractions/consoles>
capability sys_ptrace, capability sys_ptrace,

View file

@ -22,6 +22,7 @@ profile resolvconf @{exec_path} {
@{bin}/rm rix, @{bin}/rm rix,
@{bin}/run-parts rix, @{bin}/run-parts rix,
@{bin}/sed rix, @{bin}/sed rix,
@{bin}/systemctl rCx -> systemctl,
@{lib}/resolvconf/list-records rix, @{lib}/resolvconf/list-records rix,
/usr/lib/resolvconf/{,**} r, /usr/lib/resolvconf/{,**} r,
@ -35,6 +36,16 @@ profile resolvconf @{exec_path} {
/dev/tty rw, /dev/tty rw,
profile systemctl {
include <abstractions/base>
include <abstractions/app/systemctl>
capability net_admin,
capability sys_ptrace,
include if exists <local/resolvconf_systemctl>
}
include if exists <local/resolvconf> include if exists <local/resolvconf>
} }