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
|
||||
|
||||
type Abi struct {
|
||||
AbsPath string
|
||||
MagicPath string
|
||||
Path string
|
||||
IsMagic bool
|
||||
}
|
||||
|
||||
type Alias struct {
|
||||
|
@ -62,9 +62,9 @@ type Alias struct {
|
|||
}
|
||||
|
||||
type Include struct {
|
||||
IfExists bool
|
||||
AbsPath string
|
||||
MagicPath string
|
||||
IfExists bool
|
||||
Path string
|
||||
IsMagic bool
|
||||
}
|
||||
|
||||
type Variable struct {
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
{{- if .Abi -}}
|
||||
{{- range .Abi -}}
|
||||
{{- if .AbsPath -}}
|
||||
abi "{{ .AbsPath }}",{{ "\n" }}
|
||||
{{- if .IsMagic -}}
|
||||
abi <{{ .Path }}>,{{ "\n" }}
|
||||
{{- else -}}
|
||||
abi <{{ .MagicPath }}>,{{ "\n" }}
|
||||
abi "{{ .Path }}",{{ "\n" }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{ "\n" }}
|
||||
|
@ -26,10 +26,10 @@
|
|||
{{- if .IfExists -}}
|
||||
{{- "if exists " -}}
|
||||
{{- end -}}
|
||||
{{- if .AbsPath -}}
|
||||
"{{ . }}"{{ "\n" }}
|
||||
{{- if .IsMagic -}}
|
||||
<{{ .Path }}>{{ "\n" }}
|
||||
{{- else -}}
|
||||
<{{ .MagicPath }}>{{ "\n" }}
|
||||
"{{ .Path }}"{{ "\n" }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{ "\n" }}
|
||||
|
@ -296,10 +296,10 @@ profile {{ .Name }}{{ " " }}
|
|||
{{- range .Includes -}}
|
||||
{{- if .IfExists -}}
|
||||
{{ "include if exists " | indent }}
|
||||
{{- if .AbsPath -}}
|
||||
"{{ . }}"{{ "\n" }}
|
||||
{{- if .IsMagic -}}
|
||||
<{{ .Path }}>{{ "\n" }}
|
||||
{{- else -}}
|
||||
<{{ .MagicPath }}>{{ "\n" }}
|
||||
"{{ .Path }}"{{ "\n" }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Reference in a new issue