Re: [PATCH v25 0/6] MR7650: Add support for AF_UNIX sockets (followup)
Ralf Habacker (@rhabacker) commented about server/sock.c:
if (errno == EADDRINUSE && sock->reuseaddr) errno = EACCES;
- set_error( sock_get_ntstatus( errno ) ); - return; + /* Windows' AF_UNIX implementation has an edge case allowing for a socket to bind to + * an empty path. Linux doesn't, so it throws EINVAL. We check for this situation + * here and avoid early-exiting if it's the case. */ + if (!(errno == EINVAL && sock->family == WS_AF_UNIX && !*params->addr.sa_data)) + { + set_error( sock_get_ntstatus( errno ) ); + if (sock->family == WS_AF_UNIX && *params->addr.sa_data) + fchdir(server_dir_fd);
This should be changed. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7650#note_102241
participants (1)
-
Ralf Habacker (@rhabacker)