Преглед изворни кода

ssh/test: delete TestInvalidTerminalMode

This test just tests the behaviour of the host sshd in the face of
invalid terminal modes, and the RFCs say that the server "MAY" ignore
such modes (and newer openssh does in fact ignore these modes rather
than terminating the connection).

Fixes golang/go#33919

Change-Id: I3f915aed22651e2eb33ec34044af8b125aeb82fa
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/192217
Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Michael Hudson-Doyle пре 6 година
родитељ
комит
9756ffdc24
1 измењених фајлова са 0 додато и 22 уклоњено
  1. 0 22
      ssh/test/session_test.go

+ 0 - 22
ssh/test/session_test.go

@@ -217,28 +217,6 @@ func TestKeyChange(t *testing.T) {
 	}
 }
 
-func TestInvalidTerminalMode(t *testing.T) {
-	if runtime.GOOS == "aix" {
-		// On AIX, sshd cannot acquire /dev/pts/* if launched as
-		// a non-root user.
-		t.Skipf("skipping on %s", runtime.GOOS)
-	}
-	server := newServer(t)
-	defer server.Shutdown()
-	conn := server.Dial(clientConfig())
-	defer conn.Close()
-
-	session, err := conn.NewSession()
-	if err != nil {
-		t.Fatalf("session failed: %v", err)
-	}
-	defer session.Close()
-
-	if err = session.RequestPty("vt100", 80, 40, ssh.TerminalModes{255: 1984}); err == nil {
-		t.Fatalf("req-pty failed: successful request with invalid mode")
-	}
-}
-
 func TestValidTerminalMode(t *testing.T) {
 	if runtime.GOOS == "aix" {
 		// On AIX, sshd cannot acquire /dev/pts/* if launched as