From c9eca9451a05fc74df24f1f00bf3955caa5e4eb6 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 24 Feb 2022 12:27:42 -0800 Subject: [PATCH] ssh: make it build on darwin For local dev testing initially. Product-wise, it'll probably only be workable on the two unsandboxed builds. Updates #3802 Change-Id: Ic352f966e7fb29aff897217d79b383131bf3f92b Signed-off-by: Brad Fitzpatrick --- cmd/tailscaled/depaware.txt | 14 +++++++------- ipn/ipnlocal/ssh.go | 4 ++-- ipn/ipnlocal/ssh_stub.go | 3 +-- ssh/tailssh/tailssh.go | 4 ++-- ssh/tailssh/tailssh_test.go | 4 ++-- wgengine/netstack/ssh.go | 4 ++-- 6 files changed, 16 insertions(+), 17 deletions(-) diff --git a/cmd/tailscaled/depaware.txt b/cmd/tailscaled/depaware.txt index d4988e57d..9070329fa 100644 --- a/cmd/tailscaled/depaware.txt +++ b/cmd/tailscaled/depaware.txt @@ -3,7 +3,7 @@ tailscale.com/cmd/tailscaled dependencies: (generated by github.com/tailscale/de W 💣 github.com/alexbrainman/sspi from github.com/alexbrainman/sspi/internal/common+ W github.com/alexbrainman/sspi/internal/common from github.com/alexbrainman/sspi/negotiate W 💣 github.com/alexbrainman/sspi/negotiate from tailscale.com/net/tshttpproxy - L github.com/anmitsu/go-shlex from github.com/gliderlabs/ssh + LD github.com/anmitsu/go-shlex from github.com/gliderlabs/ssh L github.com/aws/aws-sdk-go-v2 from github.com/aws/aws-sdk-go-v2/internal/ini L github.com/aws/aws-sdk-go-v2/aws from github.com/aws/aws-sdk-go-v2/aws/middleware+ L github.com/aws/aws-sdk-go-v2/aws/arn from tailscale.com/ipn/store/aws @@ -61,8 +61,8 @@ tailscale.com/cmd/tailscaled dependencies: (generated by github.com/tailscale/de L github.com/aws/smithy-go/transport/http/internal/io from github.com/aws/smithy-go/transport/http L github.com/aws/smithy-go/waiter from github.com/aws/aws-sdk-go-v2/service/ssm L github.com/coreos/go-iptables/iptables from tailscale.com/wgengine/router - L 💣 github.com/creack/pty from tailscale.com/ssh/tailssh - L github.com/gliderlabs/ssh from tailscale.com/ssh/tailssh + LD 💣 github.com/creack/pty from tailscale.com/ssh/tailssh + LD github.com/gliderlabs/ssh from tailscale.com/ssh/tailssh W 💣 github.com/go-ole/go-ole from github.com/go-ole/go-ole/oleutil+ W 💣 github.com/go-ole/go-ole/oleutil from tailscale.com/wgengine/winnet L 💣 github.com/godbus/dbus/v5 from tailscale.com/net/dns @@ -219,7 +219,7 @@ tailscale.com/cmd/tailscaled dependencies: (generated by github.com/tailscale/de tailscale.com/portlist from tailscale.com/ipn/ipnlocal tailscale.com/safesocket from tailscale.com/client/tailscale+ tailscale.com/smallzstd from tailscale.com/ipn/ipnserver+ - L 💣 tailscale.com/ssh/tailssh from tailscale.com/wgengine/netstack + LD 💣 tailscale.com/ssh/tailssh from tailscale.com/wgengine/netstack 💣 tailscale.com/syncs from tailscale.com/control/controlknobs+ tailscale.com/tailcfg from tailscale.com/client/tailscale+ W tailscale.com/tsconst from tailscale.com/net/interfaces @@ -272,19 +272,19 @@ tailscale.com/cmd/tailscaled dependencies: (generated by github.com/tailscale/de golang.org/x/crypto/acme from tailscale.com/ipn/localapi golang.org/x/crypto/blake2b from golang.org/x/crypto/nacl/box golang.org/x/crypto/blake2s from golang.zx2c4.com/wireguard/device - L golang.org/x/crypto/blowfish from golang.org/x/crypto/ssh/internal/bcrypt_pbkdf + LD golang.org/x/crypto/blowfish from golang.org/x/crypto/ssh/internal/bcrypt_pbkdf golang.org/x/crypto/chacha20 from golang.org/x/crypto/chacha20poly1305+ golang.org/x/crypto/chacha20poly1305 from crypto/tls+ golang.org/x/crypto/cryptobyte from crypto/ecdsa+ golang.org/x/crypto/cryptobyte/asn1 from crypto/ecdsa+ golang.org/x/crypto/curve25519 from crypto/tls+ - L golang.org/x/crypto/ed25519 from golang.org/x/crypto/ssh + LD golang.org/x/crypto/ed25519 from golang.org/x/crypto/ssh golang.org/x/crypto/hkdf from crypto/tls golang.org/x/crypto/nacl/box from tailscale.com/types/key golang.org/x/crypto/nacl/secretbox from golang.org/x/crypto/nacl/box golang.org/x/crypto/poly1305 from golang.org/x/crypto/chacha20poly1305+ golang.org/x/crypto/salsa20/salsa from golang.org/x/crypto/nacl/box+ - L golang.org/x/crypto/ssh from github.com/gliderlabs/ssh+ + LD golang.org/x/crypto/ssh from github.com/gliderlabs/ssh+ golang.org/x/net/bpf from github.com/mdlayher/netlink+ golang.org/x/net/dns/dnsmessage from net+ golang.org/x/net/http/httpguts from net/http+ diff --git a/ipn/ipnlocal/ssh.go b/ipn/ipnlocal/ssh.go index 4a588dc86..87f303127 100644 --- a/ipn/ipnlocal/ssh.go +++ b/ipn/ipnlocal/ssh.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build linux -// +build linux +//go:build linux || (darwin && !ios) +// +build linux darwin,!ios package ipnlocal diff --git a/ipn/ipnlocal/ssh_stub.go b/ipn/ipnlocal/ssh_stub.go index e1e56b726..00d6c2c70 100644 --- a/ipn/ipnlocal/ssh_stub.go +++ b/ipn/ipnlocal/ssh_stub.go @@ -2,8 +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 -// +build !linux +//go:build ios || (!linux && !darwin) package ipnlocal diff --git a/ssh/tailssh/tailssh.go b/ssh/tailssh/tailssh.go index 4178c1e06..c99b32532 100644 --- a/ssh/tailssh/tailssh.go +++ b/ssh/tailssh/tailssh.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build linux -// +build linux +//go:build linux || (darwin && !ios) +// +build linux darwin,!ios // Package tailssh is an SSH server integrated into Tailscale. package tailssh diff --git a/ssh/tailssh/tailssh_test.go b/ssh/tailssh/tailssh_test.go index eeb71bc34..252c3ff30 100644 --- a/ssh/tailssh/tailssh_test.go +++ b/ssh/tailssh/tailssh_test.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build linux -// +build linux +//go:build linux || darwin +// +build linux darwin package tailssh diff --git a/wgengine/netstack/ssh.go b/wgengine/netstack/ssh.go index b624e17ab..36a17097c 100644 --- a/wgengine/netstack/ssh.go +++ b/wgengine/netstack/ssh.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build linux -// +build linux +//go:build linux || (darwin && !ios) +// +build linux darwin,!ios package netstack