6 Jul
2023
6 Jul
'23
3:52 p.m.
Zebediah Figura (@zfigura) commented about server/sock.c:
} #endif
+ case AF_UNIX: + { + struct WS_sockaddr_un win = {0}; + + if (wsaddrlen < sizeof(win)) return -1; + win.sun_family = WS_AF_UNIX; + memcpy( win.sun_path, uaddr->un.sun_path, sizeof(win.sun_path) ); + memcpy( wsaddr, &win, sizeof(win) ); + return sizeof(win); + } +
As with ntdll, this looks wrong. I don't think we want to be calling sockaddr_from_unix() or sockaddr_to_unix() at all for AF_UNIX sockets. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2786#note_38157