aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app/finalise.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-08 18:34:17 +0900
committerOphestra <cat@gensokyo.uk>2025-10-08 18:34:17 +0900
commit16bf3178d358f72ce9605352364809b42229af5f (patch)
tree3eb7183f8efdf43e40682e6bd3f25d532b5ba205 /internal/app/finalise.go
parent034c59a26a871bf7ccae11357651e0ab64bcbbd9 (diff)
internal/app: relocate dynamic exported state
This allows reuse of the populateEarly method in test instrumentation. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/finalise.go')
-rw-r--r--internal/app/finalise.go16
1 files changed, 1 insertions, 15 deletions
diff --git a/internal/app/finalise.go b/internal/app/finalise.go
index a4e2d694..bd9cf2b6 100644
--- a/internal/app/finalise.go
+++ b/internal/app/finalise.go
@@ -96,21 +96,7 @@ func (k *outcome) finalise(ctx context.Context, msg container.Msg, id *state.ID,
EnvPaths: copyPaths(k.syscallDispatcher),
Container: config.Container,
}
-
- // enforce bounds and default early
- if s.Container.WaitDelay <= 0 {
- kp.waitDelay = hst.WaitDelayDefault
- } else if s.Container.WaitDelay > hst.WaitDelayMax {
- kp.waitDelay = hst.WaitDelayMax
- } else {
- kp.waitDelay = s.Container.WaitDelay
- }
-
- if s.Container.MapRealUID {
- s.Mapuid, s.Mapgid = k.getuid(), k.getgid()
- } else {
- s.Mapuid, s.Mapgid = k.overflowUid(msg), k.overflowGid(msg)
- }
+ kp.waitDelay = s.populateEarly(k.syscallDispatcher, msg)
// TODO(ophestra): duplicate in shim (params to shim)
if err := s.populateLocal(k.syscallDispatcher, msg); err != nil {