feat(aa): modify the apparmor struct to support multiple profiles and subprofile.

This commit is contained in:
Alexandre Pujol 2024-04-15 14:09:04 +01:00
parent 507002c660
commit 4b753210e7
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
12 changed files with 467 additions and 394 deletions

View file

@ -208,8 +208,9 @@ func (aaLogs AppArmorLogs) ParseToProfiles() aa.AppArmorProfiles {
}
if _, ok := profiles[name]; !ok {
profile := &aa.AppArmorProfile{}
profile.Name = name
profile := &aa.AppArmorProfile{
Profiles: []*aa.Profile{{Header: aa.Header{Name: name}}},
}
profile.AddRule(log)
profiles[name] = profile
} else {