feat(aa-log): add a new apparmor profile struct

Also rewrite variables resolution to this new struct.
This commit is contained in:
Alexandre Pujol 2023-08-17 23:00:52 +01:00
parent b2d093e125
commit a8470dfa38
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
5 changed files with 379 additions and 156 deletions

View file

@ -45,7 +45,7 @@ func BuildComplain(profile string) string {
// Bypass userspace tools restriction
func BuildUserspace(profile string) string {
p := aa.NewAppArmorProfile()
p := aa.DefaultTunables()
p.ParseVariables(profile)
p.ResolveAttachments()
att := p.NestAttachments()