feat(aa): add support for audit log.

This commit is contained in:
Alexandre Pujol 2023-09-30 13:28:41 +01:00
parent e93c1bf4d8
commit 4dfc1388e3
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC

View file

@ -25,6 +25,10 @@ func NewQualifierFromLog(log map[string]string) Qualifier {
owner = true owner = true
} }
audit := false
if log["apparmor"] == "AUDIT" {
audit = true
}
fileInherit := false fileInherit := false
if log["operation"] == "file_inherit" { if log["operation"] == "file_inherit" {
fileInherit = true fileInherit = true
@ -34,7 +38,7 @@ func NewQualifierFromLog(log map[string]string) Qualifier {
noNewPrivs = true noNewPrivs = true
} }
return Qualifier{ return Qualifier{
Audit: false, Audit: audit,
AccessType: "", AccessType: "",
Owner: owner, Owner: owner,
NoNewPrivs: noNewPrivs, NoNewPrivs: noNewPrivs,