mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-31 07:17:22 +01:00
fix: do not use the wrong profile.
This commit is contained in:
parent
c97886d960
commit
a2910122d2
1 changed files with 2 additions and 2 deletions
|
@ -86,10 +86,10 @@ func (f *AppArmorProfileFile) resolve(str string) []string {
|
||||||
func (f *AppArmorProfileFile) ResolveAttachments() {
|
func (f *AppArmorProfileFile) ResolveAttachments() {
|
||||||
p := f.GetDefaultProfile()
|
p := f.GetDefaultProfile()
|
||||||
|
|
||||||
for _, variable := range profile.Variables {
|
for _, variable := range f.Variables {
|
||||||
if variable.Name == "exec_path" {
|
if variable.Name == "exec_path" {
|
||||||
for _, value := range variable.Values {
|
for _, value := range variable.Values {
|
||||||
attachments := profile.resolve(value)
|
attachments := f.resolve(value)
|
||||||
if len(attachments) == 0 {
|
if len(attachments) == 0 {
|
||||||
panic("Variable not defined in: " + value)
|
panic("Variable not defined in: " + value)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue