From 3b8a3d3b004695d79745c34821b33cfbe41048a9 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 1 Aug 2025 23:54:33 +0900 Subject: app: remount root readonly This does nothing for security, but should help avoid hiding bugs of programs developed in a hakurei container. Signed-off-by: Ophestra --- internal/app/app_nixos_linux_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'internal/app/app_nixos_linux_test.go') diff --git a/internal/app/app_nixos_linux_test.go b/internal/app/app_nixos_linux_test.go index c1bda924..303d535d 100644 --- a/internal/app/app_nixos_linux_test.go +++ b/internal/app/app_nixos_linux_test.go @@ -1,6 +1,8 @@ package app_test import ( + "syscall" + "hakurei.app/container" "hakurei.app/container/seccomp" "hakurei.app/hst" @@ -141,7 +143,8 @@ var testCasesNixos = []sealTestCase{ Place(hst.Tmp+"/pulse-cookie", nil). Bind("/tmp/hakurei.1971/8e2c76b066dabe574cf073bdb46eb5c1/bus", "/run/user/1971/bus", 0). Bind("/tmp/hakurei.1971/8e2c76b066dabe574cf073bdb46eb5c1/system_bus_socket", "/run/dbus/system_bus_socket", 0). - Tmpfs("/var/run/nscd", 8192, 0755), + Tmpfs("/var/run/nscd", 8192, 0755). + Remount("/", syscall.MS_RDONLY), SeccompPresets: seccomp.PresetExt | seccomp.PresetDenyTTY | seccomp.PresetDenyDevel, HostNet: true, ForwardCancel: true, -- cgit v1.3.1