tailscale/ssh/tailssh
Maisem Ali 2ae670eb71 ssh/tailssh: work around lack of scontext in SELinux
Trying to SSH when SELinux is enforced results in errors like:

```
➜  ~ ssh ec2-user@<ip>
Last login: Thu Jun  1 22:51:44 from <ip2>
ec2-user: no shell: Permission denied
Connection to <ip> closed.
```

while the `/var/log/audit/audit.log` has
```
type=AVC msg=audit(1685661291.067:465): avc:  denied  { transition } for  pid=5296 comm="login" path="/usr/bin/bash" dev="nvme0n1p1" ino=2564 scontext=system_u:system_r:unconfined_service_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0 tclass=process permissive=0
```

The right fix here would be to somehow install the appropriate context when
tailscale is installed on host, but until we figure out a way to do that
stop using the `login` cmd in these situations.

Updates #4908

Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-06-20 10:44:22 -07:00
..
incubator.go ssh/tailssh: work around lack of scontext in SELinux 2023-06-20 10:44:22 -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: add support for remote/reverse port forwarding 2023-06-09 08:47:32 -07:00
tailssh_test.go ssh/tailssh: fix regression after LDAP support 2023-05-21 07:53:25 -07:00
user.go ssh/tailssh: Max Username Length 256 for linux 2023-06-05 18:04:30 -07:00