feat(profile): more use @{etc_ro} when we know it is needed.

This commit is contained in:
Alexandre Pujol 2025-01-25 22:31:29 +01:00
parent 4e73f7209f
commit 8806030a0a
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
30 changed files with 49 additions and 45 deletions

View file

@ -98,9 +98,9 @@ profile snapd @{exec_path} {
/usr/share/dbus-1/services/*snap* r,
/usr/share/polkit-1/actions/{,**/} r,
@{etc_ro}/environment r,
/etc/apparmor.d/*snapd.snap* r,
/etc/dbus-1/system.d/{,**/} r,
/etc/environment r,
/etc/fstab r,
/etc/mime.types r,
/etc/modprobe.d/{,**/} r,

View file

@ -30,7 +30,7 @@ profile useradd @{exec_path} {
@{bin}/pam_tally2 rCx -> pam_tally2,
/etc/default/useradd r,
/etc/login.defs r,
@{etc_ro}/login.defs r,
/etc/{passwd,shadow,gshadow,group,subuid,subgid} rw,
/etc/{passwd,shadow,gshadow,group,subuid,subgid}- w,

View file

@ -26,7 +26,7 @@ profile userdel @{exec_path} flags=(attach_disconnected) {
@{exec_path} mr,
/etc/login.defs r,
@{etc_ro}/login.defs r,
/etc/{passwd,shadow,gshadow,group,subuid,subgid} rw,
/etc/{passwd,shadow,gshadow,group,subuid,subgid}.@{pid} w,

View file

@ -28,7 +28,7 @@ profile usermod @{exec_path} flags=(attach_disconnected) {
@{bin}/nscd rix,
/etc/login.defs r,
@{etc_ro}/login.defs r,
/etc/subuid r,
/etc/{passwd,shadow,gshadow,group} rw,

View file

@ -18,7 +18,7 @@ profile vipw-vigr @{exec_path} {
@{sh_path} rix,
@{editor_path} rCx -> editor,
/etc/login.defs r,
@{etc_ro}/login.defs r,
/etc/{passwd,shadow,gshadow,group}{,.edit} rw,
/etc/{passwd,shadow,gshadow,group}.@{pid} rw,