ssh/tailssh: add Tailscale SSH (server) support on FreeBSD

Change-Id: I607194b6ef99205e777f3df93a74ffe1a2e0344c
Signed-off-by: Pat Maddox <pat@ratiopbc.com>
This commit is contained in:
Pat Maddox
2022-11-01 00:49:37 +00:00
committed by Brad Fitzpatrick
parent e3a66e4d2f
commit 9bf3ef4167
10 changed files with 43 additions and 25 deletions

View File

@@ -8,7 +8,7 @@
// and groups to the specified `--uid`, `--gid` and `--groups`, and
// then launches the requested `--cmd`.
//go:build linux || (darwin && !ios)
//go:build linux || (darwin && !ios) || freebsd
package tailssh

View File

@@ -0,0 +1,15 @@
// Copyright (c) 2022 Tailscale Inc & AUTHORS All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tailssh
import "syscall"
func (ia *incubatorArgs) loginArgs() []string {
return []string{ia.loginCmdPath, "-fp", "-h", ia.remoteIP, ia.localUser}
}
func setGroups(groupIDs []int) error {
return syscall.Setgroups(groupIDs)
}

View File

@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build linux || (darwin && !ios)
//go:build linux || (darwin && !ios) || freebsd
// Package tailssh is an SSH server integrated into Tailscale.
package tailssh