aboutsummaryrefslogtreecommitdiffhomepage
path: root/sandbox
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-04-07 04:07:20 +0900
committerOphestra <cat@gensokyo.uk>2025-04-07 04:07:20 +0900
commitf885dede9b10c06004be0eac19d80b7bc718100a (patch)
tree3c3c625be4ae4cfd4de8d07e6aecf43a06f6be8f /sandbox
parente9a7cd526f4e5f0a8f7b18ad3682d2e3afbcb8ba (diff)
sandbox/seccomp: unexport println wrapper
This is an implementation detail that was exported for the bwrap argument builder. The removal of that package allows it to be unexported. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/seccomp/output.go4
-rw-r--r--sandbox/seccomp/seccomp-build.c2
-rw-r--r--sandbox/seccomp/seccomp-build.h2
-rw-r--r--sandbox/seccomp/seccomp.go1
4 files changed, 5 insertions, 4 deletions
diff --git a/sandbox/seccomp/output.go b/sandbox/seccomp/output.go
index d583c9ee..db81feb9 100644
--- a/sandbox/seccomp/output.go
+++ b/sandbox/seccomp/output.go
@@ -22,8 +22,8 @@ func GetOutput() func(v ...any) {
}
}
-//export F_println
-func F_println(v *C.char) {
+//export f_println
+func f_println(v *C.char) {
if fp := printlnP.Load(); fp != nil {
(*fp)(C.GoString(v))
}
diff --git a/sandbox/seccomp/seccomp-build.c b/sandbox/seccomp/seccomp-build.c
index 4b2114f4..9423e78f 100644
--- a/sandbox/seccomp/seccomp-build.c
+++ b/sandbox/seccomp/seccomp-build.c
@@ -28,7 +28,7 @@ struct f_syscall_act {
#define LEN(arr) (sizeof(arr) / sizeof((arr)[0]))
#define SECCOMP_RULESET_ADD(ruleset) do { \
- if (opts & F_VERBOSE) F_println("adding seccomp ruleset \"" #ruleset "\""); \
+ if (opts & F_VERBOSE) f_println("adding seccomp ruleset \"" #ruleset "\""); \
for (int i = 0; i < LEN(ruleset); i++) { \
assert(ruleset[i].m_errno == EPERM || ruleset[i].m_errno == ENOSYS); \
\
diff --git a/sandbox/seccomp/seccomp-build.h b/sandbox/seccomp/seccomp-build.h
index 7f1be761..d6e53fbd 100644
--- a/sandbox/seccomp/seccomp-build.h
+++ b/sandbox/seccomp/seccomp-build.h
@@ -19,5 +19,5 @@ typedef enum {
F_BLUETOOTH = 1 << 8,
} f_syscall_opts;
-extern void F_println(char *v);
+extern void f_println(char *v);
int32_t f_build_filter(int *ret_p, int fd, uint32_t arch, uint32_t multiarch, f_syscall_opts opts); \ No newline at end of file
diff --git a/sandbox/seccomp/seccomp.go b/sandbox/seccomp/seccomp.go
index 9bc74d36..228c6834 100644
--- a/sandbox/seccomp/seccomp.go
+++ b/sandbox/seccomp/seccomp.go
@@ -7,6 +7,7 @@ package seccomp
#include "seccomp-build.h"
*/
import "C"
+
import (
"errors"
"fmt"