On Sun Jun 18 04:03:01 2023 +0000, Ally Sommers wrote:
Converting the path cannot realistically be done due to size differences for the same path:
$ echo -n 'C:\tmp\foo.sock' | wc -c 15 $ winepath 'C:\tmp\foo.sock' | tr -d '\n' | wc -c 47
For the same reason as needing to change directories to actually bind and connect, path translation in these functions and their server equivalents is not feasible.
It does mean that sockaddr_to_unix() and sockaddr_from_unix() can't be used for AF_UNIX sockets, at least not with their current design. That may mean we should:
- change the function signature (always allocate instead of filling a fixed-size sockaddr union?)
- or handle AF_UNIX specially (like the way this patch set handles bind() and connect() specially)
- or just leave off sockaddr conversion in some functions for now—so mark sendto() and recvfrom() as FIXME cases like getpeername().