diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-08-01 23:54:33 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-08-01 23:56:28 +0900 |
| commit | 3b8a3d3b004695d79745c34821b33cfbe41048a9 (patch) | |
| tree | bdc3ba42fa32e2d4c2c48305e8f381f40bc4c891 /internal/app/app_nixos_linux_test.go | |
| parent | c5d24979f5d6095116d66beb544aa382816183f9 (diff) | |
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 <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/app_nixos_linux_test.go')
| -rw-r--r-- | internal/app/app_nixos_linux_test.go | 5 |
1 files changed, 4 insertions, 1 deletions
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, |
