[lxc-devel] [lxd/master] lxd/apparmor/qemu: Allow some more files
stgraber on Github
lxc-bot at linuxcontainers.org
Fri Dec 4 13:51:28 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 497 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201204/83330843/attachment.bin>
-------------- next part --------------
From 53127c9b827cac52cc235d3f6b61348ad91f5761 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Fri, 4 Dec 2020 08:44:37 -0500
Subject: [PATCH] lxd/apparmor/qemu: Allow some more files
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This allows NSS related files:
- nsswitch.conf
- passwd
- group
As well as /proc/version which QEMU apparently accesses sometimes.
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
lxd/apparmor/instance_qemu.go | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lxd/apparmor/instance_qemu.go b/lxd/apparmor/instance_qemu.go
index a1183e27e4..4f7e7104f0 100644
--- a/lxd/apparmor/instance_qemu.go
+++ b/lxd/apparmor/instance_qemu.go
@@ -40,6 +40,10 @@ profile "{{ .name }}" flags=(attach_disconnected,mediate_deleted) {
/usr/share/qemu/** kr,
/usr/share/seabios/** kr,
owner @{PROC}/@{pid}/task/@{tid}/comm rw,
+ {{ .rootPath }}/etc/nsswitch.conf r,
+ {{ .rootPath }}/etc/passwd r,
+ {{ .rootPath }}/etc/group r,
+ @{PROC}/version r,
# Instance specific paths
{{ .logPath }}/** rwk,
More information about the lxc-devel
mailing list