mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-18 08:58:15 +01:00
feat(aa-log): minor apparmor profile struct tweak.
This commit is contained in:
parent
261778dbb3
commit
f4ba16861f
2 changed files with 14 additions and 14 deletions
|
@ -52,8 +52,8 @@ type Qualifier struct {
|
||||||
// Preamble rules
|
// Preamble rules
|
||||||
|
|
||||||
type Abi struct {
|
type Abi struct {
|
||||||
AbsPath string
|
Path string
|
||||||
MagicPath string
|
IsMagic bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type Alias struct {
|
type Alias struct {
|
||||||
|
@ -63,8 +63,8 @@ type Alias struct {
|
||||||
|
|
||||||
type Include struct {
|
type Include struct {
|
||||||
IfExists bool
|
IfExists bool
|
||||||
AbsPath string
|
Path string
|
||||||
MagicPath string
|
IsMagic bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type Variable struct {
|
type Variable struct {
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
|
|
||||||
{{- if .Abi -}}
|
{{- if .Abi -}}
|
||||||
{{- range .Abi -}}
|
{{- range .Abi -}}
|
||||||
{{- if .AbsPath -}}
|
{{- if .IsMagic -}}
|
||||||
abi "{{ .AbsPath }}",{{ "\n" }}
|
abi <{{ .Path }}>,{{ "\n" }}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
abi <{{ .MagicPath }}>,{{ "\n" }}
|
abi "{{ .Path }}",{{ "\n" }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ "\n" }}
|
{{ "\n" }}
|
||||||
|
@ -26,10 +26,10 @@
|
||||||
{{- if .IfExists -}}
|
{{- if .IfExists -}}
|
||||||
{{- "if exists " -}}
|
{{- "if exists " -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if .AbsPath -}}
|
{{- if .IsMagic -}}
|
||||||
"{{ . }}"{{ "\n" }}
|
<{{ .Path }}>{{ "\n" }}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<{{ .MagicPath }}>{{ "\n" }}
|
"{{ .Path }}"{{ "\n" }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ "\n" }}
|
{{ "\n" }}
|
||||||
|
@ -296,10 +296,10 @@ profile {{ .Name }}{{ " " }}
|
||||||
{{- range .Includes -}}
|
{{- range .Includes -}}
|
||||||
{{- if .IfExists -}}
|
{{- if .IfExists -}}
|
||||||
{{ "include if exists " | indent }}
|
{{ "include if exists " | indent }}
|
||||||
{{- if .AbsPath -}}
|
{{- if .IsMagic -}}
|
||||||
"{{ . }}"{{ "\n" }}
|
<{{ .Path }}>{{ "\n" }}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<{{ .MagicPath }}>{{ "\n" }}
|
"{{ .Path }}"{{ "\n" }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
Loading…
Reference in a new issue