All checks were successful
Test / Create distribution (push) Successful in 26s
Test / Sandbox (push) Successful in 1m48s
Test / Fortify (push) Successful in 2m36s
Test / Sandbox (race detector) (push) Successful in 2m52s
Test / Fpkg (push) Successful in 3m32s
Test / Fortify (race detector) (push) Successful in 4m9s
Test / Flake checks (push) Successful in 1m4s
Signed-off-by: Ophestra <cat@gensokyo.uk>
25 lines
543 B
Go
25 lines
543 B
Go
package setuid
|
|
|
|
import (
|
|
"git.gensokyo.uk/security/fortify/fst"
|
|
"git.gensokyo.uk/security/fortify/internal/sys"
|
|
"git.gensokyo.uk/security/fortify/sandbox"
|
|
"git.gensokyo.uk/security/fortify/system"
|
|
)
|
|
|
|
func NewWithID(id fst.ID, os sys.State) fst.App {
|
|
a := new(app)
|
|
a.id = newID(&id)
|
|
a.sys = os
|
|
return a
|
|
}
|
|
|
|
func AppIParams(a fst.App, sa fst.SealedApp) (*system.I, *sandbox.Params) {
|
|
v := a.(*app)
|
|
seal := sa.(*outcome)
|
|
if v.outcome != seal || v.id != seal.id {
|
|
panic("broken app/outcome link")
|
|
}
|
|
return seal.sys, seal.container
|
|
}
|