aboutsummaryrefslogtreecommitdiffhomepage
path: root/helper
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-03-17 00:13:14 +0900
committerOphestra <cat@gensokyo.uk>2025-03-17 00:13:14 +0900
commit44277dc0f1fd1806f5ceea34246a4c805a06b61b (patch)
tree568e10c40ebace8e7fdf39c5afd5625db45e7729 /helper
parentbc54db54d2b33e5ed29667be69d0c07eed9bb007 (diff)
dbus: run in native sandbox
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'helper')
-rw-r--r--helper/stub.go23
1 files changed, 1 insertions, 22 deletions
diff --git a/helper/stub.go b/helper/stub.go
index 942f1501..21ab5f45 100644
--- a/helper/stub.go
+++ b/helper/stub.go
@@ -5,7 +5,6 @@ import (
"fmt"
"io"
"os"
- "path"
"strconv"
"strings"
"syscall"
@@ -137,27 +136,7 @@ func bwrapStub() {
AsInit: true,
}
- efp := new(proc.ExtraFilesPre)
- if t, ok := os.LookupEnv("GO_TEST_FORTIFY_BWRAP_STUB_TYPE"); ok {
- switch t {
- case "dbus":
- sc.Net = false
- sc.Hostname = "fortify-dbus"
- sc.Chdir = "/"
- sc.Syscall = &bwrap.SyscallPolicy{DenyDevel: true, Multiarch: true}
- sc.AsInit = false
- sc.
- Bind("/run/user/1971", "/run/user/1971").
- Bind("/tmp/fortify.1971/12622d846cc3fe7b4c10359d01f0eb47", "/tmp/fortify.1971/12622d846cc3fe7b4c10359d01f0eb47", false, true).
- Bind(path.Dir(os.Args[0]), path.Dir(os.Args[0]))
-
- // manipulate extra files list so fd ends up as 5
- efp.Append()
- efp.Append()
- }
- }
-
- if _, err := MustNewCheckedArgs(sc.Args(nil, efp, new([]proc.File))).
+ if _, err := MustNewCheckedArgs(sc.Args(nil, new(proc.ExtraFilesPre), new([]proc.File))).
WriteTo(want); err != nil {
panic("cannot read want: " + err.Error())
}