sandbox/seccomp: native rule slice in helpers

These helper functions took FilterPreset as input for ease of integration. This moves them to []NativeRule.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-07-02 00:22:27 +09:00
parent 0c5409aec7
commit d5532aade0
6 changed files with 27 additions and 27 deletions

View File

@@ -237,7 +237,7 @@ func Init(prepare func(prefix string), setVerbose func(verbose bool)) {
log.Fatalf("cannot capset: %v", err)
}
if err := seccomp.Load(params.Flags.seccomp(params.SeccompPresets), params.SeccompFlags); err != nil {
if err := seccomp.Load(seccomp.Preset(params.Flags.seccomp(params.SeccompPresets), params.SeccompFlags), params.SeccompFlags); err != nil {
log.Fatalf("cannot load syscall filter: %v", err)
}