From 3ae2ab652e9cd1d6250dbde8ae0f9b9fe90afc72 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 17 Feb 2025 13:24:17 +0900 Subject: system/wayland: sync file at caller specified address Storing this in sys is incredibly ugly: sys should be stateless and Ops must keep track of their state. Signed-off-by: Ophestra --- internal/app/app_pd_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'internal/app/app_pd_test.go') diff --git a/internal/app/app_pd_test.go b/internal/app/app_pd_test.go index 4d90d7fc..b5cf46bf 100644 --- a/internal/app/app_pd_test.go +++ b/internal/app/app_pd_test.go @@ -1,6 +1,8 @@ package app_test import ( + "os" + "git.gensokyo.uk/security/fortify/acl" "git.gensokyo.uk/security/fortify/dbus" "git.gensokyo.uk/security/fortify/fst" @@ -217,7 +219,7 @@ var testCasesPd = []sealTestCase{ Ensure("/run/user/1971", 0700).UpdatePermType(system.User, "/run/user/1971", acl.Execute). // this is ordered as is because the previous Ensure only calls mkdir if XDG_RUNTIME_DIR is unset Ephemeral(system.Process, "/run/user/1971/fortify/ebf083d1b175911782d413369b64ce7c", 0700).UpdatePermType(system.Process, "/run/user/1971/fortify/ebf083d1b175911782d413369b64ce7c", acl.Execute). Ensure("/tmp/fortify.1971/wayland", 0711). - Wayland("/tmp/fortify.1971/wayland/ebf083d1b175911782d413369b64ce7c", "/run/user/1971/wayland-0", "org.chromium.Chromium", "ebf083d1b175911782d413369b64ce7c"). + Wayland(new(*os.File), "/tmp/fortify.1971/wayland/ebf083d1b175911782d413369b64ce7c", "/run/user/1971/wayland-0", "org.chromium.Chromium", "ebf083d1b175911782d413369b64ce7c"). Link("/run/user/1971/pulse/native", "/run/user/1971/fortify/ebf083d1b175911782d413369b64ce7c/pulse"). CopyFile(new([]byte), "/home/ophestra/xdg/config/pulse/cookie", 256, 256). MustProxyDBus("/tmp/fortify.1971/ebf083d1b175911782d413369b64ce7c/bus", &dbus.Config{ -- cgit v1.3.1