From 849a8a840a33092f9040c1d2d57354638cc6b83a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Sep 2022 22:24:38 +0000 Subject: [PATCH 1/2] build(deps): bump github.com/docker/docker Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.17+incompatible to 20.10.18+incompatible. - [Release notes](https://github.com/docker/docker/releases) - [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md) - [Commits](https://github.com/docker/docker/compare/v20.10.17...v20.10.18) --- updated-dependencies: - dependency-name: github.com/docker/docker dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 17c80055d..94c6b78d6 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/buildpacks/imgutil v0.0.0-20220527150729-7a271a852e31 github.com/buildpacks/lifecycle v0.14.1 github.com/docker/cli v20.10.17+incompatible - github.com/docker/docker v20.10.17+incompatible + github.com/docker/docker v20.10.18+incompatible github.com/docker/go-connections v0.4.0 github.com/dustin/go-humanize v1.0.0 github.com/gdamore/tcell/v2 v2.5.3 diff --git a/go.sum b/go.sum index dbb0945e2..a8113a2c5 100644 --- a/go.sum +++ b/go.sum @@ -470,8 +470,9 @@ github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6 github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.18+incompatible h1:SN84VYXTBNGn92T/QwIRPlum9zfemfitN7pbsp26WSc= +github.com/docker/docker v20.10.18+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= github.com/docker/docker-credential-helpers v0.6.4 h1:axCks+yV+2MR3/kZhAmy07yC56WZ2Pwu/fKWtKuZB0o= github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c= From 957115f82950bfe0475ef0642ba515893e7972ad Mon Sep 17 00:00:00 2001 From: Matej Vasek Date: Sat, 10 Sep 2022 22:43:03 +0200 Subject: [PATCH 2/2] chore: change lib handling npipes Signed-off-by: Matej Vasek --- go.mod | 5 ++--- go.sum | 3 --- internal/sshdialer/ssh_agent_windows.go | 4 ++-- internal/sshdialer/windows_test.go | 6 +++--- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 17c80055d..458dadbec 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/buildpacks/pack require ( github.com/BurntSushi/toml v1.2.0 github.com/Masterminds/semver v1.5.0 + github.com/Microsoft/go-winio v0.5.2 github.com/apex/log v1.9.0 github.com/buildpacks/imgutil v0.0.0-20220527150729-7a271a852e31 github.com/buildpacks/lifecycle v0.14.1 @@ -32,7 +33,6 @@ require ( golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 golang.org/x/oauth2 v0.0.0-20220718184931-c8730f7fcb92 golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 - gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce gopkg.in/yaml.v3 v3.0.1 ) @@ -47,7 +47,6 @@ require ( github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/Microsoft/go-winio v0.5.2 // indirect github.com/Microsoft/hcsshim v0.9.2 // indirect github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect github.com/acomagu/bufpipe v1.0.3 // indirect @@ -108,7 +107,7 @@ require ( github.com/xanzy/ssh-agent v0.3.1 // indirect go.opencensus.io v0.23.0 // indirect golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect - golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f // indirect + golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect golang.org/x/text v0.3.7 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/go.sum b/go.sum index dbb0945e2..a00a36cd1 100644 --- a/go.sum +++ b/go.sum @@ -1617,7 +1617,6 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2120,8 +2119,6 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.63.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= diff --git a/internal/sshdialer/ssh_agent_windows.go b/internal/sshdialer/ssh_agent_windows.go index b6000ef8a..c2780e4d2 100644 --- a/internal/sshdialer/ssh_agent_windows.go +++ b/internal/sshdialer/ssh_agent_windows.go @@ -4,12 +4,12 @@ import ( "net" "strings" - "gopkg.in/natefinch/npipe.v2" + "github.com/Microsoft/go-winio" ) func dialSSHAgent(addr string) (net.Conn, error) { if strings.Contains(addr, "\\pipe\\") { - return npipe.Dial(addr) + return winio.DialPipe(addr, nil) } return net.Dial("unix", addr) } diff --git a/internal/sshdialer/windows_test.go b/internal/sshdialer/windows_test.go index 4909d0d01..14cfb42bd 100644 --- a/internal/sshdialer/windows_test.go +++ b/internal/sshdialer/windows_test.go @@ -9,8 +9,8 @@ import ( "os/user" "strings" + "github.com/Microsoft/go-winio" "github.com/hectane/go-acl" - "gopkg.in/natefinch/npipe.v2" ) func fixupPrivateKeyMod(path string) { @@ -32,11 +32,11 @@ func fixupPrivateKeyMod(path string) { func listen(addr string) (net.Listener, error) { if strings.Contains(addr, "\\pipe\\") { - return npipe.Listen(addr) + return winio.ListenPipe(addr, nil) } return net.Listen("unix", addr) } func isErrClosed(err error) bool { - return errors.Is(err, net.ErrClosed) || errors.Is(err, npipe.ErrClosed) + return errors.Is(err, net.ErrClosed) || errors.Is(err, winio.ErrPipeListenerClosed) || errors.Is(err, winio.ErrFileClosed) }