diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-02-19 21:05:48 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-02-19 21:12:11 +0900 |
| commit | 3c80fd2b0f907af7b179e9e307304c0fa52994a0 (patch) | |
| tree | f52e8ed67f94f4ff8c423cd1e8b06fef82918c93 /internal/app/seal.go | |
| parent | ef81828e0c1ce6277e0b124f6062eab564dfeceb (diff) | |
app: defer system.I revert
Just returning an error after a successful call of commit will leave garbage behind with no way for the caller to clean them. This change ensures revert is always called after successful commit with at least per-process state enabled.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/seal.go')
| -rw-r--r-- | internal/app/seal.go | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/internal/app/seal.go b/internal/app/seal.go index 23f1c0c0..d39ee126 100644 --- a/internal/app/seal.go +++ b/internal/app/seal.go @@ -18,7 +18,6 @@ import ( "git.gensokyo.uk/security/fortify/helper/bwrap" "git.gensokyo.uk/security/fortify/internal" "git.gensokyo.uk/security/fortify/internal/fmsg" - "git.gensokyo.uk/security/fortify/internal/state" "git.gensokyo.uk/security/fortify/internal/sys" "git.gensokyo.uk/security/fortify/system" "git.gensokyo.uk/security/fortify/wl" @@ -63,17 +62,11 @@ type appSeal struct { // passed through from [fst.Config] command []string - // state instance initialised during seal; used during process lifecycle events - store state.Store // initial [fst.Config] gob stream for state data; // this is prepared ahead of time as config is mutated during seal creation ct io.WriterTo // dump dbus proxy message buffer dbusMsg func() - // whether [system.I] was committed; used during process lifecycle events - needRevert bool - // whether state was inserted into [state.Store]; used during process lifecycle events - stateInStore bool user appUser sys *system.I @@ -230,7 +223,6 @@ func (seal *appSeal) finalise(sys sys.State, config *fst.Config, id string) erro */ sc := sys.Paths() - seal.store = state.NewMulti(sc.RunDirPath) seal.sys = system.New(seal.user.uid.unwrap()) seal.sys.IsVerbose = fmsg.Load seal.sys.Verbose = fmsg.Verbose |
