mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-30 14:55:15 +01:00
feat(aa): add some missing rule template.
This commit is contained in:
parent
978daa446b
commit
068373405f
4 changed files with 36 additions and 2 deletions
|
@ -53,7 +53,9 @@ var (
|
||||||
// The order the apparmor rules should be sorted
|
// The order the apparmor rules should be sorted
|
||||||
ruleAlphabet = []string{
|
ruleAlphabet = []string{
|
||||||
"include",
|
"include",
|
||||||
|
"all",
|
||||||
"rlimit",
|
"rlimit",
|
||||||
|
"userns",
|
||||||
"capability",
|
"capability",
|
||||||
"network",
|
"network",
|
||||||
"mount",
|
"mount",
|
||||||
|
@ -62,11 +64,10 @@ var (
|
||||||
"pivotroot",
|
"pivotroot",
|
||||||
"changeprofile",
|
"changeprofile",
|
||||||
"mqueue",
|
"mqueue",
|
||||||
|
"iouring",
|
||||||
"signal",
|
"signal",
|
||||||
"ptrace",
|
"ptrace",
|
||||||
"unix",
|
"unix",
|
||||||
"userns",
|
|
||||||
"iouring",
|
|
||||||
"dbus",
|
"dbus",
|
||||||
"file",
|
"file",
|
||||||
"profile",
|
"profile",
|
||||||
|
|
9
pkg/aa/templates/rule/all.j2
Normal file
9
pkg/aa/templates/rule/all.j2
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{{- /* apparmor.d - Full set of apparmor profiles */ -}}
|
||||||
|
{{- /* Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io> */ -}}
|
||||||
|
{{- /* SPDX-License-Identifier: GPL-2.0-only */ -}}
|
||||||
|
|
||||||
|
{{- define "all" -}}
|
||||||
|
{{- "all" -}}
|
||||||
|
{{- "," -}}
|
||||||
|
{{- template "comment" . -}}
|
||||||
|
{{- end -}}
|
16
pkg/aa/templates/rule/io_uring.j2
Normal file
16
pkg/aa/templates/rule/io_uring.j2
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{{- /* apparmor.d - Full set of apparmor profiles */ -}}
|
||||||
|
{{- /* Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io> */ -}}
|
||||||
|
{{- /* SPDX-License-Identifier: GPL-2.0-only */ -}}
|
||||||
|
|
||||||
|
{{- define "io_uring" -}}
|
||||||
|
{{- template "qualifier" . -}}
|
||||||
|
{{- "io_uring" -}}
|
||||||
|
{{- range .Access -}}
|
||||||
|
{{ " " }}{{ . }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- with .Label -}}
|
||||||
|
{{ " label=" }}{{ . }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- "," -}}
|
||||||
|
{{- template "comment" . -}}
|
||||||
|
{{- end -}}
|
|
@ -22,6 +22,10 @@
|
||||||
{{- template "include" . -}}
|
{{- template "include" . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if eq $type "All" -}}
|
||||||
|
{{- template "all" . -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{- if eq $type "Rlimit" -}}
|
{{- if eq $type "Rlimit" -}}
|
||||||
{{- template "rlimit" . -}}
|
{{- template "rlimit" . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@ -62,6 +66,10 @@
|
||||||
{{- template "mqueue" . -}}
|
{{- template "mqueue" . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if eq $type "IOUring" -}}
|
||||||
|
{{- template "io_uring" . -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{- if eq $type "Unix" -}}
|
{{- if eq $type "Unix" -}}
|
||||||
{{- template "unix" . -}}
|
{{- template "unix" . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
Loading…
Reference in a new issue