mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-18 08:58:15 +01:00
feat(aa): move the all rule to its own file.
This commit is contained in:
parent
1e79d27232
commit
28f4294774
2 changed files with 33 additions and 25 deletions
33
pkg/aa/all.go
Normal file
33
pkg/aa/all.go
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
// apparmor.d - Full set of apparmor profiles
|
||||||
|
// Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
package aa
|
||||||
|
|
||||||
|
const (
|
||||||
|
tokALL = "all"
|
||||||
|
)
|
||||||
|
|
||||||
|
type All struct {
|
||||||
|
RuleBase
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *All) Less(other any) bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *All) Equals(other any) bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *All) String() string {
|
||||||
|
return renderTemplate(r.Kind(), r)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *All) Constraint() constraint {
|
||||||
|
return blockKind
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *All) Kind() string {
|
||||||
|
return tokALL
|
||||||
|
}
|
|
@ -97,28 +97,3 @@ func (r Qualifier) Less(other Qualifier) bool {
|
||||||
func (r Qualifier) Equals(other Qualifier) bool {
|
func (r Qualifier) Equals(other Qualifier) bool {
|
||||||
return r.Audit == other.Audit && r.AccessType == other.AccessType
|
return r.Audit == other.Audit && r.AccessType == other.AccessType
|
||||||
}
|
}
|
||||||
|
|
||||||
type All struct {
|
|
||||||
RuleBase
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
func (r *All) Less(other any) bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *All) Equals(other any) bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *All) String() string {
|
|
||||||
return renderTemplate(r.Kind(), r)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *All) Constraint() constraint {
|
|
||||||
return blockKind
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *All) Kind() string {
|
|
||||||
return tokALL
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue