feat(profile): improve attached paths definition.

This commit is contained in:
Alexandre Pujol 2025-04-05 00:38:47 +02:00
parent 22a214ca1b
commit c2b9f21d85
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
3 changed files with 20 additions and 2 deletions

View file

@ -15,6 +15,8 @@
@{bin}/systemctl mr,
@{att}/@{run}/systemd/private rw,
owner @{run}/systemd/private rw,
@{PROC}/1/cgroup r,

View file

@ -5,8 +5,21 @@
abi <abi/4.0>,
@{att}/dev/tty@{int} rw,
owner @{att}/dev/pts/@{int} rw,
# There are the common ways to refer to consoles
/dev/console rw,
/dev/tty rw,
/dev/tty@{u16} rw,
@{att}/dev/tty rw,
@{att}/dev/tty@{u16} rw,
# These entries are a bit unfortunate; /dev/tty will always be
# associated with the controlling terminal by the kernel, but if a
# program uses the /dev/pts/ interface, it actually has access to
# -all- xterm, sshd, etc, terminals on the system.
/dev/pts/ r,
owner /dev/pts/@{u16} rw,
@{att}/pts/ r,
owner @{att}/dev/pts/@{u16} rw,
include if exists <abstractions/attached/consoles.d>

View file

@ -43,6 +43,9 @@ profile systemd-coredump @{exec_path} flags=(attach_disconnected,mediate_deleted
/var/lib/systemd/coredump/{,**} rwl,
@{att}/@{run}/systemd/coredump rw,
@{run}/systemd/coredump rw,
@{PROC}/@{pids}/cgroup r,
@{PROC}/@{pids}/cmdline r,
@{PROC}/@{pids}/comm r,