From 167781f4fd4927790cd38fdc10dc2ff167518dc8 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Sat, 26 Sep 2026 13:51:03 -0700 Subject: [PATCH] libct/utils: remove deprecated cmsg wrappers RecvFile, SendFile, and SendRawFd were moved to an internal package in runc 1.5, and the wrappers left in libcontainer/utils were deprecated, with a note that they will be removed in runc 1.6. Remove them. Signed-off-by: Kir Kolyshkin --- CHANGELOG.md | 2 ++ libcontainer/utils/cmsg_deprecated.go | 35 --------------------------- 2 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 libcontainer/utils/cmsg_deprecated.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 827d76077..7265fa302 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 accordingly. This lifts the previous 1024 CPUs/nodes limit. (#5343) - The deprecated `libcontainer/devices` package has been removed. Use `github.com/moby/sys/devices` instead. (#5142, #5223, #5495) +- The deprecated `RecvFile`, `SendFile`, and `SendRawFd` functions have been + removed from `libcontainer/utils`. (#5227, #5231, #5495) ### Fixed ### - The poststart hooks are now executed after starting the user-specified diff --git a/libcontainer/utils/cmsg_deprecated.go b/libcontainer/utils/cmsg_deprecated.go deleted file mode 100644 index 1da908a2b..000000000 --- a/libcontainer/utils/cmsg_deprecated.go +++ /dev/null @@ -1,35 +0,0 @@ -package utils - -import ( - "os" - - "github.com/opencontainers/runc/internal/cmsg" -) - -// RecvFile waits for a file descriptor to be sent over the given AF_UNIX -// socket. The file name of the remote file descriptor will be recreated -// locally (it is sent as non-auxiliary data in the same payload). -// -// Deprecated: This method is deprecated and has been moved to an internal -// package (see [cmsg.RecvFile]). It will be removed in runc 1.6. -func RecvFile(socket *os.File) (*os.File, error) { - return cmsg.RecvFile(socket) -} - -// SendFile sends a file over the given AF_UNIX socket. file.Name() is also -// included so that if the other end uses RecvFile, the file will have the same -// name information. -// -// Deprecated: This method is deprecated and has been moved to an internal -// package (see [cmsg.SendFile]). It will be removed in runc 1.6. -func SendFile(socket, file *os.File) error { - return cmsg.SendFile(socket, file) -} - -// SendRawFd sends a specific file descriptor over the given AF_UNIX socket. -// -// Deprecated: This method is deprecated and has been moved to an internal -// package (see [cmsg.SendRawFd]). It will be removed in runc 1.6. -func SendRawFd(socket *os.File, msg string, fd uintptr) error { - return cmsg.SendRawFd(socket, msg, fd) -}