From 1ba1cb886584966b4e6e65284a04dfaf8962ed65 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 29 Sep 2025 07:07:16 +0900 Subject: hst/config: remove seccomp bit fields These serve little purpose and are not friendly for use from other languages. Signed-off-by: Ophestra --- hst/config.go | 5 ----- hst/hst.go | 25 +++++++++++-------------- hst/hst_test.go | 2 -- 3 files changed, 11 insertions(+), 21 deletions(-) (limited to 'hst') diff --git a/hst/config.go b/hst/config.go index bd8f637b..3aa71aa4 100644 --- a/hst/config.go +++ b/hst/config.go @@ -4,7 +4,6 @@ import ( "time" "hakurei.app/container" - "hakurei.app/container/seccomp" "hakurei.app/system/dbus" ) @@ -66,10 +65,6 @@ type ( // a negative value causes the container to be terminated immediately on cancellation WaitDelay time.Duration `json:"wait_delay,omitempty"` - // extra seccomp flags - SeccompFlags seccomp.ExportFlag `json:"seccomp_flags"` - // extra seccomp presets - SeccompPresets seccomp.FilterPreset `json:"seccomp_presets"` // disable project-specific filter extensions SeccompCompat bool `json:"seccomp_compat,omitempty"` // allow ptrace and friends diff --git a/hst/hst.go b/hst/hst.go index 5399cba0..8a72b509 100644 --- a/hst/hst.go +++ b/hst/hst.go @@ -7,7 +7,6 @@ import ( "os" "hakurei.app/container" - "hakurei.app/container/seccomp" "hakurei.app/system/dbus" ) @@ -106,19 +105,17 @@ func Template() *Config { Groups: []string{"video", "dialout", "plugdev"}, Container: &ContainerConfig{ - Hostname: "localhost", - Devel: true, - Userns: true, - HostNet: true, - HostAbstract: true, - Device: true, - WaitDelay: -1, - SeccompFlags: seccomp.AllowMultiarch, - SeccompPresets: seccomp.PresetExt, - SeccompCompat: true, - Tty: true, - Multiarch: true, - MapRealUID: true, + Hostname: "localhost", + Devel: true, + Userns: true, + HostNet: true, + HostAbstract: true, + Device: true, + WaitDelay: -1, + SeccompCompat: true, + Tty: true, + Multiarch: true, + MapRealUID: true, // example API credentials pulled from Google Chrome // DO NOT USE THESE IN A REAL BROWSER Env: map[string]string{ diff --git a/hst/hst_test.go b/hst/hst_test.go index 70f7e531..0c25fa7c 100644 --- a/hst/hst_test.go +++ b/hst/hst_test.go @@ -166,8 +166,6 @@ func TestTemplate(t *testing.T) { "container": { "hostname": "localhost", "wait_delay": -1, - "seccomp_flags": 1, - "seccomp_presets": 1, "seccomp_compat": true, "devel": true, "userns": true, -- cgit v1.3.1