From b752ec44689aa5a3a0f3b9672b218691f161c7c1 Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Wed, 18 Dec 2024 13:45:55 +0900 Subject: fipc: export config struct Also store full config as part of state. Signed-off-by: Ophestra Umiker --- internal/app/start.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'internal/app/start.go') diff --git a/internal/app/start.go b/internal/app/start.go index e1247d4c..91864510 100644 --- a/internal/app/start.go +++ b/internal/app/start.go @@ -70,11 +70,10 @@ func (a *app) Start() error { } else { // shim start and setup success, create process state sd := state.State{ - PID: a.shim.Unwrap().Process.Pid, - Command: a.seal.command, - Capability: a.seal.et, - Argv: a.shim.Unwrap().Args, - Time: *startTime, + ID: *a.id, + PID: a.shim.Unwrap().Process.Pid, + Config: a.ct.Unwrap(), + Time: *startTime, } // register process state @@ -227,8 +226,12 @@ func (a *app) Wait() (int, error) { } // accumulate capabilities of other launchers - for _, s := range states { - *rt |= s.Capability + for i, s := range states { + if s.Config != nil { + *rt |= s.Config.Confinement.Enablements + } else { + fmsg.Printf("state entry %d does not contain config", i) + } } } // invert accumulated enablements for cleanup -- cgit v1.3.1