fix(deps): update github.com/docker/go-plugins-helpers digest to 45e2431

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2024-08-01 04:17:44 +00:00
committed by GitHub
parent 737c08224e
commit f446f59d71
10 changed files with 20 additions and 30 deletions

2
go.mod
View File

@ -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

4
go.sum
View File

@ -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=

View File

@ -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
}

View File

@ -1,4 +1,4 @@
// +build linux freebsd
//go:build linux || freebsd
package sdk

View File

@ -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
}

View File

@ -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

View File

@ -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")
}

View File

@ -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}

View File

@ -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 {

2
vendor/modules.txt vendored
View File

@ -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