diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-11-19 14:25:58 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2021-11-19 14:26:03 -0500 |
commit | 44b240470270021e2680afe9de62e5096067a1bf (patch) | |
tree | eae48e206f340a2695b1f54582fb3b28fc7cad2d /vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin | |
parent | 2755d0255c94ac2ef797636935f83e3351d4d5af (diff) | |
download | podman-44b240470270021e2680afe9de62e5096067a1bf.tar.gz podman-44b240470270021e2680afe9de62e5096067a1bf.tar.bz2 podman-44b240470270021e2680afe9de62e5096067a1bf.zip |
Bump github.com/rootless-containers/rootlesskit from 0.14.5 to 0.14.6
Bumps [github.com/rootless-containers/rootlesskit](https://github.com/rootless-containers/rootlesskit) from 0.14.5 to 0.14.6.
- [Release notes](https://github.com/rootless-containers/rootlesskit/releases)
- [Commits](rootless-containers/rootlesskit@v0.14.5...v0.14.6)
---
updated-dependencies:
- dependency-name: github.com/rootless-containers/rootlesskit
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin')
4 files changed, 21 insertions, 23 deletions
diff --git a/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/child/child.go b/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/child/child.go index 05dc0303c..5d1f33f08 100644 --- a/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/child/child.go +++ b/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/child/child.go @@ -1,13 +1,14 @@ package child import ( + "errors" + "fmt" "io" "net" "os" "strconv" "strings" - "github.com/pkg/errors" "golang.org/x/sys/unix" "github.com/rootless-containers/rootlesskit/pkg/msgutil" @@ -76,7 +77,6 @@ func (d *childDriver) RunChildDriver(opaque map[string]string, quit <-chan struc c.Close() }() } - return nil } func (d *childDriver) routine(c *net.UnixConn) error { @@ -90,7 +90,7 @@ func (d *childDriver) routine(c *net.UnixConn) error { case msg.RequestTypeConnect: return d.handleConnectRequest(c, &req) default: - return errors.Errorf("unknown request type %q", req.Type) + return fmt.Errorf("unknown request type %q", req.Type) } } @@ -108,7 +108,7 @@ func (d *childDriver) handleConnectRequest(c *net.UnixConn, req *msg.Request) er case "udp4": case "udp6": default: - return errors.Errorf("unknown proto: %q", req.Proto) + return fmt.Errorf("unknown proto: %q", req.Proto) } // dialProto does not need "4", "6" suffix dialProto := strings.TrimSuffix(strings.TrimSuffix(req.Proto, "6"), "4") @@ -119,7 +119,7 @@ func (d *childDriver) handleConnectRequest(c *net.UnixConn, req *msg.Request) er } else { p := net.ParseIP(ip) if p == nil { - return errors.Errorf("invalid IP: %q", ip) + return fmt.Errorf("invalid IP: %q", ip) } ip = p.String() } @@ -130,7 +130,7 @@ func (d *childDriver) handleConnectRequest(c *net.UnixConn, req *msg.Request) er defer targetConn.Close() // no effect on duplicated FD targetConnFiler, ok := targetConn.(filer) if !ok { - return errors.Errorf("unknown target connection: %+v", targetConn) + return fmt.Errorf("unknown target connection: %+v", targetConn) } targetConnFile, err := targetConnFiler.File() if err != nil { diff --git a/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/msg/msg.go b/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/msg/msg.go index a60d99bd9..31080609a 100644 --- a/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/msg/msg.go +++ b/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/msg/msg.go @@ -1,10 +1,11 @@ package msg import ( + "errors" + "fmt" "net" "time" - "github.com/pkg/errors" "golang.org/x/sys/unix" "github.com/rootless-containers/rootlesskit/pkg/msgutil" @@ -78,7 +79,7 @@ func ConnectToChild(c *net.UnixConn, spec port.Spec) (int, error) { return 0, err } if oobN != oobSpace { - return 0, errors.Errorf("expected OOB space %d, got %d", oobSpace, oobN) + return 0, fmt.Errorf("expected OOB space %d, got %d", oobSpace, oobN) } oob = oob[:oobN] fd, err := parseFDFromOOB(oob) @@ -126,7 +127,7 @@ func parseFDFromOOB(oob []byte) (int, error) { return 0, err } if len(scms) != 1 { - return 0, errors.Errorf("unexpected scms: %v", scms) + return 0, fmt.Errorf("unexpected scms: %v", scms) } scm := scms[0] fds, err := unix.ParseUnixRights(&scm) @@ -134,7 +135,7 @@ func parseFDFromOOB(oob []byte) (int, error) { return 0, err } if len(fds) != 1 { - return 0, errors.Errorf("unexpected fds: %v", fds) + return 0, fmt.Errorf("unexpected fds: %v", fds) } return fds[0], nil } diff --git a/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/parent.go b/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/parent.go index c6eecc826..1c53e26a6 100644 --- a/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/parent.go +++ b/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/parent.go @@ -2,9 +2,9 @@ package parent import ( "context" + "errors" "fmt" "io" - "io/ioutil" "net" "os" "path/filepath" @@ -14,8 +14,6 @@ import ( "syscall" "time" - "github.com/pkg/errors" - "github.com/rootless-containers/rootlesskit/pkg/api" "github.com/rootless-containers/rootlesskit/pkg/port" "github.com/rootless-containers/rootlesskit/pkg/port/builtin/msg" @@ -32,10 +30,10 @@ func NewDriver(logWriter io.Writer, stateDir string) (port.ParentDriver, error) childReadyPipePath := filepath.Join(stateDir, ".bp-ready.pipe") // remove the path just in case the previous rootlesskit instance crashed if err := os.RemoveAll(childReadyPipePath); err != nil { - return nil, errors.Wrapf(err, "cannot remove %s", childReadyPipePath) + return nil, fmt.Errorf("cannot remove %s: %w", childReadyPipePath, err) } if err := syscall.Mkfifo(childReadyPipePath, 0600); err != nil { - return nil, errors.Wrapf(err, "cannot mkfifo %s", childReadyPipePath) + return nil, fmt.Errorf("cannot mkfifo %s: %w", childReadyPipePath, err) } d := driver{ logWriter: logWriter, @@ -79,7 +77,7 @@ func (d *driver) RunParentDriver(initComplete chan struct{}, quit <-chan struct{ if err != nil { return err } - if _, err = ioutil.ReadAll(childReadyPipeR); err != nil { + if _, err = io.ReadAll(childReadyPipeR); err != nil { return err } childReadyPipeR.Close() @@ -110,7 +108,7 @@ func annotateEPERM(origErr error, spec port.Spec) error { // Read "net.ipv4.ip_unprivileged_port_start" value (typically 1024) // TODO: what for IPv6? // NOTE: sync.Once should not be used here - b, e := ioutil.ReadFile("/proc/sys/net/ipv4/ip_unprivileged_port_start") + b, e := os.ReadFile("/proc/sys/net/ipv4/ip_unprivileged_port_start") if e != nil { return origErr } @@ -129,7 +127,7 @@ func annotateEPERM(origErr error, spec port.Spec) error { text += ", or set CAP_NET_BIND_SERVICE on rootlesskit binary" } text += fmt.Sprintf(", or choose a larger port number (>= %d)", start) - return errors.Wrap(origErr, text) + return fmt.Errorf(text+": %w", origErr) } func (d *driver) AddPort(ctx context.Context, spec port.Spec) (*port.Status, error) { @@ -152,7 +150,7 @@ func (d *driver) AddPort(ctx context.Context, spec port.Spec) (*port.Status, err } return errors.New("routineStoppedCh was closed without sending data?") case <-ctx.Done(): - return errors.Wrap(err, "timed out while waiting for routineStoppedCh after closing routineStopCh") + return fmt.Errorf("timed out while waiting for routineStoppedCh after closing routineStopCh: %w", err) } } switch spec.Proto { @@ -198,7 +196,7 @@ func (d *driver) RemovePort(ctx context.Context, id int) error { defer d.mu.Unlock() stop, ok := d.stoppers[id] if !ok { - return errors.Errorf("unknown id: %d", id) + return fmt.Errorf("unknown id: %d", id) } if _, ok := ctx.Deadline(); !ok { var cancel context.CancelFunc diff --git a/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/udp/udp.go b/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/udp/udp.go index 67062117a..47f3a6461 100644 --- a/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/udp/udp.go +++ b/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/udp/udp.go @@ -1,13 +1,12 @@ package udp import ( + "fmt" "io" "net" "os" "strconv" - "github.com/pkg/errors" - "github.com/rootless-containers/rootlesskit/pkg/port" "github.com/rootless-containers/rootlesskit/pkg/port/builtin/msg" "github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/udp/udpproxy" @@ -39,7 +38,7 @@ func Run(socketPath string, spec port.Spec, stopCh <-chan struct{}, stoppedCh ch } uc, ok := fc.(*net.UDPConn) if !ok { - return nil, errors.Errorf("file conn doesn't implement *net.UDPConn: %+v", fc) + return nil, fmt.Errorf("file conn doesn't implement *net.UDPConn: %+v", fc) } return uc, nil }, |