forked from mirrors/nixpkgs
Add a regression test for #14623
This commit is contained in:
parent
9153d8ed64
commit
a42698d2a4
|
@ -1,9 +1,14 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{ users.extraUsers = lib.singleton
|
||||
{ users.extraUsers.alice =
|
||||
{ isNormalUser = true;
|
||||
name = "alice";
|
||||
description = "Alice Foobar";
|
||||
password = "foobar";
|
||||
};
|
||||
|
||||
users.extraUsers.bob =
|
||||
{ isNormalUser = true;
|
||||
description = "Bob Foobar";
|
||||
password = "foobar";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,6 +15,8 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||
services.xserver.displayManager.auto.user = "alice";
|
||||
|
||||
services.xserver.desktopManager.xfce.enable = true;
|
||||
|
||||
environment.systemPackages = [ pkgs.xorg.xmessage ];
|
||||
};
|
||||
|
||||
testScript =
|
||||
|
@ -32,5 +34,9 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||
$machine->waitForWindow(qr/Terminal/);
|
||||
$machine->sleep(10);
|
||||
$machine->screenshot("screen");
|
||||
|
||||
# Ensure that the X server does proper access control.
|
||||
$machine->mustFail("su - bob -c 'DISPLAY=:0.0 xmessage Foo'");
|
||||
$machine->mustFail("su - bob -c 'DISPLAY=:0 xmessage Foo'");
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue