Rebase against 3379ee2e6b5f610b9f82d31be9417095372ebc5e.

This commit is contained in:
Elizabeth Figura
2025-03-25 21:57:58 -05:00
parent c110178b0d
commit 5e84688c5f
6 changed files with 109 additions and 98 deletions

View File

@@ -1,4 +1,4 @@
From 914fe97f7dc20348ec3e1a2e18bcefa9b7cab463 Mon Sep 17 00:00:00 2001
From 16f5ebca082d65ca9abeddb857f30ef58f590ea3 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Fri, 8 Jun 2018 18:51:40 -0500
Subject: [PATCH] server: Add an object operation to grab the esync file
@@ -44,7 +44,7 @@ Split off to decrease patch size.
35 files changed, 71 insertions(+)
diff --git a/server/async.c b/server/async.c
index 749c547af4f..2377c737e98 100644
index d2d929c9709..9768a4932a6 100644
--- a/server/async.c
+++ b/server/async.c
@@ -78,6 +78,7 @@ static const struct object_ops async_ops =
@@ -100,7 +100,7 @@ index 91f159bc7c9..0df7fd2f18e 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/completion.c b/server/completion.c
index f9e68c523f1..9093132efac 100644
index 99680ae0680..3d750154d1b 100644
--- a/server/completion.c
+++ b/server/completion.c
@@ -92,6 +92,7 @@ static const struct object_ops completion_wait_ops =
@@ -120,10 +120,10 @@ index f9e68c523f1..9093132efac 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/console.c b/server/console.c
index b64283baf4a..1cc9eea6a50 100644
index de6f4e73e31..9bdba479e8c 100644
--- a/server/console.c
+++ b/server/console.c
@@ -81,6 +81,7 @@ static const struct object_ops console_ops =
@@ -84,6 +84,7 @@ static const struct object_ops console_ops =
console_add_queue, /* add_queue */
remove_queue, /* remove_queue */
console_signaled, /* signaled */
@@ -131,7 +131,7 @@ index b64283baf4a..1cc9eea6a50 100644
no_satisfied, /* satisfied */
no_signal, /* signal */
console_get_fd, /* get_fd */
@@ -158,6 +159,7 @@ static const struct object_ops console_server_ops =
@@ -161,6 +162,7 @@ static const struct object_ops console_server_ops =
add_queue, /* add_queue */
remove_queue, /* remove_queue */
console_server_signaled, /* signaled */
@@ -139,15 +139,15 @@ index b64283baf4a..1cc9eea6a50 100644
no_satisfied, /* satisfied */
no_signal, /* signal */
console_server_get_fd, /* get_fd */
@@ -227,6 +229,7 @@ static const struct object_ops screen_buffer_ops =
screen_buffer_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -230,6 +232,7 @@ static const struct object_ops screen_buffer_ops =
add_queue, /* add_queue */
remove_queue, /* remove_queue */
screen_buffer_signaled, /* signaled */
+ NULL, /* get_esync_fd */
NULL, /* satisfied */
no_satisfied, /* satisfied */
no_signal, /* signal */
screen_buffer_get_fd, /* get_fd */
@@ -276,6 +279,7 @@ static const struct object_ops console_device_ops =
@@ -279,6 +282,7 @@ static const struct object_ops console_device_ops =
no_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -155,23 +155,23 @@ index b64283baf4a..1cc9eea6a50 100644
no_satisfied, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
@@ -313,6 +317,7 @@ static const struct object_ops console_input_ops =
console_input_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -318,6 +322,7 @@ static const struct object_ops console_input_ops =
add_queue, /* add_queue */
remove_queue, /* remove_queue */
console_input_signaled, /* signaled */
+ NULL, /* get_esync_fd */
no_satisfied, /* satisfied */
no_signal, /* signal */
console_input_get_fd, /* get_fd */
@@ -370,6 +375,7 @@ static const struct object_ops console_output_ops =
console_output_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -377,6 +382,7 @@ static const struct object_ops console_output_ops =
add_queue, /* add_queue */
remove_queue, /* remove_queue */
console_output_signaled, /* signaled */
+ NULL, /* get_esync_fd */
no_satisfied, /* satisfied */
no_signal, /* signal */
console_output_get_fd, /* get_fd */
@@ -428,6 +434,7 @@ static const struct object_ops console_connection_ops =
@@ -435,6 +441,7 @@ static const struct object_ops console_connection_ops =
no_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -180,7 +180,7 @@ index b64283baf4a..1cc9eea6a50 100644
no_signal, /* signal */
console_connection_get_fd, /* get_fd */
diff --git a/server/debugger.c b/server/debugger.c
index c59a0abea77..ca04d4c71ce 100644
index 39a740e07e5..0c01ec1c0d3 100644
--- a/server/debugger.c
+++ b/server/debugger.c
@@ -86,6 +86,7 @@ static const struct object_ops debug_event_ops =
@@ -200,7 +200,7 @@ index c59a0abea77..ca04d4c71ce 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/device.c b/server/device.c
index 436dac6bfe9..f730fa81afa 100644
index 1f93cca437d..a0608aa6164 100644
--- a/server/device.c
+++ b/server/device.c
@@ -66,6 +66,7 @@ static const struct object_ops irp_call_ops =
@@ -236,7 +236,7 @@ index 436dac6bfe9..f730fa81afa 100644
no_signal, /* signal */
device_file_get_fd, /* get_fd */
diff --git a/server/directory.c b/server/directory.c
index b37ec969a9e..a6c0e292071 100644
index fd689c561bc..2894f7669db 100644
--- a/server/directory.c
+++ b/server/directory.c
@@ -69,6 +69,7 @@ static const struct object_ops object_type_ops =
@@ -268,7 +268,7 @@ index 6a63c0dd5e9..f95dc5a391f 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/event.c b/server/event.c
index f1b79b1b35e..c727bfdd1ba 100644
index ad7c09acc99..16cea16e9c2 100644
--- a/server/event.c
+++ b/server/event.c
@@ -72,6 +72,7 @@ static const struct object_ops event_ops =
@@ -288,7 +288,7 @@ index f1b79b1b35e..c727bfdd1ba 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/fd.c b/server/fd.c
index 16328063df6..4ce78db5b33 100644
index dde92beb664..b0c28e54360 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -172,6 +172,7 @@ static const struct object_ops fd_ops =
@@ -336,7 +336,7 @@ index 2a839968c25..cbef0c63383 100644
no_signal, /* signal */
file_get_fd, /* get_fd */
diff --git a/server/handle.c b/server/handle.c
index e65831b3b22..e6c5707556f 100644
index 8968df73647..3d36af360c2 100644
--- a/server/handle.c
+++ b/server/handle.c
@@ -126,6 +126,7 @@ static const struct object_ops handle_table_ops =
@@ -348,7 +348,7 @@ index e65831b3b22..e6c5707556f 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/hook.c b/server/hook.c
index c2d2823cd61..ab4d0e9dd31 100644
index ffe7206369e..921aa8aba2e 100644
--- a/server/hook.c
+++ b/server/hook.c
@@ -81,6 +81,7 @@ static const struct object_ops hook_table_ops =
@@ -360,7 +360,7 @@ index c2d2823cd61..ab4d0e9dd31 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/mailslot.c b/server/mailslot.c
index 61eceec94e2..92fe938d3b9 100644
index c54281c2101..e4c24459f22 100644
--- a/server/mailslot.c
+++ b/server/mailslot.c
@@ -81,6 +81,7 @@ static const struct object_ops mailslot_ops =
@@ -396,7 +396,7 @@ index 61eceec94e2..92fe938d3b9 100644
no_signal, /* signal */
mailslot_device_file_get_fd, /* get_fd */
diff --git a/server/mapping.c b/server/mapping.c
index 2bf45780375..b84bb08a77b 100644
index 247b28cf6f5..d8498b65054 100644
--- a/server/mapping.c
+++ b/server/mapping.c
@@ -67,6 +67,7 @@ static const struct object_ops ranges_ops =
@@ -436,7 +436,7 @@ index af0efe72132..4785a830e92 100644
mutex_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/named_pipe.c b/server/named_pipe.c
index dd8c14b30a9..5880b601d3a 100644
index 6e4ae371a1b..0eebd68abe6 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -119,6 +119,7 @@ static const struct object_ops named_pipe_ops =
@@ -480,7 +480,7 @@ index dd8c14b30a9..5880b601d3a 100644
no_signal, /* signal */
named_pipe_device_file_get_fd, /* get_fd */
diff --git a/server/object.c b/server/object.c
index b1665fb5372..0a4d1bede06 100644
index cd368ef724a..4d8fcc5a774 100644
--- a/server/object.c
+++ b/server/object.c
@@ -108,6 +108,7 @@ static const struct object_ops apc_reserve_ops =
@@ -500,7 +500,7 @@ index b1665fb5372..0a4d1bede06 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/object.h b/server/object.h
index 6222e3352ed..0a65d0e3892 100644
index 1058f9bfb0a..4acf6f03572 100644
--- a/server/object.h
+++ b/server/object.h
@@ -78,6 +78,8 @@ struct object_ops
@@ -513,7 +513,7 @@ index 6222e3352ed..0a65d0e3892 100644
void (*satisfied)(struct object *,struct wait_queue_entry *);
/* signal an object */
diff --git a/server/process.c b/server/process.c
index 49f5c75005f..dc83a089655 100644
index b161e3394ba..b3676936317 100644
--- a/server/process.c
+++ b/server/process.c
@@ -105,6 +105,7 @@ static const struct object_ops process_ops =
@@ -541,7 +541,7 @@ index 49f5c75005f..dc83a089655 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/queue.c b/server/queue.c
index 984d466b66e..8a95055db40 100644
index 2d23fb0def8..19486a745be 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -165,6 +165,7 @@ static const struct object_ops msg_queue_ops =
@@ -561,7 +561,7 @@ index 984d466b66e..8a95055db40 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/registry.c b/server/registry.c
index cc9a33fff1d..c19e92c9750 100644
index c60c737feff..34c422dcc6f 100644
--- a/server/registry.c
+++ b/server/registry.c
@@ -180,6 +180,7 @@ static const struct object_ops key_ops =
@@ -573,10 +573,10 @@ index cc9a33fff1d..c19e92c9750 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/request.c b/server/request.c
index dabcea68309..832a33917b4 100644
index 2254315b79e..f4f5e713935 100644
--- a/server/request.c
+++ b/server/request.c
@@ -90,6 +90,7 @@ static const struct object_ops master_socket_ops =
@@ -89,6 +89,7 @@ static const struct object_ops master_socket_ops =
no_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -621,10 +621,10 @@ index 19b76d44c16..55cd6aa037e 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/sock.c b/server/sock.c
index d2ec882554f..44a4e3b7b15 100644
index e064f867ff4..e9e81d9ecd0 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -471,6 +471,7 @@ static const struct object_ops sock_ops =
@@ -486,6 +486,7 @@ static const struct object_ops sock_ops =
add_queue, /* add_queue */
remove_queue, /* remove_queue */
default_fd_signaled, /* signaled */
@@ -632,7 +632,7 @@ index d2ec882554f..44a4e3b7b15 100644
no_satisfied, /* satisfied */
no_signal, /* signal */
sock_get_fd, /* get_fd */
@@ -3599,6 +3600,7 @@ static const struct object_ops ifchange_ops =
@@ -3695,6 +3696,7 @@ static const struct object_ops ifchange_ops =
no_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -640,7 +640,7 @@ index d2ec882554f..44a4e3b7b15 100644
no_satisfied, /* satisfied */
no_signal, /* signal */
ifchange_get_fd, /* get_fd */
@@ -3820,6 +3822,7 @@ static const struct object_ops socket_device_ops =
@@ -3916,6 +3918,7 @@ static const struct object_ops socket_device_ops =
no_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -649,7 +649,7 @@ index d2ec882554f..44a4e3b7b15 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/symlink.c b/server/symlink.c
index dd28efd3a75..c7f34412317 100644
index 74b60162c01..2dd9c6a798d 100644
--- a/server/symlink.c
+++ b/server/symlink.c
@@ -71,6 +71,7 @@ static const struct object_ops symlink_ops =
@@ -661,10 +661,10 @@ index dd28efd3a75..c7f34412317 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/thread.c b/server/thread.c
index 506adfc0a6f..339cdfec1fa 100644
index c7d1c6c55c8..ac000826599 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -96,6 +96,7 @@ static const struct object_ops thread_apc_ops =
@@ -106,6 +106,7 @@ static const struct object_ops thread_apc_ops =
add_queue, /* add_queue */
remove_queue, /* remove_queue */
thread_apc_signaled, /* signaled */
@@ -672,7 +672,7 @@ index 506adfc0a6f..339cdfec1fa 100644
no_satisfied, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
@@ -138,6 +139,7 @@ static const struct object_ops context_ops =
@@ -148,6 +149,7 @@ static const struct object_ops context_ops =
add_queue, /* add_queue */
remove_queue, /* remove_queue */
context_signaled, /* signaled */
@@ -680,7 +680,7 @@ index 506adfc0a6f..339cdfec1fa 100644
no_satisfied, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
@@ -187,6 +189,7 @@ static const struct object_ops thread_ops =
@@ -197,6 +199,7 @@ static const struct object_ops thread_ops =
add_queue, /* add_queue */
remove_queue, /* remove_queue */
thread_signaled, /* signaled */
@@ -689,7 +689,7 @@ index 506adfc0a6f..339cdfec1fa 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/timer.c b/server/timer.c
index 96dc9d00ca1..f59902d5607 100644
index b0b6ec81535..883f30fa97e 100644
--- a/server/timer.c
+++ b/server/timer.c
@@ -76,6 +76,7 @@ static const struct object_ops timer_ops =
@@ -701,7 +701,7 @@ index 96dc9d00ca1..f59902d5607 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/token.c b/server/token.c
index 48ee1eca8fe..479596bdbfa 100644
index 7e20c670a16..b638ed192cb 100644
--- a/server/token.c
+++ b/server/token.c
@@ -145,6 +145,7 @@ static const struct object_ops token_ops =
@@ -713,7 +713,7 @@ index 48ee1eca8fe..479596bdbfa 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/window.c b/server/window.c
index 412592fbc71..94a70ce890f 100644
index f7f9d5e517f..8c416d8c88f 100644
--- a/server/window.c
+++ b/server/window.c
@@ -107,6 +107,7 @@ static const struct object_ops window_ops =
@@ -725,7 +725,7 @@ index 412592fbc71..94a70ce890f 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/winstation.c b/server/winstation.c
index e5f4bfec357..50fe34aa9ce 100644
index b3746090ccf..126b70d625a 100644
--- a/server/winstation.c
+++ b/server/winstation.c
@@ -76,6 +76,7 @@ static const struct object_ops winstation_ops =
@@ -745,5 +745,5 @@ index e5f4bfec357..50fe34aa9ce 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
--
2.45.2
2.47.2

