diff --git a/patches/kernel32-Named_Pipe/0020-server-Return-correct-error-codes-for-NtWriteFile-wh.patch b/patches/kernel32-Named_Pipe/0020-server-Return-correct-error-codes-for-NtWriteFile-wh.patch index da3a464b..c017667d 100644 --- a/patches/kernel32-Named_Pipe/0020-server-Return-correct-error-codes-for-NtWriteFile-wh.patch +++ b/patches/kernel32-Named_Pipe/0020-server-Return-correct-error-codes-for-NtWriteFile-wh.patch @@ -1,4 +1,4 @@ -From 82f162911442f78bae91fe8655cd2f4a33f638f7 Mon Sep 17 00:00:00 2001 +From f31780d39178e9e4aa98962d04a51e4f7440757d Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 6 Jun 2015 01:21:05 +0200 Subject: server: Return correct error codes for NtWriteFile when pipes are @@ -25,10 +25,10 @@ index 3035dd4..9986337 100644 CloseHandle(hfile); diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c -index 8e6dc12..15a957d 100644 +index a925899..af4b64e 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c -@@ -1210,6 +1210,9 @@ static NTSTATUS write_unix_fd(int fd, const char *buf, ULONG *total, ULONG lengt +@@ -1211,6 +1211,9 @@ static NTSTATUS write_unix_fd(int fd, const char *buf, ULONG *total, ULONG lengt return STATUS_SUCCESS; else if (errno == EFAULT) return STATUS_INVALID_USER_BUFFER; @@ -39,10 +39,10 @@ index 8e6dc12..15a957d 100644 } } diff --git a/server/named_pipe.c b/server/named_pipe.c -index 2297976..1759b00 100644 +index 55c0db7..e4dbf26 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c -@@ -145,6 +145,7 @@ static const struct object_ops named_pipe_ops = +@@ -147,6 +147,7 @@ static const struct object_ops named_pipe_ops = /* server end functions */ static void pipe_server_dump( struct object *obj, int verbose ); static struct fd *pipe_server_get_fd( struct object *obj ); @@ -50,8 +50,8 @@ index 2297976..1759b00 100644 static void pipe_server_destroy( struct object *obj); static obj_handle_t pipe_server_flush( struct fd *fd, const async_data_t *async, int blocking ); static enum server_fd_type pipe_server_get_fd_type( struct fd *fd ); -@@ -168,7 +169,7 @@ static const struct object_ops pipe_server_ops = - no_lookup_name, /* lookup_name */ +@@ -172,7 +173,7 @@ static const struct object_ops pipe_server_ops = + NULL, /* unlink_name */ no_open_file, /* open_file */ no_alloc_handle, /* alloc_handle */ - fd_close_handle, /* close_handle */ @@ -59,7 +59,7 @@ index 2297976..1759b00 100644 pipe_server_destroy /* destroy */ }; -@@ -190,6 +191,7 @@ static const struct fd_ops pipe_server_fd_ops = +@@ -194,6 +195,7 @@ static const struct fd_ops pipe_server_fd_ops = static void pipe_client_dump( struct object *obj, int verbose ); static int pipe_client_signaled( struct object *obj, struct wait_queue_entry *entry ); static struct fd *pipe_client_get_fd( struct object *obj ); @@ -67,8 +67,8 @@ index 2297976..1759b00 100644 static void pipe_client_destroy( struct object *obj ); static obj_handle_t pipe_client_flush( struct fd *fd, const async_data_t *async, int blocking ); static enum server_fd_type pipe_client_get_fd_type( struct fd *fd ); -@@ -211,7 +213,7 @@ static const struct object_ops pipe_client_ops = - no_lookup_name, /* lookup_name */ +@@ -217,7 +219,7 @@ static const struct object_ops pipe_client_ops = + NULL, /* unlink_name */ no_open_file, /* open_file */ no_alloc_handle, /* alloc_handle */ - fd_close_handle, /* close_handle */ @@ -76,7 +76,7 @@ index 2297976..1759b00 100644 pipe_client_destroy /* destroy */ }; -@@ -276,6 +278,8 @@ static const struct fd_ops named_pipe_device_fd_ops = +@@ -284,6 +286,8 @@ static const struct fd_ops named_pipe_device_fd_ops = default_fd_cancel_async /* cancel_async */ }; @@ -85,7 +85,7 @@ index 2297976..1759b00 100644 static void named_pipe_dump( struct object *obj, int verbose ) { fputs( "Named pipe\n", stderr ); -@@ -386,6 +390,23 @@ static void do_disconnect( struct pipe_server *server ) +@@ -394,6 +398,23 @@ static void do_disconnect( struct pipe_server *server ) server->fd = NULL; } @@ -109,7 +109,7 @@ index 2297976..1759b00 100644 static void pipe_server_destroy( struct object *obj) { struct pipe_server *server = (struct pipe_server *)obj; -@@ -412,6 +433,24 @@ static void pipe_server_destroy( struct object *obj) +@@ -420,6 +441,24 @@ static void pipe_server_destroy( struct object *obj) release_object( server->pipe ); } @@ -135,7 +135,7 @@ index 2297976..1759b00 100644 { struct pipe_client *client = (struct pipe_client *)obj; diff --git a/server/protocol.def b/server/protocol.def -index e6e52de..4a24595 100644 +index 2d87f03..1dc70d4 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -2378,6 +2378,7 @@ enum message_type @@ -147,5 +147,5 @@ index e6e52de..4a24595 100644 /* Get named pipe information by handle */ -- -2.6.4 +2.7.0 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index d35bbff4..c7177562 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "36b38b8a203c2cca77b101810770afe952f7164a" + echo "f55db7882db25019e1af1a497bd7723d10541989" } # Show version information diff --git a/patches/server-Desktop_Refcount/0001-server-Introduce-a-new-alloc_handle-object-callback..patch b/patches/server-Desktop_Refcount/0001-server-Introduce-a-new-alloc_handle-object-callback..patch index 5860b61f..10eea1c5 100644 --- a/patches/server-Desktop_Refcount/0001-server-Introduce-a-new-alloc_handle-object-callback..patch +++ b/patches/server-Desktop_Refcount/0001-server-Introduce-a-new-alloc_handle-object-callback..patch @@ -1,4 +1,4 @@ -From a04ff4bba9832fd787972911fb391558f129870c Mon Sep 17 00:00:00 2001 +From c6d16cb51a12109111ca19308c2062338da82ed4 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 4 Dec 2015 10:36:47 +0100 Subject: server: Introduce a new alloc_handle object callback. (v2) @@ -42,258 +42,258 @@ Signed-off-by: Sebastian Lackner 34 files changed, 73 insertions(+), 3 deletions(-) diff --git a/server/async.c b/server/async.c -index d2da976..b00d2cc 100644 +index 64aa27a..bc74173 100644 --- a/server/async.c +++ b/server/async.c -@@ -66,6 +66,7 @@ static const struct object_ops async_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -68,6 +68,7 @@ static const struct object_ops async_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ async_destroy /* destroy */ }; -@@ -99,6 +100,7 @@ static const struct object_ops async_queue_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -103,6 +104,7 @@ static const struct object_ops async_queue_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ async_queue_destroy /* destroy */ }; diff --git a/server/atom.c b/server/atom.c -index 0ed4ed5..1f694bc 100644 +index 3ff7540..7bebf13 100644 --- a/server/atom.c +++ b/server/atom.c -@@ -88,6 +88,7 @@ static const struct object_ops atom_table_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -90,6 +90,7 @@ static const struct object_ops atom_table_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ atom_table_destroy /* destroy */ }; diff --git a/server/change.c b/server/change.c -index 59d1819..4f36179 100644 +index 36a1997..6da2f63 100644 --- a/server/change.c +++ b/server/change.c -@@ -167,6 +167,7 @@ static const struct object_ops dir_ops = - dir_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -169,6 +169,7 @@ static const struct object_ops dir_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ fd_close_handle, /* close_handle */ dir_destroy /* destroy */ }; diff --git a/server/clipboard.c b/server/clipboard.c -index 2f56c72..1f988bc 100644 +index 7b92706..fa3aa51 100644 --- a/server/clipboard.c +++ b/server/clipboard.c -@@ -66,6 +66,7 @@ static const struct object_ops clipboard_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -68,6 +68,7 @@ static const struct object_ops clipboard_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ no_destroy /* destroy */ }; diff --git a/server/completion.c b/server/completion.c -index 77c72cc..97d2102 100644 +index 072bc0a1..909df81 100644 --- a/server/completion.c +++ b/server/completion.c -@@ -73,6 +73,7 @@ static const struct object_ops completion_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -75,6 +75,7 @@ static const struct object_ops completion_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ completion_destroy /* destroy */ }; diff --git a/server/console.c b/server/console.c -index a57b2fe..264b45f 100644 +index 0d98b78..37e413c 100644 --- a/server/console.c +++ b/server/console.c -@@ -85,6 +85,7 @@ static const struct object_ops console_input_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -87,6 +87,7 @@ static const struct object_ops console_input_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ console_input_destroy /* destroy */ }; -@@ -117,6 +118,7 @@ static const struct object_ops console_input_events_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -121,6 +122,7 @@ static const struct object_ops console_input_events_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ console_input_events_destroy /* destroy */ }; -@@ -169,6 +171,7 @@ static const struct object_ops screen_buffer_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -175,6 +177,7 @@ static const struct object_ops screen_buffer_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ screen_buffer_destroy /* destroy */ }; diff --git a/server/debugger.c b/server/debugger.c -index 374f2ad..5e9e6bf 100644 +index 2eb794a..a2c07ba 100644 --- a/server/debugger.c +++ b/server/debugger.c -@@ -82,6 +82,7 @@ static const struct object_ops debug_event_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -84,6 +84,7 @@ static const struct object_ops debug_event_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ debug_event_destroy /* destroy */ }; -@@ -106,6 +107,7 @@ static const struct object_ops debug_ctx_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -110,6 +111,7 @@ static const struct object_ops debug_ctx_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ debug_ctx_destroy /* destroy */ }; diff --git a/server/device.c b/server/device.c -index fb91c02..e207ba8 100644 +index c6e95b1..8ff6cde 100644 --- a/server/device.c +++ b/server/device.c -@@ -79,6 +79,7 @@ static const struct object_ops irp_call_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -81,6 +81,7 @@ static const struct object_ops irp_call_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ irp_call_destroy /* destroy */ }; -@@ -113,6 +114,7 @@ static const struct object_ops device_manager_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -117,6 +118,7 @@ static const struct object_ops device_manager_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ device_manager_destroy /* destroy */ }; -@@ -152,6 +154,7 @@ static const struct object_ops device_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -158,6 +160,7 @@ static const struct object_ops device_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ device_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ device_destroy /* destroy */ }; -@@ -198,6 +201,7 @@ static const struct object_ops device_file_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -206,6 +209,7 @@ static const struct object_ops device_file_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ device_file_close_handle, /* close_handle */ device_file_destroy /* destroy */ }; diff --git a/server/directory.c b/server/directory.c -index e0cf75e..da98fb0 100644 +index 56c5bf1..a12fb00 100644 --- a/server/directory.c +++ b/server/directory.c -@@ -65,6 +65,7 @@ static const struct object_ops object_type_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -67,6 +67,7 @@ static const struct object_ops object_type_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ no_destroy /* destroy */ }; -@@ -98,6 +99,7 @@ static const struct object_ops directory_ops = - default_set_sd, /* set_sd */ - directory_lookup_name, /* lookup_name */ +@@ -102,6 +103,7 @@ static const struct object_ops directory_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ directory_destroy /* destroy */ }; diff --git a/server/event.c b/server/event.c -index 4d3c562..9c09694 100644 +index cc4ef4f..8325b09 100644 --- a/server/event.c +++ b/server/event.c -@@ -66,6 +66,7 @@ static const struct object_ops event_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -68,6 +68,7 @@ static const struct object_ops event_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ no_destroy /* destroy */ }; -@@ -97,6 +98,7 @@ static const struct object_ops keyed_event_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -101,6 +102,7 @@ static const struct object_ops keyed_event_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ no_destroy /* destroy */ }; diff --git a/server/fd.c b/server/fd.c -index e3fe292..3e6373a 100644 +index 28f5346..c64132c 100644 --- a/server/fd.c +++ b/server/fd.c -@@ -210,6 +210,7 @@ static const struct object_ops fd_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -212,6 +212,7 @@ static const struct object_ops fd_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ fd_destroy /* destroy */ }; -@@ -247,6 +248,7 @@ static const struct object_ops device_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -251,6 +252,7 @@ static const struct object_ops device_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ device_destroy /* destroy */ }; -@@ -283,6 +285,7 @@ static const struct object_ops inode_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -289,6 +291,7 @@ static const struct object_ops inode_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ inode_destroy /* destroy */ }; -@@ -321,6 +324,7 @@ static const struct object_ops file_lock_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -329,6 +332,7 @@ static const struct object_ops file_lock_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ no_destroy /* destroy */ }; diff --git a/server/file.c b/server/file.c -index a07ca16..c9c47a4 100644 +index 15fd411..e6f3fc2 100644 --- a/server/file.c +++ b/server/file.c -@@ -92,6 +92,7 @@ static const struct object_ops file_ops = - file_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -94,6 +94,7 @@ static const struct object_ops file_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ file_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ fd_close_handle, /* close_handle */ file_destroy /* destroy */ }; diff --git a/server/handle.c b/server/handle.c -index 5043ff7..64db8fc 100644 +index f440f9f..eb83a3b 100644 --- a/server/handle.c +++ b/server/handle.c -@@ -131,6 +131,7 @@ static const struct object_ops handle_table_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -133,6 +133,7 @@ static const struct object_ops handle_table_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ handle_table_destroy /* destroy */ }; -@@ -229,7 +230,7 @@ static int grow_handle_table( struct handle_table *table ) +@@ -232,7 +233,7 @@ static int grow_handle_table( struct handle_table *table ) } /* allocate the first free entry in the handle table */ @@ -302,7 +302,7 @@ index 5043ff7..64db8fc 100644 { struct handle_entry *entry = table->entries + table->free; int i; -@@ -245,6 +246,10 @@ static obj_handle_t alloc_entry( struct handle_table *table, void *obj, unsigned +@@ -248,6 +249,10 @@ static obj_handle_t alloc_entry( struct handle_table *table, void *obj, unsigned table->free = i + 1; entry->ptr = grab_object_for_handle( obj ); entry->access = access; @@ -313,7 +313,7 @@ index 5043ff7..64db8fc 100644 return index_to_handle(i); } -@@ -369,7 +374,11 @@ struct handle_table *copy_handle_table( struct process *process, struct process +@@ -372,7 +377,11 @@ struct handle_table *copy_handle_table( struct process *process, struct process for (i = 0; i <= table->last; i++, ptr++) { if (!ptr->ptr) continue; @@ -327,110 +327,110 @@ index 5043ff7..64db8fc 100644 } } diff --git a/server/hook.c b/server/hook.c -index a8e6ab9..c005cae 100644 +index 3a0e4b4..dc653b8 100644 --- a/server/hook.c +++ b/server/hook.c -@@ -89,6 +89,7 @@ static const struct object_ops hook_table_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -91,6 +91,7 @@ static const struct object_ops hook_table_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ hook_table_destroy /* destroy */ }; diff --git a/server/mailslot.c b/server/mailslot.c -index 97ea3f6..5075a1a 100644 +index 9f18083..1c5e0d5 100644 --- a/server/mailslot.c +++ b/server/mailslot.c -@@ -86,6 +86,7 @@ static const struct object_ops mailslot_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -88,6 +88,7 @@ static const struct object_ops mailslot_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ mailslot_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ fd_close_handle, /* close_handle */ mailslot_destroy /* destroy */ }; -@@ -139,6 +140,7 @@ static const struct object_ops mail_writer_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -143,6 +144,7 @@ static const struct object_ops mail_writer_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ fd_close_handle, /* close_handle */ mail_writer_destroy /* destroy */ }; -@@ -193,6 +195,7 @@ static const struct object_ops mailslot_device_ops = - default_set_sd, /* set_sd */ - mailslot_device_lookup_name, /* lookup_name */ +@@ -199,6 +201,7 @@ static const struct object_ops mailslot_device_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ mailslot_device_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ fd_close_handle, /* close_handle */ mailslot_device_destroy /* destroy */ }; diff --git a/server/mapping.c b/server/mapping.c -index 16e7c1c..fd31df2 100644 +index 9504996..b2749d2 100644 --- a/server/mapping.c +++ b/server/mapping.c -@@ -92,6 +92,7 @@ static const struct object_ops mapping_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -94,6 +94,7 @@ static const struct object_ops mapping_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ fd_close_handle, /* close_handle */ mapping_destroy /* destroy */ }; diff --git a/server/mutex.c b/server/mutex.c -index 910fbca..6e23770 100644 +index 08a2477..bfa56a7 100644 --- a/server/mutex.c +++ b/server/mutex.c -@@ -69,6 +69,7 @@ static const struct object_ops mutex_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -71,6 +71,7 @@ static const struct object_ops mutex_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ mutex_destroy /* destroy */ }; diff --git a/server/named_pipe.c b/server/named_pipe.c -index 8d5753a..f48ead9 100644 +index 0bd6064..9eef654 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c -@@ -132,6 +132,7 @@ static const struct object_ops named_pipe_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -134,6 +134,7 @@ static const struct object_ops named_pipe_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ named_pipe_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ named_pipe_destroy /* destroy */ }; -@@ -161,6 +162,7 @@ static const struct object_ops pipe_server_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -165,6 +166,7 @@ static const struct object_ops pipe_server_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ fd_close_handle, /* close_handle */ pipe_server_destroy /* destroy */ }; -@@ -203,6 +205,7 @@ static const struct object_ops pipe_client_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -209,6 +211,7 @@ static const struct object_ops pipe_client_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ fd_close_handle, /* close_handle */ pipe_client_destroy /* destroy */ }; -@@ -249,6 +252,7 @@ static const struct object_ops named_pipe_device_ops = - default_set_sd, /* set_sd */ - named_pipe_device_lookup_name, /* lookup_name */ +@@ -257,6 +260,7 @@ static const struct object_ops named_pipe_device_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ named_pipe_device_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ fd_close_handle, /* close_handle */ named_pipe_device_destroy /* destroy */ }; diff --git a/server/object.c b/server/object.c -index 31883bd..3ccaa4c 100644 +index 4f23e0c..c641e4e 100644 --- a/server/object.c +++ b/server/object.c -@@ -548,6 +548,10 @@ struct object *no_open_file( struct object *obj, unsigned int access, unsigned i +@@ -564,6 +564,10 @@ struct object *no_open_file( struct object *obj, unsigned int access, unsigned i return NULL; } @@ -442,10 +442,10 @@ index 31883bd..3ccaa4c 100644 { return 1; /* ok to close */ diff --git a/server/object.h b/server/object.h -index b59811f..06ee321 100644 +index 3d6ba8a..353a9e2 100644 --- a/server/object.h +++ b/server/object.h -@@ -86,8 +86,10 @@ struct object_ops +@@ -90,8 +90,10 @@ struct object_ops /* open a file object to access this object */ struct object *(*open_file)(struct object *, unsigned int access, unsigned int sharing, unsigned int options); @@ -457,8 +457,8 @@ index b59811f..06ee321 100644 /* destroy on refcount == 0 */ void (*destroy)(struct object *); }; -@@ -145,6 +147,7 @@ extern int set_sd_defaults_from_token( struct object *obj, const struct security - extern struct object *no_lookup_name( struct object *obj, struct unicode_str *name, unsigned int attributes ); +@@ -150,6 +152,7 @@ extern struct object *no_lookup_name( struct object *obj, struct unicode_str *na + extern int no_link_name( struct object *obj, struct object_name *name, struct object *parent ); extern struct object *no_open_file( struct object *obj, unsigned int access, unsigned int sharing, unsigned int options ); +extern void no_alloc_handle( struct object *obj, struct process *process, obj_handle_t handle ); @@ -466,221 +466,221 @@ index b59811f..06ee321 100644 extern void no_destroy( struct object *obj ); #ifdef DEBUG_OBJECTS diff --git a/server/process.c b/server/process.c -index e00b429..bc86c24 100644 +index d51c884..0f37a3b 100644 --- a/server/process.c +++ b/server/process.c -@@ -82,6 +82,7 @@ static const struct object_ops process_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -84,6 +84,7 @@ static const struct object_ops process_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ process_destroy /* destroy */ }; -@@ -130,6 +131,7 @@ static const struct object_ops startup_info_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -134,6 +135,7 @@ static const struct object_ops startup_info_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ startup_info_destroy /* destroy */ }; -@@ -171,6 +173,7 @@ static const struct object_ops job_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -177,6 +179,7 @@ static const struct object_ops job_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ job_close_handle, /* close_handle */ job_destroy /* destroy */ }; diff --git a/server/queue.c b/server/queue.c -index 3099e12..bdc740d 100644 +index f82060f..e097f5b 100644 --- a/server/queue.c +++ b/server/queue.c -@@ -179,6 +179,7 @@ static const struct object_ops msg_queue_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -181,6 +181,7 @@ static const struct object_ops msg_queue_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ msg_queue_destroy /* destroy */ }; -@@ -212,6 +213,7 @@ static const struct object_ops thread_input_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -216,6 +217,7 @@ static const struct object_ops thread_input_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ thread_input_destroy /* destroy */ }; diff --git a/server/registry.c b/server/registry.c -index a3c1390..2db56c3 100644 +index 5ca2a52..e38d6bb 100644 --- a/server/registry.c +++ b/server/registry.c -@@ -167,6 +167,7 @@ static const struct object_ops key_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -169,6 +169,7 @@ static const struct object_ops key_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ key_close_handle, /* close_handle */ key_destroy /* destroy */ }; diff --git a/server/request.c b/server/request.c -index f78026a..bd01179 100644 +index dfa4485..122de96 100644 --- a/server/request.c +++ b/server/request.c -@@ -103,6 +103,7 @@ static const struct object_ops master_socket_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -107,6 +107,7 @@ static const struct object_ops master_socket_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ master_socket_destroy /* destroy */ }; diff --git a/server/semaphore.c b/server/semaphore.c -index d87325c..aaf2d65 100644 +index 515f49e..a0df7cf 100644 --- a/server/semaphore.c +++ b/server/semaphore.c -@@ -66,6 +66,7 @@ static const struct object_ops semaphore_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -68,6 +68,7 @@ static const struct object_ops semaphore_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ no_destroy /* destroy */ }; diff --git a/server/serial.c b/server/serial.c -index 164a4b1..cc9c3bc 100644 +index 03d726a..46949a3 100644 --- a/server/serial.c +++ b/server/serial.c -@@ -101,6 +101,7 @@ static const struct object_ops serial_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -106,6 +106,7 @@ static const struct object_ops serial_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ fd_close_handle, /* close_handle */ serial_destroy /* destroy */ }; diff --git a/server/signal.c b/server/signal.c -index 5e4fe33..308f494 100644 +index c20e154..8c05c5f 100644 --- a/server/signal.c +++ b/server/signal.c -@@ -75,6 +75,7 @@ static const struct object_ops handler_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -77,6 +77,7 @@ static const struct object_ops handler_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ handler_destroy /* destroy */ }; diff --git a/server/snapshot.c b/server/snapshot.c -index dd00bd1..b827c6f 100644 +index 3566b89..a0cf32e 100644 --- a/server/snapshot.c +++ b/server/snapshot.c -@@ -69,6 +69,7 @@ static const struct object_ops snapshot_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -71,6 +71,7 @@ static const struct object_ops snapshot_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ snapshot_destroy /* destroy */ }; diff --git a/server/sock.c b/server/sock.c -index 1767dea..57d3d93 100644 +index dc10d2a..a11964f 100644 --- a/server/sock.c +++ b/server/sock.c -@@ -154,6 +154,7 @@ static const struct object_ops sock_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -156,6 +156,7 @@ static const struct object_ops sock_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ fd_close_handle, /* close_handle */ sock_destroy /* destroy */ }; -@@ -996,6 +997,7 @@ static const struct object_ops ifchange_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -1000,6 +1001,7 @@ static const struct object_ops ifchange_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ ifchange_destroy /* destroy */ }; diff --git a/server/symlink.c b/server/symlink.c -index 2330fde..1107639 100644 +index 09443b8..a74fa7c 100644 --- a/server/symlink.c +++ b/server/symlink.c -@@ -68,6 +68,7 @@ static const struct object_ops symlink_ops = - default_set_sd, /* set_sd */ - symlink_lookup_name, /* lookup_name */ +@@ -70,6 +70,7 @@ static const struct object_ops symlink_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ symlink_destroy /* destroy */ }; diff --git a/server/thread.c b/server/thread.c -index bad2231..9407938 100644 +index ca02a8a..71b4d7b 100644 --- a/server/thread.c +++ b/server/thread.c -@@ -118,6 +118,7 @@ static const struct object_ops thread_apc_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -120,6 +120,7 @@ static const struct object_ops thread_apc_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ thread_apc_destroy /* destroy */ }; -@@ -147,6 +148,7 @@ static const struct object_ops thread_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -151,6 +152,7 @@ static const struct object_ops thread_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ destroy_thread /* destroy */ }; diff --git a/server/timer.c b/server/timer.c -index 9c293f2..9957ee3 100644 +index ef9aa08..c80069a 100644 --- a/server/timer.c +++ b/server/timer.c -@@ -73,6 +73,7 @@ static const struct object_ops timer_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -75,6 +75,7 @@ static const struct object_ops timer_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ timer_destroy /* destroy */ }; diff --git a/server/token.c b/server/token.c -index 42cfb3d..893d58f 100644 +index ca12813..e13d03a 100644 --- a/server/token.c +++ b/server/token.c -@@ -159,6 +159,7 @@ static const struct object_ops token_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -161,6 +161,7 @@ static const struct object_ops token_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ no_close_handle, /* close_handle */ token_destroy /* destroy */ }; diff --git a/server/winstation.c b/server/winstation.c -index 5016184..c4e55e3 100644 +index 6e1c754..ab3dd05 100644 --- a/server/winstation.c +++ b/server/winstation.c -@@ -71,6 +71,7 @@ static const struct object_ops winstation_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -72,6 +72,7 @@ static const struct object_ops winstation_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ winstation_close_handle, /* close_handle */ winstation_destroy /* destroy */ }; -@@ -92,6 +93,7 @@ static const struct object_ops desktop_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -95,6 +96,7 @@ static const struct object_ops desktop_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ desktop_close_handle, /* close_handle */ desktop_destroy /* destroy */ }; -- -2.6.2 +2.7.0 diff --git a/patches/server-Desktop_Refcount/0002-server-Track-desktop-handle-count-more-correctly.patch b/patches/server-Desktop_Refcount/0002-server-Track-desktop-handle-count-more-correctly.patch index 84d579a0..71561d2f 100644 --- a/patches/server-Desktop_Refcount/0002-server-Track-desktop-handle-count-more-correctly.patch +++ b/patches/server-Desktop_Refcount/0002-server-Track-desktop-handle-count-more-correctly.patch @@ -1,4 +1,4 @@ -From 92d7a9ef41b33c33c0d63a2f96e202a816cdb638 Mon Sep 17 00:00:00 2001 +From b66d03524b625b22f92f60b1856c7ac89197e809 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 4 Dec 2015 01:22:29 +0100 Subject: server: Track desktop handle count more correctly. @@ -54,10 +54,10 @@ index 2b8502b..b59ed4e 100644 } diff --git a/server/handle.c b/server/handle.c -index 9d9ff4b..731f287 100644 +index eb83a3b..38f38d5 100644 --- a/server/handle.c +++ b/server/handle.c -@@ -488,7 +488,7 @@ obj_handle_t find_inherited_handle( struct process *process, const struct object +@@ -490,7 +490,7 @@ obj_handle_t find_inherited_handle( struct process *process, const struct object /* enumerate handles of a given type */ /* this is needed for window stations and desktops */ obj_handle_t enumerate_handles( struct process *process, const struct object_ops *ops, @@ -66,7 +66,7 @@ index 9d9ff4b..731f287 100644 { struct handle_table *table = process->handles; unsigned int i; -@@ -501,6 +501,7 @@ obj_handle_t enumerate_handles( struct process *process, const struct object_ops +@@ -503,6 +503,7 @@ obj_handle_t enumerate_handles( struct process *process, const struct object_ops if (!entry->ptr) continue; if (entry->ptr->ops != ops) continue; *index = i + 1; @@ -88,10 +88,10 @@ index f1deb79..1347836 100644 extern struct handle_table *alloc_handle_table( struct process *process, int count ); extern struct handle_table *copy_handle_table( struct process *process, struct process *parent ); diff --git a/server/process.c b/server/process.c -index 39d8bc9..c9f9f1d 100644 +index 0f37a3b..0bc1edd 100644 --- a/server/process.c +++ b/server/process.c -@@ -832,7 +832,6 @@ static void process_killed( struct process *process ) +@@ -838,7 +838,6 @@ static void process_killed( struct process *process ) assert( list_empty( &process->thread_list )); process->end_time = current_time; @@ -100,7 +100,7 @@ index 39d8bc9..c9f9f1d 100644 process->desktop = 0; close_process_handles( process ); diff --git a/server/winstation.c b/server/winstation.c -index 9bc08e3..ecf78e5 100644 +index ab3dd05..9924cbe 100644 --- a/server/winstation.c +++ b/server/winstation.c @@ -50,6 +50,7 @@ static void winstation_destroy( struct object *obj ); @@ -111,16 +111,16 @@ index 9bc08e3..ecf78e5 100644 static int desktop_close_handle( struct object *obj, struct process *process, obj_handle_t handle ); static void desktop_destroy( struct object *obj ); static unsigned int desktop_map_access( struct object *obj, unsigned int access ); -@@ -92,7 +93,7 @@ static const struct object_ops desktop_ops = - default_set_sd, /* set_sd */ - no_lookup_name, /* lookup_name */ +@@ -96,7 +97,7 @@ static const struct object_ops desktop_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ no_open_file, /* open_file */ - no_alloc_handle, /* alloc_handle */ + desktop_alloc_handle, /* alloc_handle */ desktop_close_handle, /* close_handle */ desktop_destroy /* destroy */ }; -@@ -234,14 +235,54 @@ static struct object_type *desktop_get_type( struct object *obj ) +@@ -240,14 +241,54 @@ static struct object_type *desktop_get_type( struct object *obj ) return get_object_type( &str ); } @@ -175,7 +175,7 @@ index 9bc08e3..ecf78e5 100644 return 1; } -@@ -249,6 +290,7 @@ static void desktop_destroy( struct object *obj ) +@@ -255,6 +296,7 @@ static void desktop_destroy( struct object *obj ) { struct desktop *desktop = (struct desktop *)obj; @@ -183,7 +183,7 @@ index 9bc08e3..ecf78e5 100644 free_hotkeys( desktop, 0 ); if (desktop->top_window) destroy_window( desktop->top_window ); if (desktop->msg_window) destroy_window( desktop->msg_window ); -@@ -276,40 +318,6 @@ struct desktop *get_thread_desktop( struct thread *thread, unsigned int access ) +@@ -282,40 +324,6 @@ struct desktop *get_thread_desktop( struct thread *thread, unsigned int access ) return get_desktop_obj( thread->process, thread->desktop, access ); } @@ -224,7 +224,7 @@ index 9bc08e3..ecf78e5 100644 /* set the process default desktop handle */ void set_process_default_desktop( struct process *process, struct desktop *desktop, obj_handle_t handle ) -@@ -326,12 +334,6 @@ void set_process_default_desktop( struct process *process, struct desktop *deskt +@@ -332,12 +340,6 @@ void set_process_default_desktop( struct process *process, struct desktop *deskt LIST_FOR_EACH_ENTRY( thread, &process->thread_list, struct thread, proc_entry ) if (!thread->desktop) thread->desktop = handle; @@ -237,7 +237,7 @@ index 9bc08e3..ecf78e5 100644 if (old_desktop) release_object( old_desktop ); } -@@ -381,8 +383,8 @@ done: +@@ -387,8 +389,8 @@ done: void close_process_desktop( struct process *process ) { struct desktop *desktop; diff --git a/patches/server-Misc_ACL/0001-server-Add-default-security-descriptor-ownership-for.patch b/patches/server-Misc_ACL/0001-server-Add-default-security-descriptor-ownership-for.patch index ca51cc87..6176b861 100644 --- a/patches/server-Misc_ACL/0001-server-Add-default-security-descriptor-ownership-for.patch +++ b/patches/server-Misc_ACL/0001-server-Add-default-security-descriptor-ownership-for.patch @@ -1,4 +1,4 @@ -From f06a13e553d543e7b49c805b9292611ab1c68371 Mon Sep 17 00:00:00 2001 +From 2380d7451dc978cdab3ebcbeb75272c9147d0f68 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 25 Jun 2014 11:49:12 -0600 Subject: server: Add default security descriptor ownership for processes. @@ -11,10 +11,10 @@ Subject: server: Add default security descriptor ownership for processes. 4 files changed, 69 insertions(+), 1 deletion(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c -index 466100d..ca4a8ad 100644 +index 498d19a..c09b097 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c -@@ -4253,11 +4253,15 @@ static void test_acls(void) +@@ -4303,11 +4303,15 @@ static void test_acls(void) static void test_GetSecurityInfo(void) { @@ -30,7 +30,7 @@ index 466100d..ca4a8ad 100644 ACL_SIZE_INFORMATION acl_size; PSECURITY_DESCRIPTOR pSD; ACCESS_ALLOWED_ACE *ace; -@@ -4382,6 +4386,37 @@ static void test_GetSecurityInfo(void) +@@ -4434,6 +4438,37 @@ static void test_GetSecurityInfo(void) } LocalFree(pSD); CloseHandle(obj); @@ -69,7 +69,7 @@ index 466100d..ca4a8ad 100644 static void test_GetSidSubAuthority(void) diff --git a/server/process.c b/server/process.c -index 26f8924..1047c25 100644 +index d51c884..14e36b0 100644 --- a/server/process.c +++ b/server/process.c @@ -62,6 +62,7 @@ static int shutdown_stage; /* current stage in the shutdown process */ @@ -88,8 +88,8 @@ index 26f8924..1047c25 100644 + process_get_sd, /* get_sd */ default_set_sd, /* set_sd */ no_lookup_name, /* lookup_name */ - no_open_file, /* open_file */ -@@ -642,6 +643,29 @@ static unsigned int process_map_access( struct object *obj, unsigned int access + no_link_name, /* link_name */ +@@ -664,6 +665,29 @@ static unsigned int process_map_access( struct object *obj, unsigned int access return access & ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL); } @@ -120,7 +120,7 @@ index 26f8924..1047c25 100644 { struct process *process = get_fd_user( fd ); diff --git a/server/security.h b/server/security.h -index 855f2e7..01bf637 100644 +index 925a85b..bdb7d42 100644 --- a/server/security.h +++ b/server/security.h @@ -47,6 +47,7 @@ extern const PSID security_local_user_sid; @@ -132,7 +132,7 @@ index 855f2e7..01bf637 100644 /* token functions */ diff --git a/server/token.c b/server/token.c -index cb81eec..914dfba 100644 +index ca12813..d66c39a 100644 --- a/server/token.c +++ b/server/token.c @@ -91,6 +91,13 @@ static const struct /* same fields as struct SID */ @@ -158,5 +158,5 @@ index cb81eec..914dfba 100644 static luid_t prev_luid_value = { 1000, 0 }; -- -2.3.5 +2.7.0 diff --git a/patches/ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch b/patches/ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch index b0da9501..1f6c7b91 100644 --- a/patches/ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch +++ b/patches/ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch @@ -1,4 +1,4 @@ -From 361a906c0026d132a08bc292450a098fd2fc072b Mon Sep 17 00:00:00 2001 +From 93e58d6178dcfdea0c120c1330e28df88c47439b Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Thu, 16 Jan 2014 19:08:30 -0700 Subject: ws2_32: Add support for TF_REUSE_SOCKET to TransmitFile. @@ -12,10 +12,10 @@ Subject: ws2_32: Add support for TF_REUSE_SOCKET to TransmitFile. 5 files changed, 75 insertions(+), 11 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c -index 9cff400..c2dbbf4 100644 +index cb16583..c7a7c54 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c -@@ -2888,6 +2888,17 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws +@@ -2933,6 +2933,17 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws if (status != STATUS_SUCCESS) return status; @@ -33,7 +33,7 @@ index 9cff400..c2dbbf4 100644 if (wsa->flags & TF_DISCONNECT) { /* we can't use WS_closesocket because it modifies the last error */ -@@ -2931,7 +2942,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD +@@ -2976,7 +2987,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD LPOVERLAPPED overlapped, LPTRANSMIT_FILE_BUFFERS buffers, DWORD flags ) { @@ -43,10 +43,10 @@ index 9cff400..c2dbbf4 100644 unsigned int uaddrlen = sizeof(uaddr); struct ws2_transmitfile_async *wsa; diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c -index 41554b4..9462628 100644 +index e10d01c..82f8ef0 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c -@@ -8049,7 +8049,6 @@ static void test_TransmitFile(void) +@@ -8053,7 +8053,6 @@ static void test_TransmitFile(void) err, WSAENOTSOCK); /* Test TransmitFile with a UDP datagram socket */ @@ -67,10 +67,10 @@ index cf9adf5..2feb224 100644 #define FD_WINE_NONBLOCKING 0x20000000 #define FD_WINE_CONNECTED 0x40000000 diff --git a/server/protocol.def b/server/protocol.def -index 04814c9..8a2d395 100644 +index a5a45eb..592fbe2 100644 --- a/server/protocol.def +++ b/server/protocol.def -@@ -1263,6 +1263,12 @@ enum server_fd_type +@@ -1260,6 +1260,12 @@ enum server_fd_type @END @@ -84,7 +84,7 @@ index 04814c9..8a2d395 100644 @REQ(set_socket_event) obj_handle_t handle; /* handle to the socket */ diff --git a/server/sock.c b/server/sock.c -index 57d3d93..37c78b1 100644 +index a11964f..26f1c72 100644 --- a/server/sock.c +++ b/server/sock.c @@ -86,6 +86,7 @@ @@ -103,8 +103,8 @@ index 57d3d93..37c78b1 100644 static int sock_get_ntstatus( int err ); static int sock_get_error( int err ); -@@ -155,7 +157,7 @@ static const struct object_ops sock_ops = - no_lookup_name, /* lookup_name */ +@@ -157,7 +159,7 @@ static const struct object_ops sock_ops = + NULL, /* unlink_name */ no_open_file, /* open_file */ no_alloc_handle, /* alloc_handle */ - fd_close_handle, /* close_handle */ @@ -112,7 +112,7 @@ index 57d3d93..37c78b1 100644 sock_destroy /* destroy */ }; -@@ -627,6 +629,47 @@ static struct fd *sock_get_fd( struct object *obj ) +@@ -629,6 +631,47 @@ static struct fd *sock_get_fd( struct object *obj ) return (struct fd *)grab_object( sock->fd ); } @@ -160,7 +160,7 @@ index 57d3d93..37c78b1 100644 static void sock_destroy( struct object *obj ) { struct sock *sock = (struct sock *)obj; -@@ -678,15 +721,8 @@ static struct object *create_socket( int family, int type, int protocol, unsigne +@@ -680,15 +723,8 @@ static struct object *create_socket( int family, int type, int protocol, unsigne struct sock *sock; int sockfd; @@ -177,7 +177,7 @@ index 57d3d93..37c78b1 100644 if (!(sock = alloc_object( &sock_ops ))) { close( sockfd ); -@@ -1263,6 +1299,17 @@ DECL_HANDLER(accept_into_socket) +@@ -1267,6 +1303,17 @@ DECL_HANDLER(accept_into_socket) release_object( sock ); } @@ -196,5 +196,5 @@ index 57d3d93..37c78b1 100644 DECL_HANDLER(set_socket_event) { -- -2.6.2 +2.7.0