feat(aa-log): unify the isOwner function across features.
This commit is contained in:
parent
856c425dd5
commit
29a1642598
2 changed files with 5 additions and 6 deletions
|
|
@ -200,12 +200,11 @@ func (aaLogs AppArmorLogs) String() string {
|
|||
for _, log := range aaLogs {
|
||||
seen := map[string]bool{"apparmor": true}
|
||||
res.WriteString(state[log["apparmor"]])
|
||||
fsuid := log["fsuid"]
|
||||
ouid := log["ouid"]
|
||||
owner := aa.IsOwner(log)
|
||||
|
||||
for _, key := range keys {
|
||||
if item, present := log[key]; present {
|
||||
if key == "name" && fsuid == ouid && !strings.Contains(log["operation"], "dbus") {
|
||||
if key == "name" && owner {
|
||||
res.WriteString(template[key] + " owner" + reset)
|
||||
}
|
||||
if temp, present := template[key]; present {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue