feat(aa): a Constraint and Kind method to the Rule interface.
This commit is contained in:
parent
a5c4eab0cf
commit
f763d31a07
18 changed files with 210 additions and 19 deletions
|
|
@ -16,11 +16,21 @@ const (
|
|||
tokDENY = "deny"
|
||||
)
|
||||
|
||||
type constraint uint
|
||||
|
||||
const (
|
||||
anyKind constraint = iota // The rule can be found in either preamble or profile
|
||||
preambleKind // The rule can only be found in the preamble
|
||||
blockKind // The rule can only be found in a profile
|
||||
)
|
||||
|
||||
// Rule generic interface for all AppArmor rules
|
||||
type Rule interface {
|
||||
Less(other any) bool
|
||||
Equals(other any) bool
|
||||
String() string
|
||||
Constraint() constraint
|
||||
Kind() string
|
||||
}
|
||||
|
||||
type Rules []Rule
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue