aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app/seal_linux.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-01 23:54:33 +0900
committerOphestra <cat@gensokyo.uk>2025-08-01 23:56:28 +0900
commit3b8a3d3b004695d79745c34821b33cfbe41048a9 (patch)
treebdc3ba42fa32e2d4c2c48305e8f381f40bc4c891 /internal/app/seal_linux.go
parentc5d24979f5d6095116d66beb544aa382816183f9 (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/seal_linux.go')
-rw-r--r--internal/app/seal_linux.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/app/seal_linux.go b/internal/app/seal_linux.go
index cc92db29..b25b5c4f 100644
--- a/internal/app/seal_linux.go
+++ b/internal/app/seal_linux.go
@@ -478,6 +478,9 @@ func (seal *outcome) finalise(ctx context.Context, sys sys.State, config *hst.Co
seal.container.Tmpfs(dest, 1<<13, 0755)
}
+ // mount root read-only as the final setup Op
+ seal.container.Remount("/", syscall.MS_RDONLY)
+
// append ExtraPerms last
for _, p := range config.ExtraPerms {
if p == nil {