diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-07-01 20:23:33 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-07-01 22:11:32 +0900 |
| commit | 1a8840bebc673672235b6e10b1b9386f24751757 (patch) | |
| tree | d1e6772bfd685e2162d047e3640bd3ee55c1a1f7 /sandbox/seccomp/output.go | |
| parent | 1fb453dffe4c83866fedfa4590be30ec65e815ff (diff) | |
sandbox/seccomp: resolve rules natively
This enables loading syscall filter policies from external cross-platform config files.
This also removes a significant amount of C code.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'sandbox/seccomp/output.go')
| -rw-r--r-- | sandbox/seccomp/output.go | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/sandbox/seccomp/output.go b/sandbox/seccomp/output.go deleted file mode 100644 index 27d50983..00000000 --- a/sandbox/seccomp/output.go +++ /dev/null @@ -1,30 +0,0 @@ -package seccomp - -import "C" -import "sync/atomic" - -var printlnP atomic.Pointer[func(v ...any)] - -func SetOutput(f func(v ...any)) { - if f == nil { - // avoid storing nil function - printlnP.Store(nil) - } else { - printlnP.Store(&f) - } -} - -func GetOutput() func(v ...any) { - if fp := printlnP.Load(); fp == nil { - return nil - } else { - return *fp - } -} - -//export hakurei_println -func hakurei_println(v *C.char) { - if fp := printlnP.Load(); fp != nil { - (*fp)(C.GoString(v)) - } -} |
