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
|
|
@ -7,12 +7,11 @@ package aa
|
|||
import "fmt"
|
||||
|
||||
const (
|
||||
tokRLIMIT = "rlimit"
|
||||
tokSET = "set"
|
||||
RLIMIT Kind = "rlimit"
|
||||
)
|
||||
|
||||
func init() {
|
||||
requirements[tokRLIMIT] = requirement{
|
||||
requirements[RLIMIT] = requirement{
|
||||
"keys": {
|
||||
"cpu", "fsize", "data", "stack", "core", "rss", "nofile", "ofile",
|
||||
"as", "nproc", "memlock", "locks", "sigpending", "msgqueue", "nice",
|
||||
|
|
@ -68,6 +67,6 @@ func (r *Rlimit) Constraint() constraint {
|
|||
return blockKind
|
||||
}
|
||||
|
||||
func (r *Rlimit) Kind() string {
|
||||
return tokRLIMIT
|
||||
func (r *Rlimit) Kind() Kind {
|
||||
return RLIMIT
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue