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 --- internal/app/spcontainer.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'internal/app/spcontainer.go') diff --git a/internal/app/spcontainer.go b/internal/app/spcontainer.go index 4381fd72..ffbee7db 100644 --- a/internal/app/spcontainer.go +++ b/internal/app/spcontainer.go @@ -8,6 +8,7 @@ import ( "syscall" "hakurei.app/container" + "hakurei.app/container/bits" "hakurei.app/container/seccomp" "hakurei.app/hst" "hakurei.app/system/dbus" @@ -64,16 +65,16 @@ func (s *spParamsOp) toContainer(state *outcomeStateParams) error { } if !state.Container.SeccompCompat { - state.params.SeccompPresets |= seccomp.PresetExt + state.params.SeccompPresets |= bits.PresetExt } if !state.Container.Devel { - state.params.SeccompPresets |= seccomp.PresetDenyDevel + state.params.SeccompPresets |= bits.PresetDenyDevel } if !state.Container.Userns { - state.params.SeccompPresets |= seccomp.PresetDenyNS + state.params.SeccompPresets |= bits.PresetDenyNS } if !state.Container.Tty { - state.params.SeccompPresets |= seccomp.PresetDenyTTY + state.params.SeccompPresets |= bits.PresetDenyTTY } if state.Container.MapRealUID { -- cgit v1.3.1