aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app/system.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2024-12-28 11:12:35 +0900
committerOphestra <cat@gensokyo.uk>2024-12-28 11:12:35 +0900
commit0107620d8c174dcf9237c16d4b4b7b2f6955a214 (patch)
tree3b082eafad73eaa971a59baf762260c89917831b /internal/app/system.go
parentfc26659ea11fea8f41fc2551d6d39d30fe3a49e7 (diff)
app: merge share methods
This significantly increases readability and makes order of ops more obvious. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/system.go')
-rw-r--r--internal/app/system.go36
1 files changed, 0 insertions, 36 deletions
diff --git a/internal/app/system.go b/internal/app/system.go
index 84028540..241eafa5 100644
--- a/internal/app/system.go
+++ b/internal/app/system.go
@@ -1,9 +1,7 @@
package app
import (
- "git.gensokyo.uk/security/fortify/dbus"
"git.gensokyo.uk/security/fortify/helper/bwrap"
- "git.gensokyo.uk/security/fortify/internal/linux"
"git.gensokyo.uk/security/fortify/internal/system"
)
@@ -51,37 +49,3 @@ type appUser struct {
// passwd database username
username string
}
-
-// shareAll calls all share methods in sequence
-func (seal *appSeal) shareAll(bus [2]*dbus.Config, os linux.System) error {
- if seal.shared {
- panic("seal shared twice")
- }
- seal.shared = true
-
- seal.shareSystem()
- seal.shareRuntime()
- seal.sharePasswd(os)
- if err := seal.shareDisplay(os); err != nil {
- return err
- }
- if err := seal.sharePulse(os); err != nil {
- return err
- }
-
- // ensure dbus session bus defaults
- if bus[0] == nil {
- bus[0] = dbus.NewConfig(seal.fid, true, true)
- }
-
- if err := seal.shareDBus(bus); err != nil {
- return err
- }
-
- // queue overriding tmpfs at the end of seal.sys.bwrap.Filesystem
- for _, dest := range seal.sys.override {
- seal.sys.bwrap.Tmpfs(dest, 8*1024)
- }
-
- return nil
-}