aboutsummaryrefslogtreecommitdiffhomepage
path: root/sandbox/seccomp/libseccomp.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-07-02 00:00:08 +0900
committerOphestra <cat@gensokyo.uk>2025-07-02 00:00:08 +0900
commit0c5409aec7455cbe9e34b0e4d2f0edf0bc3c6e37 (patch)
tree92254151203a7752d51e9a8849f0352a1c637c16 /sandbox/seccomp/libseccomp.go
parent1a8840bebc673672235b6e10b1b9386f24751757 (diff)
sandbox/seccomp: native rule type alias
This makes it easier to keep API stable. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'sandbox/seccomp/libseccomp.go')
-rw-r--r--sandbox/seccomp/libseccomp.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/sandbox/seccomp/libseccomp.go b/sandbox/seccomp/libseccomp.go
index 58ae8599..28a9628b 100644
--- a/sandbox/seccomp/libseccomp.go
+++ b/sandbox/seccomp/libseccomp.go
@@ -49,12 +49,17 @@ func (e *LibraryError) Is(err error) bool {
(e.Errno != nil && errors.Is(err, e.Errno))
}
+type (
+ ScmpSyscall = C.int
+ ScmpErrno = C.int
+)
+
// A NativeRule specifies an arch-specific action taken by seccomp under certain conditions.
type NativeRule struct {
// Syscall is the arch-dependent syscall number to act against.
- Syscall C.int
+ Syscall ScmpSyscall
// Errno is the errno value to return when the condition is satisfied.
- Errno C.int
+ Errno ScmpErrno
// Arg is the optional struct scmp_arg_cmp passed to libseccomp.
Arg *ScmpArgCmp
}