The only MSG_CMSG_CLOEXEC case received sockets, whose F_GETFD reads the
guest's close-on-exec set, so it passed whether or not the received host
descriptor was marked. A pipe end goes through unchanged, so receiving
one with the flag now has to read back FD_CLOEXEC.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
sendmsg on a guest Unix-domain socket now takes FreeBSD SCM_RIGHTS control
messages (SOL_SOCKET level, data at offset 16) and sends their descriptors
with the host's SCM_RIGHTS; recvmsg receives them, installs received sockets
as guest sockets and writes FreeBSD's control record back, truncated to the
caller's buffer with MSG_CTRUNC. A closed descriptor returns EBADF, another
level or an overlong record EINVAL. Windows, other control types, IP
sockets and MSG_PEEK with a control buffer still throw.
Co-Authored-By: Claude Opus 5.5 <[email protected]>