mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-13 06:07:34 +00:00
ssh/tailssh: add Plan 9 support for Tailscale SSH
Updates #5794 Change-Id: I7b05cd29ec02085cb503bbcd0beb61bf455002ac Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
6f75647c0e
commit
b3953ce0c4
@@ -1,7 +1,7 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
//go:build linux || (darwin && !ios) || freebsd || openbsd
|
||||
//go:build linux || (darwin && !ios) || freebsd || openbsd || plan9
|
||||
|
||||
package tailssh
|
||||
|
||||
@@ -48,6 +48,9 @@ func userLookup(username string) (*userMeta, error) {
|
||||
}
|
||||
|
||||
func (u *userMeta) LoginShell() string {
|
||||
if runtime.GOOS == "plan9" {
|
||||
return "/bin/rc"
|
||||
}
|
||||
if u.loginShellCached != "" {
|
||||
// This field should be populated on Linux, at least, because
|
||||
// func userLookup on Linux uses "getent" to look up the user
|
||||
@@ -85,6 +88,9 @@ func defaultPathForUser(u *user.User) string {
|
||||
if s := defaultPathTmpl(); s != "" {
|
||||
return expandDefaultPathTmpl(s, u)
|
||||
}
|
||||
if runtime.GOOS == "plan9" {
|
||||
return "/bin"
|
||||
}
|
||||
isRoot := u.Uid == "0"
|
||||
switch distro.Get() {
|
||||
case distro.Debian:
|
||||
|
Reference in New Issue
Block a user