From a2910122d206122777d641ebdd969a5d826294f8 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Tue, 23 Apr 2024 19:18:42 +0100 Subject: [PATCH] fix: do not use the wrong profile. --- pkg/aa/variables.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/aa/variables.go b/pkg/aa/variables.go index 684564a2..ea7ce499 100644 --- a/pkg/aa/variables.go +++ b/pkg/aa/variables.go @@ -86,10 +86,10 @@ func (f *AppArmorProfileFile) resolve(str string) []string { func (f *AppArmorProfileFile) ResolveAttachments() { p := f.GetDefaultProfile() - for _, variable := range profile.Variables { + for _, variable := range f.Variables { if variable.Name == "exec_path" { for _, value := range variable.Values { - attachments := profile.resolve(value) + attachments := f.resolve(value) if len(attachments) == 0 { panic("Variable not defined in: " + value) }