feat(aa): make preamble rule classic aa rules.
This commit is contained in:
parent
068373405f
commit
a5c4eab0cf
8 changed files with 81 additions and 74 deletions
|
|
@ -4,42 +4,7 @@
|
|||
|
||||
{{- define "apparmor" -}}
|
||||
|
||||
{{- with .Comments -}}
|
||||
{{- range . -}}
|
||||
{{- template "comment" . -}}
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Abi -}}
|
||||
{{- range . -}}
|
||||
{{- template "abi" . -}}
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Aliases -}}
|
||||
{{- range . -}}
|
||||
{{- template "alias" . -}}
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Includes -}}
|
||||
{{- range . -}}
|
||||
{{- template "include" . -}}
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- range .Variables -}}
|
||||
{{- template "variable" . -}}
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
{{- template "rules" .Preamble -}}
|
||||
|
||||
{{- range .Profiles -}}
|
||||
{{- template "profile" . -}}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
{{- " optional:" -}}
|
||||
{{- end -}}
|
||||
{{- with .Comment -}}
|
||||
{{ " " }}{{ . }}
|
||||
{{ . }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,11 @@
|
|||
{{- $oldtype := "" -}}
|
||||
{{- range . -}}
|
||||
{{- $type := typeof . -}}
|
||||
{{- if eq $type "RuleBase" -}}
|
||||
{{- if eq $type "" -}}
|
||||
{{- "\n" -}}
|
||||
{{- continue -}}
|
||||
{{- end -}}
|
||||
{{- if eq $type "Comment" -}}
|
||||
{{- template "comment" . -}}
|
||||
{{- "\n" -}}
|
||||
{{- continue -}}
|
||||
|
|
@ -18,10 +22,22 @@
|
|||
{{- end -}}
|
||||
{{- indent "" -}}
|
||||
|
||||
{{- if eq $type "Abi" -}}
|
||||
{{- template "abi" . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq $type "Alias" -}}
|
||||
{{- template "alias" . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq $type "Include" -}}
|
||||
{{- template "include" . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq $type "Variable" -}}
|
||||
{{- template "variable" . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq $type "All" -}}
|
||||
{{- template "all" . -}}
|
||||
{{- end -}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue