aboutsummaryrefslogtreecommitdiffhomepage
path: root/dbus
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-10-15 02:15:55 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-10-15 02:15:55 +0900
commit2faf510146733c28a5dbc3245175700abcf4f966 (patch)
tree707b5fec5d210c19123205969731837b780e318d /dbus
parenta0db19b9ad7def33eacdfc23d462604dce3af3bb (diff)
helper/bwrap: ordered filesystem args
The argument builder was written based on the incorrect assumption that bwrap arguments are unordered. The argument builder is replaced in this commit to correct that mistake. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'dbus')
-rw-r--r--dbus/run.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/dbus/run.go b/dbus/run.go
index 2aad777a..a9b31e50 100644
--- a/dbus/run.go
+++ b/dbus/run.go
@@ -79,11 +79,9 @@ func (p *Proxy) Start(ready chan error, output io.Writer, sandbox bool) error {
}
}
}
- bindTargetDedup := make([][2]string, 0, len(bindTarget))
for k := range bindTarget {
- bindTargetDedup = append(bindTargetDedup, [2]string{k, k})
+ bc.Bind(k, k, false, true)
}
- bc.Bind = append(bc.Bind, bindTargetDedup...)
roBindTarget := make(map[string]struct{}, 2+1+len(proxyDeps))
@@ -103,11 +101,9 @@ func (p *Proxy) Start(ready chan error, output io.Writer, sandbox bool) error {
}
}
- roBindTargetDedup := make([][2]string, 0, len(roBindTarget))
for k := range roBindTarget {
- roBindTargetDedup = append(roBindTargetDedup, [2]string{k, k})
+ bc.Bind(k, k)
}
- bc.ROBind = append(bc.ROBind, roBindTargetDedup...)
h = helper.MustNewBwrap(bc, p.seal, toolPath, argF)
cmd = h.Unwrap()