aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd
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 /cmd
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 'cmd')
-rw-r--r--cmd/hakurei/main.go5
-rw-r--r--cmd/mbf/main.go3
2 files changed, 5 insertions, 3 deletions
diff --git a/cmd/hakurei/main.go b/cmd/hakurei/main.go
index 169ac6c0..b7722bc3 100644
--- a/cmd/hakurei/main.go
+++ b/cmd/hakurei/main.go
@@ -13,6 +13,7 @@ import (
"syscall"
"hakurei.app/container"
+ "hakurei.app/ext"
"hakurei.app/message"
)
@@ -35,8 +36,8 @@ func main() {
msg := message.New(log.Default())
early := earlyHardeningErrs{
- yamaLSM: container.SetPtracer(0),
- dumpable: container.SetDumpable(container.SUID_DUMP_DISABLE),
+ yamaLSM: ext.SetPtracer(0),
+ dumpable: ext.SetDumpable(ext.SUID_DUMP_DISABLE),
}
if os.Geteuid() == 0 {
diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go
index 3dc1f06e..484423da 100644
--- a/cmd/mbf/main.go
+++ b/cmd/mbf/main.go
@@ -24,6 +24,7 @@ import (
"hakurei.app/container/fhs"
"hakurei.app/container/seccomp"
"hakurei.app/container/std"
+ "hakurei.app/ext"
"hakurei.app/internal/pkg"
"hakurei.app/internal/rosa"
"hakurei.app/message"
@@ -271,7 +272,7 @@ func main() {
return errors.New("report requires 1 argument")
}
- if container.Isatty(int(w.Fd())) {
+ if ext.Isatty(int(w.Fd())) {
return errors.New("output appears to be a terminal")
}
return rosa.WriteReport(msg, w, cache)