aboutsummaryrefslogtreecommitdiffhomepage
path: root/helper
diff options
context:
space:
mode:
Diffstat (limited to 'helper')
-rw-r--r--helper/container_test.go4
-rw-r--r--helper/stub.go3
2 files changed, 4 insertions, 3 deletions
diff --git a/helper/container_test.go b/helper/container_test.go
index 4dc88da5..cb145bf8 100644
--- a/helper/container_test.go
+++ b/helper/container_test.go
@@ -9,6 +9,7 @@ import (
"git.gensokyo.uk/security/fortify/helper"
"git.gensokyo.uk/security/fortify/internal"
+ "git.gensokyo.uk/security/fortify/internal/fmsg"
"git.gensokyo.uk/security/fortify/internal/sandbox"
)
@@ -51,5 +52,6 @@ func TestHelperInit(t *testing.T) {
if len(os.Args) != 5 || os.Args[4] != "init" {
return
}
- sandbox.Init(internal.Exit)
+ sandbox.SetOutput(fmsg.Output{})
+ sandbox.Init(fmsg.Prepare, func(bool) { internal.InstallFmsg(false) })
}
diff --git a/helper/stub.go b/helper/stub.go
index 21ab5f45..cfd4a3f0 100644
--- a/helper/stub.go
+++ b/helper/stub.go
@@ -11,7 +11,6 @@ import (
"git.gensokyo.uk/security/fortify/helper/bwrap"
"git.gensokyo.uk/security/fortify/helper/proc"
- "git.gensokyo.uk/security/fortify/internal"
)
// InternalHelperStub is an internal function but exported because it is cross-package;
@@ -36,7 +35,7 @@ func InternalHelperStub() {
genericStub(flagRestoreFiles(3, ap, sp))
}
- internal.Exit(0)
+ os.Exit(0)
}
func newFile(fd int, name, p string) *os.File {