summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMaisem Ali <maisem@tailscale.com>2023-09-02 17:10:38 -0700
committerMaisem Ali <maisem@tailscale.com>2023-09-03 12:57:14 -0700
commita0dadf584dcbb577bb62dec4d12aa1ee4d31ee87 (patch)
tree3691cd403784e3d79061d99dde321dc3329fc849
parent1262df057838bba248ec8e1ace0c148b3f7a3463 (diff)
downloadtailscale-maisem/fix-deadlock.tar.xz
tailscale-maisem/fix-deadlock.zip
ssh/tailssh: remove deprecated local recording envknobmaisem/fix-deadlock
It is now exposed as a bool that must be toggled at compile time. Updates tailscale/corp#9967 Signed-off-by: Maisem Ali <maisem@tailscale.com>
-rw-r--r--ssh/tailssh/tailssh.go17
1 files changed, 13 insertions, 4 deletions
diff --git a/ssh/tailssh/tailssh.go b/ssh/tailssh/tailssh.go
index 544616643..704591ce5 100644
--- a/ssh/tailssh/tailssh.go
+++ b/ssh/tailssh/tailssh.go
@@ -45,6 +45,7 @@ import (
"tailscale.com/util/clientmetric"
"tailscale.com/util/mak"
"tailscale.com/util/multierr"
+ "tailscale.com/version"
)
var (
@@ -1188,10 +1189,18 @@ func (ss *sshSession) run() {
return
}
-// recordSSHToLocalDisk is a deprecated dev knob to allow recording SSH sessions
-// to local storage. It is only used if there is no recording configured by the
-// coordination server. This will be removed in the future.
-var recordSSHToLocalDisk = envknob.RegisterBool("TS_DEBUG_LOG_SSH")
+var debugLogSSH = envknob.RegisterBool("TS_DEBUG_LOG_SSH")
+
+// recordSSHToLocalDisk is a dev knob to allow recording SSH sessions to local
+// storage. It is only used if there is no recording configured by the
+// coordination server. It is only enabled in dev builds for testing, for
+// production use recorders should be configured by the coordination server.
+func recordSSHToLocalDisk() bool {
+ if !version.GetMeta().IsDev {
+ return false
+ }
+ return debugLogSSH()
+}
// recorders returns the list of recorders to use for this session.
// If the final action has a non-empty list of recorders, that list is