aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/dispatcher.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-03-17 15:48:40 +0900
committerOphestra <cat@gensokyo.uk>2026-03-17 15:48:40 +0900
commitb852402f67b22a3a850ce4eb1305a3ce5898d128 (patch)
tree76ca77ab869198d5327e9557d8db897c0d6ec356 /container/dispatcher.go
parent6d015a949e27f20c86409c7d78053f0b0493f165 (diff)
ext: move syscall wrappers from container
These are generally useful, and none of them are container-specific. Syscalls subtle to use and requiring container-specific setup remains in container. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/dispatcher.go')
-rw-r--r--container/dispatcher.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/container/dispatcher.go b/container/dispatcher.go
index 710e4392..dce5f023 100644
--- a/container/dispatcher.go
+++ b/container/dispatcher.go
@@ -13,6 +13,7 @@ import (
"hakurei.app/container/seccomp"
"hakurei.app/container/std"
+ "hakurei.app/ext"
"hakurei.app/internal/netlink"
"hakurei.app/message"
)
@@ -143,8 +144,8 @@ func (k direct) new(f func(k syscallDispatcher)) { go f(k) }
func (direct) lockOSThread() { runtime.LockOSThread() }
-func (direct) setPtracer(pid uintptr) error { return SetPtracer(pid) }
-func (direct) setDumpable(dumpable uintptr) error { return SetDumpable(dumpable) }
+func (direct) setPtracer(pid uintptr) error { return ext.SetPtracer(pid) }
+func (direct) setDumpable(dumpable uintptr) error { return ext.SetDumpable(dumpable) }
func (direct) setNoNewPrivs() error { return SetNoNewPrivs() }
func (direct) lastcap(msg message.Msg) uintptr { return LastCap(msg) }
@@ -152,7 +153,7 @@ func (direct) capset(hdrp *capHeader, datap *[2]capData) error { return capset(h
func (direct) capBoundingSetDrop(cap uintptr) error { return capBoundingSetDrop(cap) }
func (direct) capAmbientClearAll() error { return capAmbientClearAll() }
func (direct) capAmbientRaise(cap uintptr) error { return capAmbientRaise(cap) }
-func (direct) isatty(fd int) bool { return Isatty(fd) }
+func (direct) isatty(fd int) bool { return ext.Isatty(fd) }
func (direct) receive(key string, e any, fdp *uintptr) (func() error, error) {
return Receive(key, e, fdp)
}