apparmor.d/pkg/aa/templates/rule/file.j2

45 lines
1 KiB
Text
Raw Normal View History

{{- /* apparmor.d - Full set of apparmor profiles */ -}}
{{- /* Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io> */ -}}
{{- /* SPDX-License-Identifier: GPL-2.0-only */ -}}
{{- define "file" -}}
{{- template "qualifier" . -}}
{{- if .Owner -}}
{{- "owner " -}}
{{- end -}}
{{- .Padding 2 -}}
{{- .Path -}}
{{- " " -}}
{{- .Padding 3 -}}
{{- range .Access -}}
{{- . -}}
{{- end -}}
{{- with .Target -}}
{{ " -> " }}{{ . }}
{{- end -}}
{{- "," -}}
{{- .Padding 4 -}}
{{- template "comment" . -}}
2024-05-25 22:56:28 +02:00
{{- end -}}
{{- define "link" -}}
{{- template "qualifier" . -}}
{{- if .Owner -}}
{{- "owner " -}}
{{- end -}}
{{- .Padding 2 -}}
2024-05-25 22:56:28 +02:00
{{- "link " -}}
{{- if .Subset -}}
{{- "subset " -}}
{{- end -}}
{{- .Padding 3 -}}
2024-05-25 22:56:28 +02:00
{{- .Path -}}
{{- " " -}}
{{- with .Target -}}
2024-05-25 23:16:31 +02:00
{{ "-> " }}{{ . }}
2024-05-25 22:56:28 +02:00
{{- end -}}
{{- "," -}}
{{- .Padding 4 -}}
2024-05-25 22:56:28 +02:00
{{- template "comment" . -}}
{{- end -}}