feat(aa): add define parameter for variables.

This commit is contained in:
Alexandre Pujol 2024-04-23 21:18:44 +01:00
parent c719a0a109
commit e9fa0660f8
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
2 changed files with 4 additions and 1 deletions

View File

@ -47,7 +47,7 @@ func TestAppArmorProfile_String(t *testing.T) {
Includes: []*Include{{IsMagic: true, Path: "tunables/global"}},
Aliases: []*Alias{{Path: "/mnt/usr", RewrittenPath: "/usr"}},
Variables: []*Variable{{
Name: "exec_path",
Name: "exec_path", Define: true,
Values: []string{"@{bin}/foo", "@{lib}/foo"},
}},
},

View File

@ -73,6 +73,9 @@ type Variable struct {
RuleBase
Name string
Values []string
Define bool
}
}
func (r *Variable) Less(other any) bool {