Moved CSE (extended err types) back up out of UNIX shell status space

This commit is contained in:
Russ Magee 2018-10-25 22:49:08 -07:00
parent 752dbf6080
commit 871f1e0dfa
1 changed files with 5 additions and 2 deletions

View File

@ -30,8 +30,10 @@ const (
// algo shall be used (eg., HerraduraKEx, [TODO: others...]) // algo shall be used (eg., HerraduraKEx, [TODO: others...])
type KEXAlg uint8 type KEXAlg uint8
// Extended exit status codes - indicate comm/pty issues
// rather than remote end normal UNIX exit codes
const ( const (
CSENone = 32 + iota CSENone = 1024 + iota
CSEBadAuth // Failed login password CSEBadAuth // Failed login password
CSETruncCSO // No CSOExitStatus in payload CSETruncCSO // No CSOExitStatus in payload
CSEStillOpen // Channel closed unexpectedly CSEStillOpen // Channel closed unexpectedly
@ -43,6 +45,7 @@ const (
// This indicate channel-related or internal errors // This indicate channel-related or internal errors
type CSExtendedCode uint32 type CSExtendedCode uint32
// Channel Status Op bytes - to distinguish packet types
const ( const (
CSONone = iota // No error, normal packet CSONone = iota // No error, normal packet
CSOHmacInvalid // HMAC mismatch detected on remote end CSOHmacInvalid // HMAC mismatch detected on remote end
@ -51,7 +54,7 @@ const (
CSOChaff // Dummy packet, do not pass beyond decryption CSOChaff // Dummy packet, do not pass beyond decryption
) )
// Channel status type // Channel status Op byte type
type CSOType uint32 type CSOType uint32
//TODO: this should be small (max unfragmented packet size?) //TODO: this should be small (max unfragmented packet size?)