Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
92f510a647 | |||
acb6931f3e |
@ -162,8 +162,12 @@ func buildCommand(out io.Writer) command.Command {
|
|||||||
|
|
||||||
// override log from configuration
|
// override log from configuration
|
||||||
if dbusVerbose {
|
if dbusVerbose {
|
||||||
config.SessionBus.Log = true
|
if config.SessionBus != nil {
|
||||||
config.SystemBus.Log = true
|
config.SessionBus.Log = true
|
||||||
|
}
|
||||||
|
if config.SystemBus != nil {
|
||||||
|
config.SystemBus.Log = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,7 +418,9 @@ func (seal *outcome) finalise(ctx context.Context, sys sys.State, config *hst.Co
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
seal.sys.UpdatePermType(system.EX11, socketPath.String(), acl.Read, acl.Write, acl.Execute)
|
seal.sys.UpdatePermType(system.EX11, socketPath.String(), acl.Read, acl.Write, acl.Execute)
|
||||||
d = "unix:" + socketPath.String()
|
if !config.Container.HostAbstract {
|
||||||
|
d = "unix:" + socketPath.String()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ let
|
|||||||
mapRealUid
|
mapRealUid
|
||||||
useCommonPaths
|
useCommonPaths
|
||||||
userns
|
userns
|
||||||
|
hostAbstract
|
||||||
;
|
;
|
||||||
enablements = {
|
enablements = {
|
||||||
inherit (tc) x11;
|
inherit (tc) x11;
|
||||||
|
@ -26,6 +26,7 @@ in
|
|||||||
useCommonPaths = true;
|
useCommonPaths = true;
|
||||||
userns = false;
|
userns = false;
|
||||||
x11 = true;
|
x11 = true;
|
||||||
|
hostAbstract = false;
|
||||||
|
|
||||||
# 0, PresetStrict
|
# 0, PresetStrict
|
||||||
expectedFilter = {
|
expectedFilter = {
|
||||||
|
@ -35,6 +35,7 @@ in
|
|||||||
useCommonPaths = true;
|
useCommonPaths = true;
|
||||||
userns = false;
|
userns = false;
|
||||||
x11 = false;
|
x11 = false;
|
||||||
|
hostAbstract = false;
|
||||||
|
|
||||||
# 0, PresetStrict
|
# 0, PresetStrict
|
||||||
expectedFilter = {
|
expectedFilter = {
|
||||||
|
@ -35,6 +35,7 @@ in
|
|||||||
useCommonPaths = false;
|
useCommonPaths = false;
|
||||||
userns = true;
|
userns = true;
|
||||||
x11 = false;
|
x11 = false;
|
||||||
|
hostAbstract = false;
|
||||||
|
|
||||||
# 0, PresetExt | PresetDenyDevel
|
# 0, PresetExt | PresetDenyDevel
|
||||||
expectedFilter = {
|
expectedFilter = {
|
||||||
|
@ -35,6 +35,7 @@ in
|
|||||||
useCommonPaths = false;
|
useCommonPaths = false;
|
||||||
userns = false;
|
userns = false;
|
||||||
x11 = false;
|
x11 = false;
|
||||||
|
hostAbstract = false;
|
||||||
|
|
||||||
# 0, PresetStrict
|
# 0, PresetStrict
|
||||||
expectedFilter = {
|
expectedFilter = {
|
||||||
|
@ -35,6 +35,7 @@ in
|
|||||||
useCommonPaths = true;
|
useCommonPaths = true;
|
||||||
userns = false;
|
userns = false;
|
||||||
x11 = true;
|
x11 = true;
|
||||||
|
hostAbstract = true;
|
||||||
|
|
||||||
# 0, PresetExt | PresetDenyNS | PresetDenyDevel
|
# 0, PresetExt | PresetDenyNS | PresetDenyDevel
|
||||||
expectedFilter = {
|
expectedFilter = {
|
||||||
@ -45,7 +46,7 @@ in
|
|||||||
want = {
|
want = {
|
||||||
env = [
|
env = [
|
||||||
"DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/65534/bus"
|
"DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/65534/bus"
|
||||||
"DISPLAY=unix:/tmp/.X11-unix/X0"
|
"DISPLAY=:0"
|
||||||
"HOME=/var/lib/hakurei/u0/a2"
|
"HOME=/var/lib/hakurei/u0/a2"
|
||||||
"PULSE_SERVER=unix:/run/user/65534/pulse/native"
|
"PULSE_SERVER=unix:/run/user/65534/pulse/native"
|
||||||
"SHELL=/run/current-system/sw/bin/bash"
|
"SHELL=/run/current-system/sw/bin/bash"
|
||||||
@ -276,7 +277,7 @@ in
|
|||||||
seccomp = true;
|
seccomp = true;
|
||||||
|
|
||||||
try_socket = "/tmp/.X11-unix/X0";
|
try_socket = "/tmp/.X11-unix/X0";
|
||||||
socket_abstract = false;
|
socket_abstract = true;
|
||||||
socket_pathname = true;
|
socket_pathname = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@ silent_output_interrupt("--wayland -X --dbus --pulse ")
|
|||||||
print(machine.fail("sudo -u alice -i hakurei -v run --wayland true"))
|
print(machine.fail("sudo -u alice -i hakurei -v run --wayland true"))
|
||||||
|
|
||||||
# Start hakurei permissive defaults within Wayland session:
|
# Start hakurei permissive defaults within Wayland session:
|
||||||
hakurei('-v run --wayland --dbus notify-send -a "NixOS Tests" "Test notification" "Notification from within sandbox." && touch /tmp/dbus-ok')
|
hakurei('-v run --wayland --dbus --dbus-log notify-send -a "NixOS Tests" "Test notification" "Notification from within sandbox." && touch /tmp/dbus-ok')
|
||||||
machine.wait_for_file("/tmp/dbus-ok", timeout=15)
|
machine.wait_for_file("/tmp/dbus-ok", timeout=15)
|
||||||
collect_state_ui("dbus_notify_exited")
|
collect_state_ui("dbus_notify_exited")
|
||||||
# not in pid namespace, verify termination
|
# not in pid namespace, verify termination
|
||||||
|
Loading…
x
Reference in New Issue
Block a user