tailscale/ssh/tailssh
Joe Tsai bb4b35e923 ssh: ignore io.EOF from sftp.Server.Serve
If the connection provided to sftp.NewServer is closed,
Serve returns the io.EOF error verbatim from io.Reader.Read.
This is an odd error since this is an expected situation,
so we manually ignore io.EOF.
This is somewhat buggy since the sftp package itself
incorrectly reports io.EOF in cases where it should actually
be reporting io.ErrUnexpectedEOF.
See https://github.com/pkg/sftp/pull/554 which patches Serve to
return nil on clean closes and fixes buggy uses of io.ReadFull.

Fixes #8592

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2023-07-21 07:41:36 -07:00
..
incubator.go ssh: ignore io.EOF from sftp.Server.Serve 2023-07-21 07:41:36 -07:00
incubator_linux.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
privs_test.go ssh/tailssh: fix privilege dropping on FreeBSD; add tests 2023-03-20 16:09:18 -04:00
tailssh.go ssh/tailssh: fix double race condition with non-pty command (#8405) 2023-06-21 19:57:45 -07:00
tailssh_test.go ssh/tailssh: fix double race condition with non-pty command (#8405) 2023-06-21 19:57:45 -07:00
user.go ssh/tailssh: Max Username Length 256 for linux 2023-06-05 18:04:30 -07:00