feat(aa-log): add a new constructors for aa rules.
This commit is contained in:
parent
a8470dfa38
commit
4f40cb6d78
2 changed files with 146 additions and 0 deletions
38
pkg/aa/template.go
Normal file
38
pkg/aa/template.go
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
// apparmor.d - Full set of apparmor profiles
|
||||
// Copyright (C) 2021-2023 Alexandre Pujol <alexandre@pujol.io>
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
package aa
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// TODO: Should be a map of slice, not exhausive yet
|
||||
var maskToAccess = map[string]string{
|
||||
"a": "w",
|
||||
"c": "w",
|
||||
"d": "w",
|
||||
"k": "rk",
|
||||
"l": "l",
|
||||
"m": "rm",
|
||||
"r": "r",
|
||||
"ra": "rw",
|
||||
"read write": "read write",
|
||||
"read": "read",
|
||||
"readby": "readby",
|
||||
"receive": "receive",
|
||||
"rm": "rm",
|
||||
"rw": "rw",
|
||||
"send receive": "send receive",
|
||||
"send": "send",
|
||||
"w": "w",
|
||||
"wc": "w",
|
||||
"wr": "rw",
|
||||
"wrc": "rw",
|
||||
"wrd": "rw",
|
||||
"write": "write",
|
||||
"x": "rix",
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue