feat(aa-log): minor apparmor profile struct tweak.

This commit is contained in:
Alexandre Pujol 2023-08-22 22:58:35 +01:00
parent 261778dbb3
commit f4ba16861f
Failed to generate hash of commit
2 changed files with 14 additions and 14 deletions

View file

@ -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 {

View file

@ -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 -}}