mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-31 07:17:22 +01:00
feat(aa-log): correctly handle remount rule from mount log.
This commit is contained in:
parent
06abeac2ee
commit
3d4dd5c91a
2 changed files with 13 additions and 9 deletions
|
@ -91,6 +91,9 @@ func (p *AppArmorProfile) AddRule(log map[string]string) {
|
|||
p.Rules = append(p.Rules, NetworkFromLog(log))
|
||||
}
|
||||
case "mount":
|
||||
if strings.Contains(log["flags"], "remount") {
|
||||
p.Rules = append(p.Rules, RemountFromLog(log))
|
||||
} else {
|
||||
switch log["operation"] {
|
||||
case "mount":
|
||||
p.Rules = append(p.Rules, MountFromLog(log))
|
||||
|
@ -101,6 +104,7 @@ func (p *AppArmorProfile) AddRule(log map[string]string) {
|
|||
case "pivotroot":
|
||||
p.Rules = append(p.Rules, PivotRootFromLog(log))
|
||||
}
|
||||
}
|
||||
case "posix_mqueue", "sysv_mqueue":
|
||||
p.Rules = append(p.Rules, MqueueFromLog(log))
|
||||
case "signal":
|
||||
|
|
|
@ -124,7 +124,7 @@
|
|||
{{- with .Options -}}
|
||||
{{ " options=(" }}{{ join . }}{{ ")" }}
|
||||
{{- end -}}
|
||||
{{- with .Remount -}}
|
||||
{{- with .MountPoint -}}
|
||||
{{ " " }}{{ . }}
|
||||
{{- end -}}
|
||||
{{- "," -}}
|
||||
|
|
Loading…
Reference in a new issue