diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-04-10 19:12:45 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-04-10 19:34:02 +0900 |
| commit | c33a6a5b7ee130370aeeebf6635977415115f7da (patch) | |
| tree | 730e9faed1b6f8a9325e1ee0254236057af9190f /internal/outcome/run.go | |
| parent | 952082bd9b4a5387232da6965fd82e20ee8219a6 (diff) | |
hst: optionally reject insecure options
This prevents inadvertent use of insecure compatibility features.
Closes #30.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/outcome/run.go')
| -rw-r--r-- | internal/outcome/run.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/internal/outcome/run.go b/internal/outcome/run.go index 8bf666b2..dfa2cf63 100644 --- a/internal/outcome/run.go +++ b/internal/outcome/run.go @@ -18,7 +18,13 @@ import ( func IsPollDescriptor(fd uintptr) bool // Main runs an app according to [hst.Config] and terminates. Main does not return. -func Main(ctx context.Context, msg message.Msg, config *hst.Config, fd int) { +func Main( + ctx context.Context, + msg message.Msg, + config *hst.Config, + flags int, + fd int, +) { // avoids runtime internals or standard streams if fd >= 0 { if IsPollDescriptor(uintptr(fd)) || fd < 3 { @@ -34,7 +40,7 @@ func Main(ctx context.Context, msg message.Msg, config *hst.Config, fd int) { k := outcome{syscallDispatcher: direct{msg}} finaliseTime := time.Now() - if err := k.finalise(ctx, msg, &id, config); err != nil { + if err := k.finalise(ctx, msg, &id, config, flags); err != nil { printMessageError(msg.GetLogger().Fatalln, "cannot seal app:", err) panic("unreachable") } |
