From 3ce63e95d7691450f7b368e639d984a223a764b1 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 7 Oct 2025 18:28:20 +0900 Subject: container: move seccomp preset bits This allows holding the bits without cgo. Signed-off-by: Ophestra --- container/container.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'container/container.go') diff --git a/container/container.go b/container/container.go index c19c2e7f..e54afb99 100644 --- a/container/container.go +++ b/container/container.go @@ -14,6 +14,7 @@ import ( . "syscall" "time" + "hakurei.app/container/bits" "hakurei.app/container/seccomp" ) @@ -82,7 +83,7 @@ type ( // Extra seccomp flags. SeccompFlags seccomp.ExportFlag // Seccomp presets. Has no effect unless SeccompRules is zero-length. - SeccompPresets seccomp.FilterPreset + SeccompPresets bits.FilterPreset // Do not load seccomp program. SeccompDisable bool @@ -170,7 +171,7 @@ func (p *Container) Start() error { } if !p.RetainSession { - p.SeccompPresets |= seccomp.PresetDenyTTY + p.SeccompPresets |= bits.PresetDenyTTY } if p.AdoptWaitDelay == 0 { -- cgit v1.3.1