mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-12-25 14:36:33 +01:00
fix: small fix & cleaning.
This commit is contained in:
parent
273485217c
commit
3ef6c44038
3 changed files with 12 additions and 10 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue