sandbox/seccomp: prepare -> export
All checks were successful
Test / Create distribution (push) Successful in 32s
Test / Sandbox (push) Successful in 1m51s
Test / Sandbox (race detector) (push) Successful in 3m3s
Test / Planterette (push) Successful in 3m37s
Test / Hakurei (race detector) (push) Successful in 4m17s
Test / Hakurei (push) Successful in 2m12s
Test / Flake checks (push) Successful in 1m12s

Export makes a lot more sense, and also matches the libseccomp function.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-07-02 00:32:48 +09:00
parent d5532aade0
commit 26b7afc890
9 changed files with 34 additions and 34 deletions

View File

@@ -9,7 +9,7 @@ import (
type exporter struct {
rules []NativeRule
flags PrepareFlag
flags ExportFlag
r, w *os.File
prepareOnce sync.Once
@@ -30,7 +30,7 @@ func (e *exporter) prepare() error {
ec := make(chan error, 1)
go func(fd uintptr) {
ec <- Prepare(int(fd), e.rules, e.flags)
ec <- Export(int(fd), e.rules, e.flags)
close(ec)
_ = e.closeWrite()
runtime.KeepAlive(e.w)
@@ -55,6 +55,6 @@ func (e *exporter) closeWrite() error {
return e.closeErr
}
func newExporter(rules []NativeRule, flags PrepareFlag) *exporter {
func newExporter(rules []NativeRule, flags ExportFlag) *exporter {
return &exporter{rules: rules, flags: flags}
}