View File

@@ -1,2 +1,3 @@
Fixes: [48175] AION (64 bit) - crashes in crysystem.dll.CryFree() due to high memory pointers allocated
Fixes: [46568] 64-bit msxml6.dll from Microsoft Core XML Services 6.0 redist package fails to load (Wine doesn't respect 44-bit user-mode VA limitation from Windows < 8.1)
Disabled: true

View File

@@ -1,4 +1,4 @@
From d7527f7ea978ac1b74717f0ecbde72b410b0ab63 Mon Sep 17 00:00:00 2001
From 08807e33a1e1e60b3d3d24981bc2eac16b99b611 Mon Sep 17 00:00:00 2001
From: Ally Sommers <dropbear.sh@gmail.com>
Date: Thu, 30 Jan 2025 23:47:16 +0100
Subject: [PATCH] ws2_32: Add support for AF_UNIX sockets.
@@ -9,10 +9,10 @@ native call. This is NOT threadsafe, but wineserver is not
multithreaded.
---
dlls/ntdll/unix/socket.c | 4 +
dlls/ws2_32/socket.c | 83 +++++++++++++++++--
dlls/ws2_32/socket.c | 85 ++++++++++++++++++--
dlls/ws2_32/ws2_32_private.h | 13 +++
server/sock.c | 152 ++++++++++++++++++++++++++++++++---
4 files changed, 238 insertions(+), 14 deletions(-)
4 files changed, 240 insertions(+), 14 deletions(-)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c
index a02194f843f..a0c5969c82f 100644
@@ -44,12 +44,12 @@ index a02194f843f..a0c5969c82f 100644
struct async_recv_ioctl
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index eb61c588c58..b550a2ae5b7 100644
index 3a412b00c1e..5e5f13ef95c 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -167,6 +167,19 @@ static const WSAPROTOCOL_INFOW supported_protocols[] =
.dwMessageSize = UINT_MAX,
.szProtocol = L"SPX II",
@@ -182,6 +182,19 @@ static const WSAPROTOCOL_INFOW supported_protocols[] =
.iProtocol = BTHPROTO_RFCOMM,
.szProtocol = L"MSAFD RfComm [Bluetooth]",
},
+ {
+ .dwServiceFlags1 = XP1_GUARANTEED_DELIVERY | XP1_GUARANTEED_ORDER | XP1_IFS_HANDLES,
@@ -67,7 +67,7 @@ index eb61c588c58..b550a2ae5b7 100644
};
DECLARE_CRITICAL_SECTION(cs_socket_list);
@@ -237,6 +250,11 @@ const char *debugstr_sockaddr( const struct sockaddr *a )
@@ -252,6 +265,11 @@ const char *debugstr_sockaddr( const struct sockaddr *a )
bth_addr.rgBytes[1], bth_addr.rgBytes[0], wine_dbgstr_guid( &addr->serviceClassId ),
addr->port );
}
@@ -79,7 +79,7 @@ index eb61c588c58..b550a2ae5b7 100644
default:
return wine_dbg_sprintf("{ family %d }", a->sa_family);
}
@@ -1117,6 +1135,10 @@ int WINAPI bind( SOCKET s, const struct sockaddr *addr, int len )
@@ -1132,6 +1150,10 @@ int WINAPI bind( SOCKET s, const struct sockaddr *addr, int len )
HANDLE sync_event;
NTSTATUS status;
@@ -90,10 +90,19 @@ index eb61c588c58..b550a2ae5b7 100644
TRACE( "socket %#Ix, addr %s\n", s, debugstr_sockaddr(addr) );
if (!addr)
@@ -1159,6 +1181,14 @@ int WINAPI bind( SOCKET s, const struct sockaddr *addr, int len )
@@ -1173,6 +1195,7 @@ int WINAPI bind( SOCKET s, const struct sockaddr *addr, int len )
return -1;
}
break;
+
case AF_BTH:
if (len < sizeof(SOCKADDR_BTH))
{
@@ -1180,6 +1203,15 @@ int WINAPI bind( SOCKET s, const struct sockaddr *addr, int len )
return -1;
}
break;
+
+ case AF_UNIX:
+ if (len < offsetof(struct sockaddr_un, sun_path))
+ {
@@ -105,7 +114,7 @@ index eb61c588c58..b550a2ae5b7 100644
default:
FIXME( "unknown protocol %u\n", addr->sa_family );
SetLastError( WSAEAFNOSUPPORT );
@@ -1167,7 +1197,29 @@ int WINAPI bind( SOCKET s, const struct sockaddr *addr, int len )
@@ -1188,7 +1220,29 @@ int WINAPI bind( SOCKET s, const struct sockaddr *addr, int len )
if (!(sync_event = get_sync_event())) return -1;
@@ -136,7 +145,7 @@ index eb61c588c58..b550a2ae5b7 100644
ret_addr = malloc( len );
if (!params || !ret_addr)
{
@@ -1177,10 +1229,14 @@ int WINAPI bind( SOCKET s, const struct sockaddr *addr, int len )
@@ -1198,10 +1252,14 @@ int WINAPI bind( SOCKET s, const struct sockaddr *addr, int len )
return -1;
}
params->unknown = 0;
@@ -153,7 +162,7 @@ index eb61c588c58..b550a2ae5b7 100644
if (status == STATUS_PENDING)
{
if (WaitForSingleObject( sync_event, INFINITE ) == WAIT_FAILED)
@@ -1193,6 +1249,7 @@ int WINAPI bind( SOCKET s, const struct sockaddr *addr, int len )
@@ -1214,6 +1272,7 @@ int WINAPI bind( SOCKET s, const struct sockaddr *addr, int len )
free( params );
free( ret_addr );
@@ -161,7 +170,7 @@ index eb61c588c58..b550a2ae5b7 100644
SetLastError( NtStatusToWSAError( status ) );
return status ? -1 : 0;
@@ -1233,11 +1290,24 @@ int WINAPI connect( SOCKET s, const struct sockaddr *addr, int len )
@@ -1254,11 +1313,24 @@ int WINAPI connect( SOCKET s, const struct sockaddr *addr, int len )
HANDLE sync_event;
NTSTATUS status;
@@ -187,7 +196,7 @@ index eb61c588c58..b550a2ae5b7 100644
{
SetLastError( ERROR_NOT_ENOUGH_MEMORY );
return -1;
@@ -1245,10 +1315,13 @@ int WINAPI connect( SOCKET s, const struct sockaddr *addr, int len )
@@ -1266,10 +1338,13 @@ int WINAPI connect( SOCKET s, const struct sockaddr *addr, int len )
params->addr_len = len;
params->synchronous = TRUE;
memcpy( params + 1, addr, len );
@@ -234,11 +243,11 @@ index 9a4d0794151..af99716efa7 100644
const char *debugstr_sockaddr( const struct sockaddr *addr );
diff --git a/server/sock.c b/server/sock.c
index 2bb027a563c..8262898c436 100644
index e064f867ff4..b22621ec92e 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -87,6 +87,8 @@
# define HAS_IRDA
@@ -95,6 +95,8 @@
# endif
#endif
+#include <sys/un.h>
@@ -246,15 +255,15 @@ index 2bb027a563c..8262898c436 100644
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
@@ -98,6 +100,7 @@
@@ -106,6 +108,7 @@
#include "tcpmib.h"
#include "wsipx.h"
#include "af_irda.h"
+#include "afunix.h"
#include "wine/afd.h"
#include "wine/rbtree.h"
@@ -135,6 +138,7 @@ union win_sockaddr
#include "bthsdpdef.h"
#include "bluetoothapis.h"
#include "bthdef.h"
@@ -147,6 +150,7 @@ union win_sockaddr
struct WS_sockaddr_in6 in6;
struct WS_sockaddr_ipx ipx;
SOCKADDR_IRDA irda;
@@ -262,15 +271,15 @@ index 2bb027a563c..8262898c436 100644
};
union unix_sockaddr
@@ -148,6 +152,7 @@ union unix_sockaddr
#ifdef HAS_IRDA
struct sockaddr_irda irda;
@@ -163,6 +167,7 @@ union unix_sockaddr
#ifdef HAS_BLUETOOTH
struct sockaddr_rc rfcomm;
#endif
+ struct sockaddr_un un;
};
static struct list poll_list = LIST_INIT( poll_list );
@@ -696,6 +701,9 @@ static socklen_t get_unix_sockaddr_any( union unix_sockaddr *uaddr, int ws_famil
@@ -743,6 +748,9 @@ static socklen_t get_unix_sockaddr_any( union unix_sockaddr *uaddr, int ws_famil
uaddr->irda.sir_family = AF_IRDA;
return sizeof(uaddr->irda);
#endif
@@ -280,15 +289,15 @@ index 2bb027a563c..8262898c436 100644
default:
return 0;
}
@@ -1796,6 +1804,7 @@ static int get_unix_family( int family )
#ifdef AF_IRDA
case WS_AF_IRDA: return AF_IRDA;
@@ -1846,6 +1854,7 @@ static int get_unix_family( int family )
#ifdef AF_BLUETOOTH
case WS_AF_BTH: return AF_BLUETOOTH;
#endif
+ case WS_AF_UNIX: return AF_UNIX;
case WS_AF_UNSPEC: return AF_UNSPEC;
default: return -1;
}
@@ -2594,8 +2603,13 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
@@ -2655,8 +2664,13 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
if (listen( unix_fd, params->backlog ) < 0)
{
@@ -304,7 +313,7 @@ index 2bb027a563c..8262898c436 100644
}
sock->state = SOCK_LISTENING;
@@ -2665,7 +2679,55 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
@@ -2726,7 +2740,55 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
break;
}
@@ -361,7 +370,7 @@ index 2bb027a563c..8262898c436 100644
if (!unix_len)
{
set_error( STATUS_INVALID_ADDRESS );
@@ -2712,6 +2774,9 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
@@ -2773,6 +2835,9 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return;
}
@@ -371,7 +380,7 @@ index 2bb027a563c..8262898c436 100644
/* a connected or connecting socket can no longer be accepted into */
allow_fd_caching( sock->fd );
@@ -2961,6 +3026,7 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
@@ -3022,6 +3087,7 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
data_size_t in_size;
socklen_t unix_len;
int v6only = 1;
@@ -379,7 +388,7 @@ index 2bb027a563c..8262898c436 100644
/* the ioctl is METHOD_NEITHER, so ntdll gives us the output buffer as
* input */
@@ -2970,8 +3036,10 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
@@ -3031,8 +3097,10 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return;
}
in_size = get_req_data_size() - get_reply_max_size();
@@ -391,7 +400,7 @@ index 2bb027a563c..8262898c436 100644
{
set_error( STATUS_INVALID_PARAMETER );
return;
@@ -2983,7 +3051,47 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
@@ -3044,7 +3112,47 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return;
}
@@ -440,7 +449,7 @@ index 2bb027a563c..8262898c436 100644
if (!unix_len)
{
set_error( STATUS_INVALID_ADDRESS );
@@ -3027,8 +3135,16 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
@@ -3122,8 +3230,16 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
if (errno == EADDRINUSE && sock->reuseaddr)
errno = EACCES;
@@ -459,7 +468,7 @@ index 2bb027a563c..8262898c436 100644
}
sock->bound = 1;
@@ -3040,13 +3156,23 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
@@ -3135,13 +3251,23 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
* actual unix address */
if (bind_addr.addr.sa_family == AF_INET)
bind_addr.in.sin_addr = unix_addr.in.sin_addr;
@@ -484,7 +493,7 @@ index 2bb027a563c..8262898c436 100644
return;
}
@@ -3063,7 +3189,15 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
@@ -3158,7 +3284,15 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return;
}

