forked from security/hakurei
hst/config: negative WaitDelay bypasses default
This behaviour might be useful, so do not lock it out. This change also fixes an oversight where the unchecked value is used to determine ForwardCancel. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -81,7 +81,9 @@ func (s *outcomeState) populateEarly(k syscallDispatcher, msg message.Msg) {
|
||||
s.Shim = &shimParams{PrivPID: os.Getpid(), Verbose: msg.IsVerbose()}
|
||||
|
||||
// enforce bounds and default early
|
||||
if s.Container.WaitDelay <= 0 {
|
||||
if s.Container.WaitDelay < 0 {
|
||||
s.Shim.WaitDelay = 0
|
||||
} else if s.Container.WaitDelay == 0 {
|
||||
s.Shim.WaitDelay = hst.WaitDelayDefault
|
||||
} else if s.Container.WaitDelay > hst.WaitDelayMax {
|
||||
s.Shim.WaitDelay = hst.WaitDelayMax
|
||||
|
||||
Reference in New Issue
Block a user