mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-16 03:31:39 +00:00
ssh/tailssh: enable recording of non-pty sessions
Updates tailscale/corp#9967 Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
parent
8765568373
commit
8a246487c2
@ -1130,10 +1130,7 @@ func (ss *sshSession) recorders() []netip.AddrPort {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (ss *sshSession) shouldRecord() bool {
|
func (ss *sshSession) shouldRecord() bool {
|
||||||
// for now only record pty sessions
|
return len(ss.recorders()) > 0
|
||||||
// TODO(bradfitz,maisem): support recording non-pty stuff too.
|
|
||||||
_, _, isPtyReq := ss.Pty()
|
|
||||||
return isPtyReq && len(ss.recorders()) > 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type sshConnInfo struct {
|
type sshConnInfo struct {
|
||||||
|
@ -540,7 +540,8 @@ func TestSSH(t *testing.T) {
|
|||||||
node: &tailcfg.Node{},
|
node: &tailcfg.Node{},
|
||||||
uprof: tailcfg.UserProfile{},
|
uprof: tailcfg.UserProfile{},
|
||||||
}
|
}
|
||||||
sc.finalAction = &tailcfg.SSHAction{Accept: true}
|
sc.action0 = &tailcfg.SSHAction{Accept: true}
|
||||||
|
sc.finalAction = sc.action0
|
||||||
|
|
||||||
sc.Handler = func(s ssh.Session) {
|
sc.Handler = func(s ssh.Session) {
|
||||||
sc.newSSHSession(s).run()
|
sc.newSSHSession(s).run()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user