View File

@@ -1,4 +1,4 @@
From 5b0ace840d44ca9072b16b55774c54e6c63d1aa1 Mon Sep 17 00:00:00 2001
From f8970096657145099840f30a355661e5cfe74b72 Mon Sep 17 00:00:00 2001
From: Ally Sommers <dropbear.sh@gmail.com>
Date: Thu, 30 Jan 2025 23:48:43 +0100
Subject: [PATCH] server: Allow for deletion of socket files.
@@ -10,10 +10,10 @@ is analogous to unbinding.
1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/server/fd.c b/server/fd.c
index 313220b5aaf..c42a701890e 100644
index dde92beb664..b937e1238b2 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -2077,6 +2077,19 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
@@ -2072,6 +2072,19 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
fd->unix_fd = open( name, O_RDONLY | (flags & ~(O_TRUNC | O_CREAT | O_EXCL)), *mode );
}
@@ -33,7 +33,7 @@ index 313220b5aaf..c42a701890e 100644
if (fd->unix_fd == -1)
{
/* check for trailing slash on file path */
@@ -2088,13 +2101,24 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
@@ -2083,13 +2096,24 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
}
}
@@ -57,7 +57,7 @@ index 313220b5aaf..c42a701890e 100644
- /* only bother with an inode for normal files and directories */
- if (S_ISREG(st.st_mode) || S_ISDIR(st.st_mode) || S_ISLNK(st.st_mode))
+ /* only bother with an inode for normal files, directories, and socket files */
+ if (S_ISREG(st.st_mode) || S_ISDIR(st.st_mode) || S_ISSOCK(st.st_mode))
+ if (S_ISREG(st.st_mode) || S_ISDIR(st.st_mode) || S_ISLNK(st.st_mode) || S_ISSOCK(st.st_mode))
{
unsigned int err;
struct inode *inode = get_inode( st.st_dev, st.st_ino, fd->unix_fd );

View File

@@ -1 +1,2 @@
Fixes: [52568] ws_ws2: Support for AF_UNIX sockets.
Depends: ntdll-Junction_Points

View File

@@ -1 +1 @@
0927c5c3da7cda8cf476416260286bd299ad6319
3379ee2e6b5f610b9f82d31be9417095372ebc5e