File 0003-server-Introduce-error-when-attempting-to-create-a-S.patch of Package wine
From 344141f80b2febede52d8009435ba5c7811a922e Mon Sep 17 00:00:00 2001
From: Ally Sommers <dropbear.sh@gmail.com>
Date: Tue, 16 May 2023 02:20:55 -0700
Subject: [PATCH 3/8] server: Introduce error when attempting to create a
SOCK_DGRAM AF_UNIX socket.
---
server/sock.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/server/sock.c b/server/sock.c
index 2b8316cfcfa..f56fcae3876 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -1956,6 +1956,12 @@ static int init_socket( struct sock *sock, int family, int type, int protocol )
return -1;
}
+ if (unix_family == AF_UNIX && unix_type == SOCK_DGRAM)
+ {
+ set_win32_error(WSAEAFNOSUPPORT);
+ return -1;
+ }
+
sockfd = socket( unix_family, unix_type, unix_protocol );
#ifdef linux
if (sockfd == -1 && errno == EPERM && unix_type == SOCK_RAW
--
2.51.0