Skip to content

Commit

Permalink
ssh/test: delete TestInvalidTerminalMode
Browse files Browse the repository at this point in the history
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 <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
mwhudson committed Aug 29, 2019
1 parent 60c769a commit 9756ffd
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions ssh/test/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9756ffd

Please sign in to comment.