test/sandbox: fix stdout tty check
Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
d097eaa28f
commit
61d86c5e10
@ -48,7 +48,7 @@ let
|
||||
inherit (tc) tty mapRealUid;
|
||||
share = foot;
|
||||
packages = [ ];
|
||||
command = "${checkSandbox tc.name tc.want} > /dev/console";
|
||||
command = builtins.toString (checkSandbox tc.name tc.want);
|
||||
};
|
||||
in
|
||||
{
|
||||
|
@ -19,7 +19,7 @@
|
||||
} null;
|
||||
bin = fs "800001ed" { sh = fs "80001ff" null null; } null;
|
||||
dev = fs "800001ed" {
|
||||
console = fs "1a4" null null;
|
||||
console = fs "4200190" null null;
|
||||
core = fs "80001ff" null null;
|
||||
dri = fs "800001ed" {
|
||||
by-path = fs "800001ed" {
|
||||
@ -196,6 +196,7 @@
|
||||
(ent "/urandom" "/dev/urandom" "rw,nosuid" "devtmpfs" "devtmpfs" ignore)
|
||||
(ent "/tty" "/dev/tty" "rw,nosuid" "devtmpfs" "devtmpfs" ignore)
|
||||
(ent "/" "/dev/pts" "rw,nosuid,noexec,relatime" "devpts" "devpts" "rw,mode=620,ptmxmode=666")
|
||||
(ent ignore "/dev/console" "rw,nosuid,noexec,relatime" "devpts" "devpts" "rw,gid=3,mode=620,ptmxmode=666")
|
||||
(ent "/" "/dev/mqueue" "rw,relatime" "mqueue" "mqueue" "rw")
|
||||
(ent "/bin" "/bin" "ro,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw")
|
||||
(ent "/usr/bin" "/usr/bin" "ro,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw")
|
||||
|
@ -19,7 +19,7 @@
|
||||
} null;
|
||||
bin = fs "800001ed" { sh = fs "80001ff" null null; } null;
|
||||
dev = fs "800001ed" {
|
||||
console = fs "1a4" null null;
|
||||
console = fs "4200190" null null;
|
||||
core = fs "80001ff" null null;
|
||||
dri = fs "800001ed" {
|
||||
by-path = fs "800001ed" {
|
||||
@ -196,6 +196,7 @@
|
||||
(ent "/urandom" "/dev/urandom" "rw,nosuid" "devtmpfs" "devtmpfs" ignore)
|
||||
(ent "/tty" "/dev/tty" "rw,nosuid" "devtmpfs" "devtmpfs" ignore)
|
||||
(ent "/" "/dev/pts" "rw,nosuid,noexec,relatime" "devpts" "devpts" "rw,mode=620,ptmxmode=666")
|
||||
(ent ignore "/dev/console" "rw,nosuid,noexec,relatime" "devpts" "devpts" "rw,gid=3,mode=620,ptmxmode=666")
|
||||
(ent "/" "/dev/mqueue" "rw,relatime" "mqueue" "mqueue" "rw")
|
||||
(ent "/bin" "/bin" "ro,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw")
|
||||
(ent "/usr/bin" "/usr/bin" "ro,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw")
|
||||
|
@ -19,7 +19,7 @@
|
||||
} null;
|
||||
bin = fs "800001ed" { sh = fs "80001ff" null null; } null;
|
||||
dev = fs "800001ed" {
|
||||
console = fs "1a4" null null;
|
||||
console = fs "4200190" null null;
|
||||
core = fs "80001ff" null null;
|
||||
dri = fs "800001ed" {
|
||||
by-path = fs "800001ed" {
|
||||
@ -196,6 +196,7 @@
|
||||
(ent "/urandom" "/dev/urandom" "rw,nosuid" "devtmpfs" "devtmpfs" ignore)
|
||||
(ent "/tty" "/dev/tty" "rw,nosuid" "devtmpfs" "devtmpfs" ignore)
|
||||
(ent "/" "/dev/pts" "rw,nosuid,noexec,relatime" "devpts" "devpts" "rw,mode=620,ptmxmode=666")
|
||||
(ent ignore "/dev/console" "rw,nosuid,noexec,relatime" "devpts" "devpts" "rw,gid=3,mode=620,ptmxmode=666")
|
||||
(ent "/" "/dev/mqueue" "rw,relatime" "mqueue" "mqueue" "rw")
|
||||
(ent "/bin" "/bin" "ro,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw")
|
||||
(ent "/usr/bin" "/usr/bin" "ro,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw")
|
||||
|
@ -107,7 +107,7 @@ check_offset = 0
|
||||
def check_sandbox(name):
|
||||
global check_offset
|
||||
check_offset += 1
|
||||
swaymsg(f"exec check-sandbox-{name}")
|
||||
swaymsg(f"exec script /dev/null -E always -qec check-sandbox-{name}")
|
||||
machine.wait_for_file(f"/tmp/fortify.1000/tmpdir/{check_offset}/sandbox-ok", timeout=15)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user