From 93afd24327106f98d4ac1490501866577b1f695a Mon Sep 17 00:00:00 2001 From: irenarindos Date: Thu, 4 May 2023 13:00:44 -0400 Subject: [PATCH] feat(bsr): add channel request types to chan callbacks --- internal/bsr/ssh/types.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/bsr/ssh/types.go b/internal/bsr/ssh/types.go index c01f174102..072ae6903f 100644 --- a/internal/bsr/ssh/types.go +++ b/internal/bsr/ssh/types.go @@ -19,15 +19,18 @@ import ( type SessionProgram string // SessionPrograms +// If the channel type is not of type session, then NotApplicable is expected +// If the session program is not exec, shell, or subsystem, then None is used const ( NotApplicable SessionProgram = "not applicable" + None SessionProgram = "none" Exec SessionProgram = "exec" Shell SessionProgram = "shell" Subsystem SessionProgram = "subsystem" ) -// ValidChannelProgram checks if a given SessionProgram is valid. -func ValidChannelProgram(d SessionProgram) bool { +// ValidSessionProgram checks if a given SessionProgram is valid. +func ValidSessionProgram(d SessionProgram) bool { switch d { case Exec, Shell, Subsystem, NotApplicable: return true