mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-07 10:22:06 +01:00
ipn/ipnlocal: fix a case where ts_omit_ssh was still linking in x/crypto/ssh
And add a test. Updates #12614 Change-Id: Icb1c77f5890def794a4938583725c1a0886b197d Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
6db30a10f7
commit
697098ed6c
@ -15,8 +15,9 @@ func TestOmitSSH(t *testing.T) {
|
|||||||
deptest.DepChecker{
|
deptest.DepChecker{
|
||||||
GOOS: "linux",
|
GOOS: "linux",
|
||||||
GOARCH: "amd64",
|
GOARCH: "amd64",
|
||||||
Tags: "ts_omit_ssh",
|
Tags: "ts_omit_ssh,ts_include_cli",
|
||||||
BadDeps: map[string]string{
|
BadDeps: map[string]string{
|
||||||
|
"golang.org/x/crypto/ssh": msg,
|
||||||
"tailscale.com/ssh/tailssh": msg,
|
"tailscale.com/ssh/tailssh": msg,
|
||||||
"tailscale.com/sessionrecording": msg,
|
"tailscale.com/sessionrecording": msg,
|
||||||
"github.com/anmitsu/go-shlex": msg,
|
"github.com/anmitsu/go-shlex": msg,
|
||||||
|
|||||||
@ -5610,7 +5610,7 @@ func (b *LocalBackend) applyPrefsToHostinfoLocked(hi *tailcfg.Hostinfo, prefs ip
|
|||||||
b.metrics.advertisedRoutes.Set(float64(tsaddr.WithoutExitRoute(prefs.AdvertiseRoutes()).Len()))
|
b.metrics.advertisedRoutes.Set(float64(tsaddr.WithoutExitRoute(prefs.AdvertiseRoutes()).Len()))
|
||||||
|
|
||||||
var sshHostKeys []string
|
var sshHostKeys []string
|
||||||
if prefs.RunSSH() && envknob.CanSSHD() {
|
if buildfeatures.HasSSH && prefs.RunSSH() && envknob.CanSSHD() {
|
||||||
// TODO(bradfitz): this is called with b.mu held. Not ideal.
|
// TODO(bradfitz): this is called with b.mu held. Not ideal.
|
||||||
// If the filesystem gets wedged or something we could block for
|
// If the filesystem gets wedged or something we could block for
|
||||||
// a long time. But probably fine.
|
// a long time. But probably fine.
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) Tailscale Inc & AUTHORS
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
// SPDX-License-Identifier: BSD-3-Clause
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
//go:build (linux && !android) || (darwin && !ios) || freebsd || openbsd || plan9
|
//go:build ((linux && !android) || (darwin && !ios) || freebsd || openbsd || plan9) && !ts_omit_ssh
|
||||||
|
|
||||||
package ipnlocal
|
package ipnlocal
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) Tailscale Inc & AUTHORS
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
// SPDX-License-Identifier: BSD-3-Clause
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
//go:build ios || android || (!linux && !darwin && !freebsd && !openbsd && !plan9)
|
//go:build ts_omit_ssh || ios || android || (!linux && !darwin && !freebsd && !openbsd && !plan9)
|
||||||
|
|
||||||
package ipnlocal
|
package ipnlocal
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user