forked from security/hakurei
system/dbus/proc: host abstract only when not binding
The test failure seems to be caused by an unrelated bug in xdg-dbus-proxy. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -64,10 +64,6 @@ func (p *Proxy) Start() error {
|
|||||||
argF, func(z *container.Container) {
|
argF, func(z *container.Container) {
|
||||||
z.SeccompFlags |= seccomp.AllowMultiarch
|
z.SeccompFlags |= seccomp.AllowMultiarch
|
||||||
z.SeccompPresets |= seccomp.PresetStrict
|
z.SeccompPresets |= seccomp.PresetStrict
|
||||||
|
|
||||||
// xdg-dbus-proxy fails with scoped abstract unix sockets despite pathname socket being available
|
|
||||||
z.HostAbstract = true
|
|
||||||
|
|
||||||
z.Hostname = "hakurei-dbus"
|
z.Hostname = "hakurei-dbus"
|
||||||
if p.output != nil {
|
if p.output != nil {
|
||||||
z.Stdout, z.Stderr = p.output, p.output
|
z.Stdout, z.Stderr = p.output, p.output
|
||||||
@@ -102,6 +98,9 @@ func (p *Proxy) Start() error {
|
|||||||
for _, name := range upstreamPaths {
|
for _, name := range upstreamPaths {
|
||||||
z.Bind(name, name, 0)
|
z.Bind(name, name, 0)
|
||||||
}
|
}
|
||||||
|
if len(upstreamPaths) == 0 {
|
||||||
|
z.HostAbstract = true
|
||||||
|
}
|
||||||
|
|
||||||
// parent directories of bind paths
|
// parent directories of bind paths
|
||||||
sockDirPaths := make([]*container.Absolute, 0, 2)
|
sockDirPaths := make([]*container.Absolute, 0, 2)
|
||||||
|
|||||||
Reference in New Issue
Block a user