From 380d1f45851b7dffb963c51da96a17ba41f3cfb8 Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Sun, 20 Oct 2024 22:54:47 +0900 Subject: app: move wayland mediation to shim package Values used in the Wayland mediation implementation is stored in various struct fields strewn across multiple app structs and checks are messy and confusing. This commit unifies them into a single struct and access it using much better looking methods. Signed-off-by: Ophestra Umiker --- internal/app/system.go | 42 ------------------------------------------ 1 file changed, 42 deletions(-) (limited to 'internal/app/system.go') diff --git a/internal/app/system.go b/internal/app/system.go index 834bdc91..2fc413e7 100644 --- a/internal/app/system.go +++ b/internal/app/system.go @@ -5,51 +5,9 @@ import ( "git.ophivana.moe/security/fortify/dbus" "git.ophivana.moe/security/fortify/helper/bwrap" - "git.ophivana.moe/security/fortify/internal" - "git.ophivana.moe/security/fortify/internal/state" "git.ophivana.moe/security/fortify/internal/system" ) -// appSeal seals the application with child-related information -type appSeal struct { - // wayland socket path if mediated wayland is enabled - wl string - // wait for wayland client to exit if mediated wayland is enabled, - // (wlDone == nil) determines whether mediated wayland setup is performed - wlDone chan struct{} - - // app unique ID string representation - id string - // freedesktop application ID - fid string - // argv to start process with in the final confined environment - command []string - // persistent process state store - store state.Store - - // uint8 representation of launch method sealed from config - launchOption uint8 - // process-specific share directory path - share string - // process-specific share directory path local to XDG_RUNTIME_DIR - shareLocal string - - // path to launcher program - toolPath string - // pass-through enablement tracking from config - et system.Enablements - - // prevents sharing from happening twice - shared bool - // seal system-level component - sys *appSealSys - - // used in various sealing operations - internal.SystemConstants - - // protected by upstream mutex -} - // appSealSys encapsulates app seal behaviour with OS interactions type appSealSys struct { bwrap *bwrap.Config -- cgit v1.3.1