From dfd94675236844ebcec9ea51f2547ad4fd049357 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 19 Feb 2025 01:36:07 +0900 Subject: app: merge seal with sys The existence of the appSealSys struct was an implementation detail obsolete since system.I was integrated in 084cd84f36a1d608541b4aa4e1e95334395d8953. Signed-off-by: Ophestra --- internal/app/system.go | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 internal/app/system.go (limited to 'internal/app/system.go') diff --git a/internal/app/system.go b/internal/app/system.go deleted file mode 100644 index 3a92b0fd..00000000 --- a/internal/app/system.go +++ /dev/null @@ -1,48 +0,0 @@ -package app - -import ( - "os" - - "git.gensokyo.uk/security/fortify/helper/bwrap" - "git.gensokyo.uk/security/fortify/system" -) - -// appSealSys encapsulates app seal behaviour with OS interactions -type appSealSys struct { - bwrap *bwrap.Config - // bwrap sync fd - sp *os.File - // paths to override by mounting tmpfs over them - override []string - - // default formatted XDG_RUNTIME_DIR of User - runtime string - // target user sealed from config - user appUser - - // mapped uid and gid in user namespace - mapuid *stringPair[int] - - needRevert bool - saveState bool - *system.I - - // protected by upstream mutex -} - -type appUser struct { - // application id - aid *stringPair[int] - // target uid resolved by fid:aid - uid *stringPair[int] - - // supplementary group ids - supp []string - - // home directory host path - data string - // app user home directory - home string - // passwd database username - username string -} -- cgit v1.3.1