mirror of
https://github.com/opencontainers/runc.git
synced 2026-11-06 05:17:05 +00:00
ExecutableMemfd has a single caller (exeseal.Memfd), which always passes MFD_ALLOW_SEALING|MFD_CLOEXEC, and it has been this way ever since the function was added. Move it into exeseal.Memfd, hardcoding the flags. This also makes sure the descriptor is always close-on-exec, which is in line with the Go convention, and an executable memfd is never something we want to leak across an execve. Suggested-by: Sebastiaan van Stijn <github@gone.nl> Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>