diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-01-18 10:04:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-18 10:04:10 -0500 |
commit | 55ad6188b067ba6594819c318dd2ae92dea2f27e (patch) | |
tree | ba30a34e670229237efc607502802848ef3b3d77 /vendor/github.com/opencontainers/runc/libcontainer/utils/cmsg.go | |
parent | 59b1cdf9bb1c97475f369c0ca2b27ce2eaa1a0d4 (diff) | |
parent | 4adf457ff3619fd8b99f025c5ea67b7dac96fea8 (diff) | |
download | podman-55ad6188b067ba6594819c318dd2ae92dea2f27e.tar.gz podman-55ad6188b067ba6594819c318dd2ae92dea2f27e.tar.bz2 podman-55ad6188b067ba6594819c318dd2ae92dea2f27e.zip |
Merge pull request #12900 from containers/dependabot/go_modules/github.com/opencontainers/runc-1.1.0
Bump github.com/opencontainers/runc from 1.0.3 to 1.1.0
Diffstat (limited to 'vendor/github.com/opencontainers/runc/libcontainer/utils/cmsg.go')
-rw-r--r-- | vendor/github.com/opencontainers/runc/libcontainer/utils/cmsg.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/vendor/github.com/opencontainers/runc/libcontainer/utils/cmsg.go b/vendor/github.com/opencontainers/runc/libcontainer/utils/cmsg.go index c8a9364d5..7ef9da21f 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/utils/cmsg.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/utils/cmsg.go @@ -1,5 +1,3 @@ -// +build linux - package utils /* @@ -88,6 +86,11 @@ func SendFd(socket *os.File, name string, fd uintptr) error { if len(name) >= MaxNameLen { return fmt.Errorf("sendfd: filename too long: %s", name) } - oob := unix.UnixRights(int(fd)) - return unix.Sendmsg(int(socket.Fd()), []byte(name), oob, nil, 0) + return SendFds(socket, []byte(name), int(fd)) +} + +// SendFds sends a list of files descriptor and msg over the given AF_UNIX socket. +func SendFds(socket *os.File, msg []byte, fds ...int) error { + oob := unix.UnixRights(fds...) + return unix.Sendmsg(int(socket.Fd()), msg, oob, nil, 0) } |