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
|
||||
ruleAlphabet = []string{
|
||||
"include",
|
||||
"all",
|
||||
"rlimit",
|
||||
"userns",
|
||||
"capability",
|
||||
"network",
|
||||
"mount",
|
||||
|
@ -62,11 +64,10 @@ var (
|
|||
"pivotroot",
|
||||
"changeprofile",
|
||||
"mqueue",
|
||||
"iouring",
|
||||
"signal",
|
||||
"ptrace",
|
||||
"unix",
|
||||
"userns",
|
||||
"iouring",
|
||||
"dbus",
|
||||
"file",
|
||||
"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" . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq $type "All" -}}
|
||||
{{- template "all" . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq $type "Rlimit" -}}
|
||||
{{- template "rlimit" . -}}
|
||||
{{- end -}}
|
||||
|
@ -62,6 +66,10 @@
|
|||
{{- template "mqueue" . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq $type "IOUring" -}}
|
||||
{{- template "io_uring" . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq $type "Unix" -}}
|
||||
{{- template "unix" . -}}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Reference in a new issue