All checks were successful
Test / Create distribution (push) Successful in 43s
Test / Sandbox (push) Successful in 2m18s
Test / Hakurei (push) Successful in 3m10s
Test / Sandbox (race detector) (push) Successful in 3m30s
Test / Hakurei (race detector) (push) Successful in 4m43s
Test / Fpkg (push) Successful in 5m4s
Test / Flake checks (push) Successful in 1m12s
Fortify makes little sense for a container tool. Signed-off-by: Ophestra <cat@gensokyo.uk>
25 lines
538 B
Go
25 lines
538 B
Go
package setuid
|
|
|
|
import (
|
|
. "git.gensokyo.uk/security/hakurei/internal/app"
|
|
"git.gensokyo.uk/security/hakurei/internal/sys"
|
|
"git.gensokyo.uk/security/hakurei/sandbox"
|
|
"git.gensokyo.uk/security/hakurei/system"
|
|
)
|
|
|
|
func NewWithID(id ID, os sys.State) App {
|
|
a := new(app)
|
|
a.id = newID(&id)
|
|
a.sys = os
|
|
return a
|
|
}
|
|
|
|
func AppIParams(a App, sa 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
|
|
}
|