Commit Graph
8 Commits
Author SHA1 Message Date
Jakub Nyckowski 7ccf2f219a Terminate the local shell when a session closes #19817 (#19817)
When a client sends an SSH session before the shell process ends, Teleport sends the SIGKILL signal to the subprocess. This causes the still-leaving shell to be resigned to PID 1 and live forever.
This PR tried to stop the terminal first before killing the subprocess to prevent the terminal from living forever.

Closes #13335
Closes #6245
Closes #4469
2023-02-24 13:56:11 +00:00
Brian Joerger a3bd4650d0 Provide proxy address when beginning a node session (#18579) 2022-12-02 01:56:22 +00:00
Jakub Nyckowski 0ee91f6c37 Enable GCI linter (#17894) 2022-10-28 20:20:28 +00:00
Jakub Nyckowski 716c2bdbf9 Fix BPF (#17269)
* Revert "Refactor bpf/restrictedsession usage in lib/srv (#15824)"

This reverts commit 769951fe4b.

* Remove unused Linux BPF includes

* Fix linter issue
2022-10-12 18:41:26 +00:00
Nic Klaassen d92cd32037 security: only allow one exec request per SSH channel (#16683) 2022-09-28 20:31:02 +00:00
rosstimothy 769951fe4b Refactor bpf/restrictedsession usage in lib/srv (#15824)
Invert the relationship of `lib/srv` and `lib/bpf`,
`lib/restrictedsession` such that `lib/bpf` is only imported in
`lib/srv/regular`. Since not everything is built with the `bpf`
tag it's important to reduce the surface area of `lib/bpf` such
that it isn't inadvertantly imported. For instance it was entirely
possible to import a package in `tsh` that transitively
depends on `lib/bpf` - which breaks the build since `tsh` is not
compiled with the `bpf` tag.

By refactoring the `srv.Server` interface not to use the `bpf.BPF`
and `restrictedsession.Manager` interfaces directly anything that
imports `lib/srv` now won't require that `-tags=bpf` is set in
order to compile.
2022-09-07 14:49:28 +00:00
Russell Jones fdf60ed994 Refactor tests under srv package.
Refactored all tests under "lib/srv" to use testify instead
of gocheck.
2022-07-15 13:04:45 -07:00
Michelle Bergquist ae3a61d72a add ServerHostname to audit event (#13156) 2022-06-10 08:42:59 -06:00