From a63995666dc78ae33a3c94b1dc3af915328f46bf Mon Sep 17 00:00:00 2001 From: Michael Crenshaw Date: Thu, 7 Jul 2022 14:52:44 -0400 Subject: [PATCH] apply suggestions Signed-off-by: Michael Crenshaw --- docs/operator-manual/argocd-cm.yaml | 2 +- server/application/websocket.go | 6 +++--- util/settings/settings.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/operator-manual/argocd-cm.yaml b/docs/operator-manual/argocd-cm.yaml index 45343f5a4a48c..c5b2723614845 100644 --- a/docs/operator-manual/argocd-cm.yaml +++ b/docs/operator-manual/argocd-cm.yaml @@ -289,5 +289,5 @@ data: # exec.enabled indicates whether the UI exec feature is enabled. It is disabled by default. exec.enabled: "false" - # exec.shells determines which shells are allowed for `exec`, and in which order they are attempted + # exec.shells restricts which shells are allowed for `exec`, and in which order they are attempted exec.shells: "bash,sh,powershell,cmd" diff --git a/server/application/websocket.go b/server/application/websocket.go index d54fe5a118808..a5a15b05df9f9 100644 --- a/server/application/websocket.go +++ b/server/application/websocket.go @@ -27,7 +27,7 @@ type terminalSession struct { sizeChan chan remotecommand.TerminalSize doneChan chan struct{} tty bool - readMu sync.Mutex + readLock sync.Mutex } // newTerminalSession create terminalSession @@ -62,9 +62,9 @@ func (t *terminalSession) Next() *remotecommand.TerminalSize { // Read called in a loop from remotecommand as long as the process is running func (t *terminalSession) Read(p []byte) (int, error) { - t.readMu.Lock() + t.readLock.Lock() _, message, err := t.wsConn.ReadMessage() - t.readMu.Unlock() + t.readLock.Unlock() if err != nil { log.Errorf("read message err: %v", err) return copy(p, EndOfTransmission), err diff --git a/util/settings/settings.go b/util/settings/settings.go index 8211e156daedf..c0beeffbe93ff 100644 --- a/util/settings/settings.go +++ b/util/settings/settings.go @@ -99,7 +99,7 @@ type ArgoCDSettings struct { ServerRBACLogEnforceEnable bool `json:"serverRBACLogEnforceEnable"` // ExecEnabled indicates whether the UI exec feature is enabled ExecEnabled bool `json:"execEnabled"` - // ExecShells determines which shells are allowed for `exec` and in which order they are tried + // ExecShells restricts which shells are allowed for `exec` and in which order they are tried ExecShells []string `json:"execShells"` // TrackingMethod defines the resource tracking method to be used TrackingMethod string `json:"application.resourceTrackingMethod,omitempty"`