zgrep: allow reading /etc/nsswitch.conf and /etc/passwd

Seen on various VMs, my guess is that bash wants to translate a uid to a
username.

Log events (slightly shortened)

apparmor="DENIED" operation="open" class="file" profile="zgrep" name="/etc/nsswitch.conf" comm="zgrep" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

apparmor="DENIED" operation="open" class="file" profile="zgrep" name="/etc/passwd" comm="zgrep" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
This commit is contained in:
Christian Boltz 2024-10-06 11:05:52 +02:00
parent bb460ba467
commit 68d42c3e37
Failed to generate hash of commit

View file

@ -17,6 +17,8 @@ profile zgrep /usr/bin/{x,}zgrep {
include <abstractions/bash>
/dev/tty rw,
@{etc_ro}/nsswitch.conf r,
/etc/passwd r,
/usr/bin/{ba,da,}sh ix,
/usr/bin/bzip2 Cx -> helper,
/usr/bin/cat ix,