From 871f1e0dfae94c15d0407ae5deaadcfe7c7be3ff Mon Sep 17 00:00:00 2001 From: Russ Magee Date: Thu, 25 Oct 2018 22:49:08 -0700 Subject: [PATCH] Moved CSE (extended err types) back up out of UNIX shell status space --- hkexnet/consts.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hkexnet/consts.go b/hkexnet/consts.go index 25a91a6..009e1d7 100644 --- a/hkexnet/consts.go +++ b/hkexnet/consts.go @@ -30,8 +30,10 @@ const ( // algo shall be used (eg., HerraduraKEx, [TODO: others...]) type KEXAlg uint8 +// Extended exit status codes - indicate comm/pty issues +// rather than remote end normal UNIX exit codes const ( - CSENone = 32 + iota + CSENone = 1024 + iota CSEBadAuth // Failed login password CSETruncCSO // No CSOExitStatus in payload CSEStillOpen // Channel closed unexpectedly @@ -43,6 +45,7 @@ const ( // This indicate channel-related or internal errors type CSExtendedCode uint32 +// Channel Status Op bytes - to distinguish packet types const ( CSONone = iota // No error, normal packet CSOHmacInvalid // HMAC mismatch detected on remote end @@ -51,7 +54,7 @@ const ( CSOChaff // Dummy packet, do not pass beyond decryption ) -// Channel status type +// Channel status Op byte type type CSOType uint32 //TODO: this should be small (max unfragmented packet size?)