Skip to content

Commit

Permalink
Merge pull request #12687 from simondeziel/qemu-aa-profile
Browse files Browse the repository at this point in the history
Tighten up QEMU Apparmor profile
  • Loading branch information
tomponline authored Jan 18, 2024
2 parents 431ad46 + ce24649 commit 35a988f
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions lxd/apparmor/instance_qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ profile "{{ .name }}" flags=(attach_disconnected,mediate_deleted) {
/sys/devices/** r,
/sys/module/vhost/** r,
/tmp/lxd_sev_* r,
/{,usr/}bin/qemu* mrix,
/{,usr/}bin/qemu-system-* mrix,
{{ .ovmfPath }}/OVMF_CODE.fd kr,
{{ .ovmfPath }}/OVMF_CODE.*.fd kr,
/usr/share/qemu/** kr,
Expand All @@ -50,14 +50,9 @@ profile "{{ .name }}" flags=(attach_disconnected,mediate_deleted) {
{{ .rootPath }}/etc/group r,
@{PROC}/version r,
# Used by qemu for live migration NBD server and client
# Used by qemu for live migration NBD server and client or when in a container
unix (bind, listen, accept, send, receive, connect) type=stream,
# Used by qemu when inside a container
{{- if .userns }}
unix (send, receive) type=stream,
{{- end }}
# Instance specific paths
{{ .logPath }}/** rwk,
{{ .path }}/** rwk,
Expand All @@ -77,7 +72,7 @@ profile "{{ .name }}" flags=(attach_disconnected,mediate_deleted) {
# The binary itself (for nesting)
/var/snap/lxd/common/lxd.debug mr,
/snap/lxd/*/bin/lxd mr,
/snap/lxd/*/bin/qemu* mrix,
/snap/lxd/*/bin/qemu-system-* mrix,
/snap/lxd/*/share/qemu/** kr,
# Snap-specific paths
Expand Down

0 comments on commit 35a988f

Please sign in to comment.