mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
all: fix spelling mistakes
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
e73657d7aa
commit
d4811f11a0
@@ -29,7 +29,7 @@ type contextReader struct {
|
||||
// consumed.
|
||||
buffered []byte
|
||||
// readErr is a previous read error that was seen while filling buffered. It
|
||||
// should be returned to the caller after bufffered is consumed.
|
||||
// should be returned to the caller after buffered is consumed.
|
||||
readErr error
|
||||
|
||||
mu sync.Mutex // guards ch only
|
||||
@@ -40,7 +40,7 @@ type contextReader struct {
|
||||
ch chan readResult
|
||||
}
|
||||
|
||||
// HasOutstandingRead reports whether there's an oustanding Read call that's
|
||||
// HasOutstandingRead reports whether there's an outstanding Read call that's
|
||||
// either currently blocked in a Read or whose result hasn't been consumed.
|
||||
func (w *contextReader) HasOutstandingRead() bool {
|
||||
w.mu.Lock()
|
||||
@@ -97,14 +97,14 @@ func (w *contextReader) ReadContext(ctx context.Context, p []byte) (n int, err e
|
||||
}
|
||||
}
|
||||
|
||||
// contextReaderSesssion implements ssh.Session, wrapping another
|
||||
// contextReaderSession implements ssh.Session, wrapping another
|
||||
// ssh.Session but changing its Read method to use contextReader.
|
||||
type contextReaderSesssion struct {
|
||||
type contextReaderSession struct {
|
||||
ssh.Session
|
||||
cr *contextReader
|
||||
}
|
||||
|
||||
func (a contextReaderSesssion) Read(p []byte) (n int, err error) {
|
||||
func (a contextReaderSession) Read(p []byte) (n int, err error) {
|
||||
if a.cr.HasOutstandingRead() {
|
||||
return a.cr.ReadContext(context.Background(), p)
|
||||
}
|
||||
|
@@ -2,11 +2,11 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// This file contains the code for the incubator process. Taiscaled
|
||||
// This file contains the code for the incubator process. Tailscaled
|
||||
// launches the incubator as the same user as it was launched as. The
|
||||
// incubator then registers a new session with the OS, sets its UID
|
||||
// and groups to the specified `--uid`, `--gid` and `--groups`, and
|
||||
// then lauches the requested `--cmd`.
|
||||
// then launches the requested `--cmd`.
|
||||
|
||||
//go:build linux || (darwin && !ios)
|
||||
// +build linux darwin,!ios
|
||||
|
@@ -181,7 +181,7 @@ func (c *conn) logf(format string, args ...any) {
|
||||
c.srv.logf(format, args...)
|
||||
}
|
||||
|
||||
// PublicKeyHandler implements ssh.PublicKeyHandler is called by the the
|
||||
// PublicKeyHandler implements ssh.PublicKeyHandler is called by the
|
||||
// ssh.Server when the client presents a public key.
|
||||
func (c *conn) PublicKeyHandler(ctx ssh.Context, pubKey ssh.PublicKey) error {
|
||||
c.mu.Lock()
|
||||
@@ -205,7 +205,7 @@ func (c *conn) PublicKeyHandler(ctx ssh.Context, pubKey ssh.PublicKey) error {
|
||||
var errPubKeyRequired = errors.New("ssh publickey required")
|
||||
|
||||
// NoClientAuthCallback implements gossh.NoClientAuthCallback and is called by
|
||||
// the the ssh.Server when the client first connects with the "none"
|
||||
// the ssh.Server when the client first connects with the "none"
|
||||
// authentication method.
|
||||
func (c *conn) NoClientAuthCallback(cm gossh.ConnMetadata) (*gossh.Permissions, error) {
|
||||
if c.insecureSkipTailscaleAuth {
|
||||
@@ -595,7 +595,7 @@ func (c *conn) handleSessionPostSSHAuth(s ssh.Session) {
|
||||
if cr.HasOutstandingRead() {
|
||||
// There was some buffered input while we were waiting for the policy
|
||||
// decision.
|
||||
s = contextReaderSesssion{s, cr}
|
||||
s = contextReaderSession{s, cr}
|
||||
}
|
||||
|
||||
// Do this check after auth, but before starting the session.
|
||||
@@ -1326,7 +1326,7 @@ func (ss *sshSession) startNewRecording() (*recording, error) {
|
||||
Timestamp: now.Unix(),
|
||||
Env: map[string]string{
|
||||
"TERM": term,
|
||||
// TODO(bradiftz): anything else important?
|
||||
// TODO(bradfitz): anything else important?
|
||||
// including all seems noisey, but maybe we should
|
||||
// for auditing. But first need to break
|
||||
// launchProcess's startWithStdPipes and
|
||||
|
Reference in New Issue
Block a user