mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 05:07:33 +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 is an SSH server integrated into Tailscale.
|
||||
package tailssh
|
||||
@@ -903,7 +903,7 @@ func (ss *sshSession) run() {
|
||||
defer t.Stop()
|
||||
}
|
||||
|
||||
if euid := os.Geteuid(); euid != 0 {
|
||||
if euid := os.Geteuid(); euid != 0 && runtime.GOOS != "plan9" {
|
||||
if lu.Uid != fmt.Sprint(euid) {
|
||||
ss.logf("can't switch to user %q from process euid %v", lu.Username, euid)
|
||||
fmt.Fprintf(ss, "can't switch user\r\n")
|
||||
|
Reference in New Issue
Block a user