mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 00:14:44 +01:00
Merge zgrep: deny passwd access
Bash will try to read the passwd database to find the shell of a user if $SHELL is not set. This causes zgrep to trigger ``` 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 ``` if called in a sanitized environment. As the functionality of zgrep is not impacted by a limited Bash environment, add deny rules to avoid the potentially misleading AVC messages. Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net> MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1361 Approved-by: John Johansen <john@jjmx.net> Merged-by: John Johansen <john@jjmx.net>
This commit is contained in:
commit
82a4e70248
1 changed files with 3 additions and 0 deletions
|
@ -37,6 +37,9 @@ profile zgrep /usr/bin/{x,}zgrep {
|
|||
owner /tmp/zgrep* rw,
|
||||
/usr/bin/zgrep r,
|
||||
|
||||
deny /etc/nsswitch.conf r,
|
||||
deny /etc/passwd r,
|
||||
|
||||
include if exists <local/zgrep>
|
||||
|
||||
profile helper {
|
||||
|
|
Loading…
Add table
Reference in a new issue