diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-12-18 13:45:55 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-12-18 13:45:55 +0900 |
| commit | b752ec44689aa5a3a0f3b9672b218691f161c7c1 (patch) | |
| tree | b514cb0c247f8deaa9feba84d9f8944623911f5d /internal/app/start.go | |
| parent | 5d00805a7c775382516e05b5b01e58df651408ab (diff) | |
fipc: export config struct
Also store full config as part of state.
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'internal/app/start.go')
| -rw-r--r-- | internal/app/start.go | 17 |
1 files changed, 10 insertions, 7 deletions
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 |
