From 9756ffdc24725223350eb3266ffb92590d28f278 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Thu, 29 Aug 2019 11:00:48 +1200 Subject: [PATCH] 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 TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- ssh/test/session_test.go | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/ssh/test/session_test.go b/ssh/test/session_test.go index 004b320..e363869 100644 --- a/ssh/test/session_test.go +++ b/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