[PATCH v3 3/5] host/rootfs: Unshare a few more namespaces in virtiofsd

Demi Marie Obenour
2025-12-03T15:55:59Z

It doesn't need to share IPC, UTS, or cgroup namespaces.

Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
---
.../service/vm-services/template/data/service/vhost-user-fs/run | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/run b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/run
index bfe66f4607ab07884488df35691ba1c202b26e8e..6bd69ad944a464294ad9a3268c8a63482c7e8040 100755
--- a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/run
+++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/run
@@ -13,6 +13,6 @@ export TMPDIR /run
importas -i VM VM

nsenter --mount=${VM}/mount
-unshare -U --map-user 1000 --map-group 1000
+unshare -U --map-user 1000 --map-group 1000 --uts --ipc --cgroup

virtiofsd --fd 3 --shared-dir ${VM}/fs

--
2.52.0