Commit Graph
3 Commits
Author SHA1 Message Date
Oscar45397andClaude Opus 5.5 9c34cc0581 test(libkernel): cover socket calls on -1, more calls on a pipe and an invalid shutdown how
GuestSocketOnNonSocket checked ENOTSOCK on a pipe for ten calls and
EBADF only for bind, listen and connect. It now also requires ENOTSOCK
from getpeername, sendto and recvfrom on a pipe, EBADF from accept,
shutdown, getsockname, getpeername, getsockopt, send, recv, sendto and
recvfrom on -1 (shutdown(-1, 3) included: the descriptor is checked
before `how`), and EINVAL from shutdown with how -1 or 3 on a UDP
socket, as FreeBSD's socket calls and shutdown(2) define them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 22:04:45 +01:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
xXPBSXxandClaude Sonnet 5.5 d5d17788ae fix(libkernel): fail a socket call on an open non-socket descriptor with ENOTSOCK
bind, listen, accept, connect, shutdown, getsockname, getsockopt, setsockopt, send, recv and the other calls that look up a guest socket answered EBADF for a descriptor that is open but not a socket, for example a pipe end. FreeBSD 11.4's getsock_cap fails these with ENOTSOCK and keeps EBADF for a closed or invalid descriptor.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-20 02:44:17 +02:00