feat(aa): add the Kind struct to manage aa rules.
This commit is contained in:
parent
1333ec2025
commit
3b0944c615
23 changed files with 239 additions and 223 deletions
|
|
@ -5,8 +5,7 @@
|
|||
package aa
|
||||
|
||||
const (
|
||||
tokHAT = "hat"
|
||||
tokCARET = "^"
|
||||
HAT Kind = "hat"
|
||||
)
|
||||
|
||||
// Hat represents a single AppArmor hat.
|
||||
|
|
@ -26,7 +25,7 @@ func (p *Hat) Less(other any) bool {
|
|||
}
|
||||
|
||||
func (p *Hat) Equals(other any) bool {
|
||||
o, _ := other.(*Profile)
|
||||
o, _ := other.(*Hat)
|
||||
return p.Name == o.Name
|
||||
}
|
||||
|
||||
|
|
@ -38,6 +37,6 @@ func (p *Hat) Constraint() constraint {
|
|||
return blockKind
|
||||
}
|
||||
|
||||
func (p *Hat) Kind() string {
|
||||
return tokHAT
|
||||
func (p *Hat) Kind() Kind {
|
||||
return HAT
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue