Commit Graph

324 Commits

Author SHA1 Message Date
Zebediah Figura 9b257ed63f server: Support passing to bind a zero sin6_scope_id.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:16:20 +02:00
Zebediah Figura d3b64637a0 server: Avoid leaking the ifaddrs structure in bind_to_interface().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:15:45 +02:00
Zebediah Figura 3b33a6b487 server: Explicitly forbid connecting a listening or connected socket.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51381
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 11:33:17 +02:00
Zebediah Figura ddb9223915 server: Clear the connection error after a successful connection.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 11:33:04 +02:00
Zebediah Figura 53e69130cc server: Report AFD_POLL_CONNECT_ERR if a previous connection attempt failed.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51331
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51366
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-06 09:57:28 +02:00
Zebediah Figura c86ba5d09d server: Separate a poll_single_socket() helper.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-06 09:57:15 +02:00
Zebediah Figura 026b192018 server: Return a Win32 error code from IOCTL_AFD_WINE_GET_SO_ERROR.
Fixes: fb3956fcf9
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-06 09:56:57 +02:00
Zebediah Figura 20c1990372 ws2_32: Handle SO_SNDTIMEO in the server.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-30 09:19:42 +02:00
Zebediah Figura 0072c72512 server: Introduce IOCTL_AFD_WINE_GET_SO_SNDBUF.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-30 09:19:37 +02:00
Zebediah Figura a0bb5564eb server: Introduce IOCTL_AFD_WINE_SET_SO_SNDBUF.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-30 09:19:29 +02:00
Zebediah Figura f4df896e06 ws2_32: Handle SO_RCVTIMEO in the server.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-29 19:55:22 +02:00
Zebediah Figura 1a2b1d75a8 server: Introduce IOCTL_AFD_WINE_GET_SO_RCVBUF.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-28 19:43:28 +02:00
Zebediah Figura b83a8b2da5 server: Introduce IOCTL_AFD_WINE_SET_SO_RCVBUF.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-28 19:43:28 +02:00
Zebediah Figura f7ffd71f3c server: Remove the no longer used get_socket_event request.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-24 10:27:05 +02:00
Zebediah Figura 8211c3ab36 server: Introduce IOCTL_AFD_WINE_GET_SO_ERROR.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-24 10:26:32 +02:00
Zebediah Figura 697f9e979e server: Introduce IOCTL_AFD_WINE_GET_SO_ACCEPTCONN.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-23 20:44:58 +02:00
Zebediah Figura 5b47e4ac0b server: Remove the no longer used get_socket_info request.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-21 10:45:15 +02:00
Zebediah Figura a4b3ed9f2a server: Introduce IOCTL_AFD_WINE_GET_INFO.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-21 10:45:05 +02:00
Zebediah Figura 9827081305 server: Remove the no longer used set_socket_deferred request.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-18 10:12:41 +02:00
Zebediah Figura 4d30a0e15c server: Introduce IOCTL_AFD_WINE_DEFER.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-18 10:12:21 +02:00
Zebediah Figura 93d001fa81 ws2_32: Check if the socket is bound in ConnectEx() in the server.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-17 09:19:19 +02:00
Zebediah Figura 5295cc273e ws2_32: Pass a Win32 socket address to IOCTL_AFD_WINE_CONNECT.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-17 09:19:13 +02:00
Zebediah Figura f0b42b2ffa ws2_32: Check if the socket is bound in listen() in the server.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-17 09:18:51 +02:00
Zebediah Figura 43a1a248c3 server: Correctly access the sir_lsap_sel field.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-17 09:18:41 +02:00
Zebediah Figura a997c3980f server: Return STATUS_ADDRESS_ALREADY_ASSOCIATED from IOCTL_AFD_BIND if the socket is already bound.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-16 09:03:20 +02:00
Zebediah Figura dd147ed65a server: Return the socket address from IOCTL_AFD_BIND.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-16 09:03:20 +02:00
Zebediah Figura 02309b72f7 server: Implement IOCTL_AFD_GETSOCKNAME.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-16 09:03:20 +02:00
Zebediah Figura f98ea26c67 server: Partially implement IOCTL_AFD_BIND.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-16 09:03:20 +02:00
Zebediah Figura 43e67ebddc server: Remove the no longer used set_socket_event request.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-15 20:43:18 +02:00
Zebediah Figura ce31d1253d server: Introduce IOCTL_AFD_WINE_MESSAGE_SELECT.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-15 20:43:05 +02:00
Zebediah Figura 2daf76432e server: Do not poll sockets for POLLPRI unless we are selecting for AFD_POLL_OOB.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-15 20:42:57 +02:00
Zebediah Figura 69549fc0c7 server: Implement IOCTL_AFD_GET_EVENTS.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-15 20:42:52 +02:00
Zebediah Figura 9bbf3ab96b server: Implement IOCTL_AFD_EVENT_SELECT.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-14 10:07:52 +02:00
Zebediah Figura e6258c544d server: Store the socket errors as an array of Unix errno values.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-14 10:07:45 +02:00
Zebediah Figura bbb126dc75 server: Use AFD_POLL_* flags internally.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-14 10:07:30 +02:00
Zebediah Figura 00eb00f6d6 server: Do not bother clearing events in IOCTL_AFD_LISTEN.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 10:53:32 +02:00
Zebediah Figura 139e95df61 server: Do not bother clearing events in IOCTL_AFD_WINE_CONNECT.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 10:53:28 +02:00
Zebediah Figura a7577014fa server: Use an enum to store socket connection state.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 10:53:22 +02:00
Zebediah Figura 5eaba82a77 server: Use separate fields to track socket shutdown state.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 10:53:03 +02:00
Zebediah Figura 5ee78d3460 server: Make FD_WINE_NONBLOCKING into a separate field.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 10:52:51 +02:00
Zebediah Figura 830fc41fbb server: Do not return the socket state from get_socket_event.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 10:52:39 +02:00
Zebediah Figura 9344a490a4 server: Fail with WSAEINVAL or WSAEALREADY when trying to connect a socket that is already connecting via nonblocking connect().
Fixes connection in Mortal Kombat 11; reported by Thomas Crider.

Fixes: a891713f48
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-10 20:50:32 +02:00
Zebediah Figura 7326b21241 server: Return STATUS_INVALID_PARAMETER when trying to call connect() on a socket with an active ConnectEx() async.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-10 20:50:22 +02:00
Zebediah Figura 8c26fca5c2 server: Don't rely on async_is_blocking() to determine whether IOCTL_AFD_WINE_ADDRESS_LIST_CHANGE should block.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-07 21:41:15 +02:00
Zebediah Figura 810a9da935 server: Remove the no longer used enable_socket_event request.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-02 20:16:08 +02:00
Zebediah Figura bd2e5ff939 server: Introduce IOCTL_AFD_WINE_FIONBIO.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-02 20:16:07 +02:00
Zebediah Figura 85a615f136 ntdll: Introduce IOCTL_AFD_WINE_SENDMSG.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 11:34:56 +02:00
Zebediah Figura e634cc7f48 server: Clear FD_OOB instead of FD_READ when receiving OOB data.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 11:34:27 +02:00
Zebediah Figura b5e264a4a2 server: Pass -1 to set_fd_events() if the socket is not yet initialized or a not yet used TCP socket.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 11:33:29 +02:00
Zebediah Figura 89f77a93a6 server: Mark the socket as cacheable when it is connected, marked listening, or created as connectionless.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 11:33:27 +02:00
Zebediah Figura 834e2f04c6 ntdll: Implement IOCTL_AFD_POLL.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50975
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 09:35:23 +02:00
Zebediah Figura 30fd3019e1 server: Allow opening the Afd device with a file name.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50974
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 09:31:28 +02:00
Zebediah Figura b8f4061df0 ntdll: Implement IOCTL_AFD_RECV.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50366
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:34:32 +02:00
Zebediah Figura e68f41e4fe server: Introduce IOCTL_AFD_WINE_SHUTDOWN.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-19 10:32:59 +02:00
Zebediah Figura 4256253419 server: Introduce IOCTL_AFD_WINE_CONNECT.
I was able to reverse-engineer a native CONNECT ioctl, with code 0x801; but I
was not able to find a valid set of parameters which would allow us to
implement either connect() or ConnectEx(). In particular, I could not find a
way to make the ioctl respect nonblocking mode, and I could not find a way to
specify an initial buffer to be sent.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 09:56:25 +02:00
Zebediah Figura 609dfea1fd server: Also clear pending events in set_socket_event.
In particular, prevent FD_CONNECT from being reported when not selected for.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 17:42:15 +02:00
Zebediah Figura 6ccf61fbc7 server: Implement IOCTL_AFD_LISTEN.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-14 11:57:52 +02:00
Zebediah Figura 98d1dc31fb include: Rename Wine-specific socket ioctls.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-14 11:54:11 +02:00
Zebediah Figura 21efebbdc1 server: Always clear pending messages in sock_wake_up().
Instead of clearing all messages when any match.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-14 11:53:59 +02:00
Zebediah Figura aa6b2482cc server: Poll for FD_CLOSE even if we cannot receive more data.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-14 11:53:54 +02:00
Zebediah Figura 4c409f8a3b server: Post socket events only if selecting for them.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 10:41:54 +02:00
Zebediah Figura 037fccc0df server: Do not send messages for events that are not currently being selected for.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 10:41:25 +02:00
Zebediah Figura 44a3c70d77 server: Reset the reported event mask in set_socket_event only when using window messages.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 10:41:12 +02:00
Zebediah Figura 0214c73d46 server: Rename "hmask" to "reported_events".
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-12 10:43:07 +02:00
Zebediah Figura 30c02f67ce server: Rename "pmask" to "pending_events".
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-12 10:43:07 +02:00
Zebediah Figura ccbc17c9f6 server: Add a helper to post socket events.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-12 10:43:07 +02:00
Zebediah Figura afad281dd1 server: Do not call sock_reselect() on an uninitialized socket.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-10 20:33:34 +02:00
Zebediah Figura 920f654ffb server: Avoid calling get_unix_fd() in IOCTL_AFD_CREATE.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-10 20:33:34 +02:00
Zebediah Figura 15aceec067 server: Map EINPROGRESS to STATUS_DEVICE_NOT_READY.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-06 08:12:18 +02:00
Zebediah Figura 523032e6f1 server: Map EFAULT to STATUS_ACCESS_VIOLATION.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-06 08:11:54 +02:00
Zebediah Figura d6d4fa4bd1 server: Map ENOTCONN to STATUS_INVALID_CONNECTION.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-06 08:11:44 +02:00
Zebediah Figura 12f3e27bbb server: Map EADDRINUSE to STATUS_SHARING_VIOLATION.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 10:20:00 +02:00
Zebediah Figura 4f4dc095f6 server: Return a proper NTSTATUS from IOCTL_AFD_ADDRESS_LIST_CHANGE.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 10:19:37 +02:00
Zebediah Figura a0cc341559 server: Return a proper NTSTATUS from IOCTL_AFD_ACCEPT.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 10:19:33 +02:00
Zebediah Figura 904c05d3d3 include: Do not include winsock.h in winsock2.h.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 18:55:24 +02:00
Zebediah Figura 101082253f server: Do not forbid closing fd handles in other processes.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 12:29:10 +01:00
Zebediah Figura 731339cd60 server: Use default_fd_signaled() for sockets.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-18 22:04:01 +01:00
Zebediah Figura 340cc46287 server: Do not allow selecting on the ifchange object.
We never pass a handle to this object to the client anyway.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-18 22:04:01 +01:00
Zebediah Figura 61abc500f5 server: Use a callback to free the accept_req structure.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 15:35:46 +01:00
Zebediah Figura 12783dabbc server: Hold a reference to both sockets in the accept_req structure.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 15:35:46 +01:00
Zebediah Figura 27db283449 server: Terminate accept asyncs when the last socket handle is closed.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 15:35:46 +01:00
Zebediah Figura d1270a27f0 server: Hold a reference to the iosb in the accept_req structure.
For convenience. Mirrors struct pipe_message.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 15:35:46 +01:00
Alexandre Julliard d6ef9401b3 server: Use the object type information to implement access mapping.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 22:53:46 +01:00
Alexandre Julliard c6f2aacb57 server: Add a type descriptor to all server objects.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-04 21:25:32 +01:00
Zebediah Figura fe11ff87ac server: Avoid leaking "acceptsock" on allocation failure.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-22 11:12:21 +01:00
Zebediah Figura ebe20da774 server: Pass the correct size to sockaddr_from_unix() (Valgrind).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50437
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-02 14:37:23 +01:00
Paul Gofman ae106feed2 server: Do not dereference symlinks specified as root directory.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:38 +01:00
Alistair Leslie-Hughes 3c0dae37a6 server: Fix compile error when irda.h is available.
Include "af_irda.h" so SOCKADDR_IRDA is defined.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 11:43:54 +02:00
Zebediah Figura b9f8adb243 server: Forbid accepting into the same socket more than once.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-20 22:54:02 +02:00
Zebediah Figura 93fb921ca7 ws2_32: Use server-side async I/O in accept().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-20 22:54:02 +02:00
Zebediah Figura 0bbd3f6617 ws2_32: Use server-side async I/O in AcceptEx().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-20 22:54:01 +02:00
Zebediah Figura e3ea527835 server: Remove the no longer used accept_into_socket request.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-02 10:02:03 +02:00
Zebediah Figura ea038894a6 server: Introduce IOCTL_AFD_ACCEPT_INTO.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-02 10:01:45 +02:00
Zebediah Figura cb1594cf4f server: Remove the no longer used accept_socket request.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-02 10:01:14 +02:00
Zebediah Figura 5474c035e7 server: Introduce IOCTL_AFD_ACCEPT.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-02 10:01:02 +02:00
Zebediah Figura cb5edb4b12 server: Remove redundant calls to sock_reselect().
These are already done in accept_socket() and accept_into_socket() respectively.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-01 11:50:47 +02:00
Zebediah Figura b1f2b61be0 server: Return Win32 socket types from get_socket_info.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-01 11:50:40 +02:00
Zebediah Figura ac36b8ff01 ws2_32: Set default socket options in the server.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-01 11:50:22 +02:00
Zebediah Figura abcc75cbcf ws2_32: Pass Win32 socket types to the server.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-01 11:49:27 +02:00
Zebediah Figura c2b089aae5 server: Move sock_ioctl() down to avoid forward declarations.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-25 10:51:10 +02:00