Skip to content

x/sys: golang.org/x/crypto/ssh/terminal fail for windows #34461

Closed
@le0pard

Description

@le0pard

What version of Go are you using (go version)?

$ go version
go version go1.13 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE="auto"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/travis/.cache/go-build"
GOENV="/home/travis/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/travis/gopath"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/travis/.gimme/versions/go1.13.linux.amd64"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/travis/.gimme/versions/go1.13.linux.amd64/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build020438651=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Building https://github.com/le0pard/certonid

Result: https://travis-ci.com/le0pard/certonid/jobs/238002946

--> windows/amd64 error: exit status 2
Stderr: # golang.org/x/crypto/ssh/terminal
../../../golang.org/x/crypto/ssh/terminal/util_windows.go:97:7: assignment mismatch: 2 variables but "golang.org/x/sys/windows".GetCurrentProcess returns 1 values

What did you expect to see?

No errors for windows build.

What did you see instead?

Errors. Reason looks like in this commit:

golang/sys@2dccfee

It change return values from 2 to 1. This break this code: https://github.com/golang/crypto/blob/master/ssh/terminal/util_windows.go#L97

Activity

added this to the Unreleased milestone on Sep 22, 2019
gopherbot

gopherbot commented on Sep 22, 2019

@gopherbot
Contributor

Change https://golang.org/cl/196897 mentions this issue: ssh/terminal: account for win32 api changes

zx2c4

zx2c4 commented on Sep 22, 2019

@zx2c4
Contributor

Trivial fix on its way in that CL.

toothrot

toothrot commented on Sep 23, 2019

@toothrot
Contributor

Looks like a deliberate breaking API change in x/sys/windows

/cc @FiloSottile for x/crypto
/cc @alexbrainman @bradfitz Do we know other places this could be broken in our x/ repos from golang/sys@2dccfee?

added
NeedsFixThe path to resolution is known, but the work has not been done.
on Sep 23, 2019
added 3 commits that reference this issue on Oct 13, 2019
2a0bddd
a0c6900
b73519f
locked and limited conversation to collaborators on Sep 22, 2020
added a commit that references this issue on Oct 16, 2020
cf60e62
added 3 commits that reference this issue on Mar 28, 2022
4bf6edb
0ac1127
7fe1b71
added a commit that references this issue on Feb 16, 2023
5c0ab4f
added a commit that references this issue on Sep 15, 2023
e9821ae
added a commit that references this issue on Jul 1, 2024
fc08d85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @toothrot@zx2c4@le0pard@gopherbot

        Issue actions

          x/sys: golang.org/x/crypto/ssh/terminal fail for windows · Issue #34461 · golang/go