mirror of
https://github.com/tailscale/tailscale.git
synced 2025-05-04 06:31:54 +00:00
ssh: don't use -l option for shells on FreeBSD
Shells on FreeBSD don't support the -l option. This means that when handling SSH in-process, we can't give the user a login shell, but this change at least allows connecting at all. Updates #13338 Signed-off-by: Percy Wegmann <percy@tailscale.com>
This commit is contained in:
parent
e6e00012b2
commit
e4bee94857
@ -1089,6 +1089,10 @@ func (ia *incubatorArgs) loginArgs(loginCmdPath string) []string {
|
||||
|
||||
func shellArgs(isShell bool, cmd string) []string {
|
||||
if isShell {
|
||||
if runtime.GOOS == "freebsd" {
|
||||
// freebsd's shells don't support the "-l" option, so we can't run as a login shell
|
||||
return []string{}
|
||||
}
|
||||
return []string{"-l"}
|
||||
} else {
|
||||
return []string{"-c", cmd}
|
||||
|
Loading…
x
Reference in New Issue
Block a user