fix: small fix & cleaning.

This commit is contained in:
Alexandre Pujol 2024-10-12 20:11:45 +01:00
parent 273485217c
commit 3ef6c44038
Failed to generate hash of commit
3 changed files with 12 additions and 10 deletions

View file

@ -135,7 +135,7 @@ func aaFormat(files paths.PathList) error {
if !file.Exist() {
return nil
}
profile, err := util.ReadFile(file)
profile, err := file.ReadFileAsString()
if err != nil {
return err
}

View file

@ -16,6 +16,15 @@ const (
func init() {
requirements[MOUNT] = requirement{
"flags_bind": {
"B", "bind", "R", "rbind",
},
"flags_change": {
"remount", "unbindable", "shared", "private", "slave", "runbindable",
"rshared", "rprivate", "rslave", "make-unbindable", "make-shared",
"make-private", "make-slave", "make-runbindable", "make-rshared",
"make-rprivate", "make-rslave",
},
"flags": {
"ro", "rw", "acl", "async", "atime", "bind", "dev", "diratime",
"dirsync", "exec", "iversion", "loud", "mand", "move", "noacl",

View file

@ -35,17 +35,10 @@ var (
// The apparmor templates
tmpl = generateTemplates([]Kind{
// Global templates
"apparmor",
PROFILE,
HAT,
"rules",
"apparmor", PROFILE, HAT, "rules",
// Preamble templates
ABI,
ALIAS,
INCLUDE,
VARIABLE,
COMMENT,
ABI, ALIAS, INCLUDE, VARIABLE, COMMENT,
// Rules templates
ALL, RLIMIT, USERNS, CAPABILITY, NETWORK,