feat(aa): add define parameter for variables.
This commit is contained in:
parent
c719a0a109
commit
e9fa0660f8
2 changed files with 4 additions and 1 deletions
|
|
@ -47,7 +47,7 @@ func TestAppArmorProfile_String(t *testing.T) {
|
||||||
Includes: []*Include{{IsMagic: true, Path: "tunables/global"}},
|
Includes: []*Include{{IsMagic: true, Path: "tunables/global"}},
|
||||||
Aliases: []*Alias{{Path: "/mnt/usr", RewrittenPath: "/usr"}},
|
Aliases: []*Alias{{Path: "/mnt/usr", RewrittenPath: "/usr"}},
|
||||||
Variables: []*Variable{{
|
Variables: []*Variable{{
|
||||||
Name: "exec_path",
|
Name: "exec_path", Define: true,
|
||||||
Values: []string{"@{bin}/foo", "@{lib}/foo"},
|
Values: []string{"@{bin}/foo", "@{lib}/foo"},
|
||||||
}},
|
}},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,9 @@ type Variable struct {
|
||||||
RuleBase
|
RuleBase
|
||||||
Name string
|
Name string
|
||||||
Values []string
|
Values []string
|
||||||
|
Define bool
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Variable) Less(other any) bool {
|
func (r *Variable) Less(other any) bool {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue