From f446f59d7105654b92de38489948072360099a2e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 04:17:44 +0000 Subject: [PATCH] fix(deps): update github.com/docker/go-plugins-helpers digest to 45e2431 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- .../go-plugins-helpers/sdk/spec_file_generator.go | 3 +-- .../docker/go-plugins-helpers/sdk/unix_listener.go | 2 +- .../sdk/unix_listener_nosystemd.go | 4 ++-- .../go-plugins-helpers/sdk/unix_listener_systemd.go | 4 ++-- .../sdk/unix_listener_unsupported.go | 8 ++------ .../go-plugins-helpers/sdk/windows_listener.go | 13 ++++++------- .../sdk/windows_listener_unsupported.go | 8 ++------ vendor/modules.txt | 2 +- 10 files changed, 20 insertions(+), 30 deletions(-) diff --git a/go.mod b/go.mod index fd12d409032e..4b7bbeb27d5a 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( github.com/docker/distribution v2.8.3+incompatible github.com/docker/docker v27.1.1+incompatible github.com/docker/go-connections v0.5.0 - github.com/docker/go-plugins-helpers v0.0.0-20211224144127-6eecb7beb651 + github.com/docker/go-plugins-helpers v0.0.0-20240701071450-45e2431495c8 github.com/docker/go-units v0.5.0 github.com/godbus/dbus/v5 v5.1.1-0.20230522191255-76236955d466 github.com/google/gofuzz v1.2.0 diff --git a/go.sum b/go.sum index 8cb6b4717e01..1f1a10a643ef 100644 --- a/go.sum +++ b/go.sum @@ -144,8 +144,8 @@ github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= -github.com/docker/go-plugins-helpers v0.0.0-20211224144127-6eecb7beb651 h1:YcvzLmdrP/b8kLAGJ8GT7bdncgCAiWxJZIlt84D+RJg= -github.com/docker/go-plugins-helpers v0.0.0-20211224144127-6eecb7beb651/go.mod h1:LFyLie6XcDbyKGeVK6bHe+9aJTYCxWLBg5IrJZOaXKA= +github.com/docker/go-plugins-helpers v0.0.0-20240701071450-45e2431495c8 h1:IMfrF5LCzP2Vhw7j4IIH3HxPsCLuZYjDqFAM/C88ulg= +github.com/docker/go-plugins-helpers v0.0.0-20240701071450-45e2431495c8/go.mod h1:LFyLie6XcDbyKGeVK6bHe+9aJTYCxWLBg5IrJZOaXKA= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= diff --git a/vendor/github.com/docker/go-plugins-helpers/sdk/spec_file_generator.go b/vendor/github.com/docker/go-plugins-helpers/sdk/spec_file_generator.go index bc8cfc6445bf..c9cdbb2f49b5 100644 --- a/vendor/github.com/docker/go-plugins-helpers/sdk/spec_file_generator.go +++ b/vendor/github.com/docker/go-plugins-helpers/sdk/spec_file_generator.go @@ -2,7 +2,6 @@ package sdk import ( "fmt" - "io/ioutil" "os" "path/filepath" ) @@ -50,7 +49,7 @@ func writeSpecFile(name, address, pluginSpecDir string, proto protocol) (string, specFileDir := filepath.Join(pluginSpecDir, name+".spec") url := string(proto) + "://" + address - if err := ioutil.WriteFile(specFileDir, []byte(url), 0644); err != nil { + if err := os.WriteFile(specFileDir, []byte(url), 0644); err != nil { return "", err } diff --git a/vendor/github.com/docker/go-plugins-helpers/sdk/unix_listener.go b/vendor/github.com/docker/go-plugins-helpers/sdk/unix_listener.go index 54b9a6d3163d..00bc911f67b4 100644 --- a/vendor/github.com/docker/go-plugins-helpers/sdk/unix_listener.go +++ b/vendor/github.com/docker/go-plugins-helpers/sdk/unix_listener.go @@ -1,4 +1,4 @@ -// +build linux freebsd +//go:build linux || freebsd package sdk diff --git a/vendor/github.com/docker/go-plugins-helpers/sdk/unix_listener_nosystemd.go b/vendor/github.com/docker/go-plugins-helpers/sdk/unix_listener_nosystemd.go index a798b872237f..1a9247b0fd41 100644 --- a/vendor/github.com/docker/go-plugins-helpers/sdk/unix_listener_nosystemd.go +++ b/vendor/github.com/docker/go-plugins-helpers/sdk/unix_listener_nosystemd.go @@ -1,10 +1,10 @@ -// +build linux freebsd -// +build nosystemd +//go:build (linux || freebsd) && nosystemd package sdk import "net" +// FIXME(thaJeztah): this code was added in https://github.com/docker/go-plugins-helpers/commit/008703b825c10311af1840deeaf5f4769df7b59e, but is not used anywhere func setupSocketActivation() (net.Listener, error) { return nil, nil } diff --git a/vendor/github.com/docker/go-plugins-helpers/sdk/unix_listener_systemd.go b/vendor/github.com/docker/go-plugins-helpers/sdk/unix_listener_systemd.go index 5d5d8f4275db..59c53bf11d13 100644 --- a/vendor/github.com/docker/go-plugins-helpers/sdk/unix_listener_systemd.go +++ b/vendor/github.com/docker/go-plugins-helpers/sdk/unix_listener_systemd.go @@ -1,5 +1,4 @@ -// +build linux freebsd -// +build !nosystemd +//go:build (linux || freebsd) && !nosystemd package sdk @@ -25,6 +24,7 @@ func isRunningSystemd() bool { return fi.IsDir() } +// FIXME(thaJeztah): this code was added in https://github.com/docker/go-plugins-helpers/commit/008703b825c10311af1840deeaf5f4769df7b59e, but is not used anywhere func setupSocketActivation() (net.Listener, error) { if !isRunningSystemd() { return nil, nil diff --git a/vendor/github.com/docker/go-plugins-helpers/sdk/unix_listener_unsupported.go b/vendor/github.com/docker/go-plugins-helpers/sdk/unix_listener_unsupported.go index 344cf751b0be..a472f06ee7a2 100644 --- a/vendor/github.com/docker/go-plugins-helpers/sdk/unix_listener_unsupported.go +++ b/vendor/github.com/docker/go-plugins-helpers/sdk/unix_listener_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!freebsd +//go:build !linux && !freebsd package sdk @@ -7,10 +7,6 @@ import ( "net" ) -var ( - errOnlySupportedOnLinuxAndFreeBSD = errors.New("unix socket creation is only supported on Linux and FreeBSD") -) - func newUnixListener(pluginName string, gid int) (net.Listener, string, error) { - return nil, "", errOnlySupportedOnLinuxAndFreeBSD + return nil, "", errors.New("unix socket creation is only supported on Linux and FreeBSD") } diff --git a/vendor/github.com/docker/go-plugins-helpers/sdk/windows_listener.go b/vendor/github.com/docker/go-plugins-helpers/sdk/windows_listener.go index b5deaba6d28c..afb0f0b6b6ba 100644 --- a/vendor/github.com/docker/go-plugins-helpers/sdk/windows_listener.go +++ b/vendor/github.com/docker/go-plugins-helpers/sdk/windows_listener.go @@ -1,4 +1,4 @@ -// +build windows +//go:build windows package sdk @@ -14,20 +14,19 @@ import ( // Named pipes use Windows Security Descriptor Definition Language to define ACL. Following are // some useful definitions. const ( - // This will set permissions for everyone to have full access + // AllowEveryone grants full access permissions for everyone. AllowEveryone = "S:(ML;;NW;;;LW)D:(A;;0x12019f;;;WD)" - // This will set permissions for Service, System, Adminstrator group and account to have full access + // AllowServiceSystemAdmin grants full access permissions for Service, System, Administrator group and account. AllowServiceSystemAdmin = "D:(A;ID;FA;;;SY)(A;ID;FA;;;BA)(A;ID;FA;;;LA)(A;ID;FA;;;LS)" ) func newWindowsListener(address, pluginName, daemonRoot string, pipeConfig *WindowsPipeConfig) (net.Listener, string, error) { - winioPipeConfig := winio.PipeConfig{ + listener, err := winio.ListenPipe(address, &winio.PipeConfig{ SecurityDescriptor: pipeConfig.SecurityDescriptor, InputBufferSize: pipeConfig.InBufferSize, OutputBufferSize: pipeConfig.OutBufferSize, - } - listener, err := winio.ListenPipe(address, &winioPipeConfig) + }) if err != nil { return nil, "", err } @@ -48,7 +47,7 @@ func newWindowsListener(address, pluginName, daemonRoot string, pipeConfig *Wind func windowsCreateDirectoryWithACL(name string) error { sa := syscall.SecurityAttributes{Length: 0} - sddl := "D:P(A;OICI;GA;;;BA)(A;OICI;GA;;;SY)" + const sddl = "D:P(A;OICI;GA;;;BA)(A;OICI;GA;;;SY)" sd, err := winio.SddlToSecurityDescriptor(sddl) if err != nil { return &os.PathError{Op: "mkdir", Path: name, Err: err} diff --git a/vendor/github.com/docker/go-plugins-helpers/sdk/windows_listener_unsupported.go b/vendor/github.com/docker/go-plugins-helpers/sdk/windows_listener_unsupported.go index 0f5e113c1fc3..1b187d0d8c52 100644 --- a/vendor/github.com/docker/go-plugins-helpers/sdk/windows_listener_unsupported.go +++ b/vendor/github.com/docker/go-plugins-helpers/sdk/windows_listener_unsupported.go @@ -1,4 +1,4 @@ -// +build !windows +//go:build !windows package sdk @@ -7,12 +7,8 @@ import ( "net" ) -var ( - errOnlySupportedOnWindows = errors.New("named pipe creation is only supported on Windows") -) - func newWindowsListener(address, pluginName, daemonRoot string, pipeConfig *WindowsPipeConfig) (net.Listener, string, error) { - return nil, "", errOnlySupportedOnWindows + return nil, "", errors.New("named pipe creation is only supported on Windows") } func windowsCreateDirectoryWithACL(name string) error { diff --git a/vendor/modules.txt b/vendor/modules.txt index 442391c64e03..a1250a9a9d76 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -514,7 +514,7 @@ github.com/docker/docker-credential-helpers/credentials github.com/docker/go-connections/nat github.com/docker/go-connections/sockets github.com/docker/go-connections/tlsconfig -# github.com/docker/go-plugins-helpers v0.0.0-20211224144127-6eecb7beb651 +# github.com/docker/go-plugins-helpers v0.0.0-20240701071450-45e2431495c8 ## explicit github.com/docker/go-plugins-helpers/sdk github.com/docker/go-plugins-helpers/volume