Module: wine Branch: master Commit: 33a80885ce72793476eaab1f3f5f16083b3ccaa8 URL: https://source.winehq.org/git/wine.git/?a=commit;h=33a80885ce72793476eaab1f3...
Author: Zebediah Figura z.figura12@gmail.com Date: Wed Feb 17 22:59:17 2021 -0600
ntdll: Fill the object type index in System(Extended)HandleInformation.
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/unix/system.c | 6 ++++-- include/wine/server_protocol.h | 3 ++- server/handle.c | 1 + server/protocol.def | 1 + server/trace.c | 4 ++-- 5 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c index f4a879d8748..6cf044d496f 100644 --- a/dlls/ntdll/unix/system.c +++ b/dlls/ntdll/unix/system.c @@ -2447,7 +2447,8 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class, shi->Handle[i].HandleValue = handle_info[i].handle; shi->Handle[i].AccessMask = handle_info[i].access; shi->Handle[i].HandleFlags = handle_info[i].attributes; - /* FIXME: Fill out ObjectType, ObjectPointer */ + shi->Handle[i].ObjectType = handle_info[i].type; + /* FIXME: Fill out ObjectPointer */ } } else if (ret == STATUS_BUFFER_TOO_SMALL) @@ -2498,7 +2499,8 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class, shi->Handles[i].HandleValue = handle_info[i].handle; shi->Handles[i].GrantedAccess = handle_info[i].access; shi->Handles[i].HandleAttributes = handle_info[i].attributes; - /* FIXME: Fill out Object, ObjectTypeIndex */ + shi->Handles[i].ObjectTypeIndex = handle_info[i].type; + /* FIXME: Fill out Object */ } } else if (ret == STATUS_BUFFER_TOO_SMALL) diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 5e463fd5c9e..18551a2d448 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -4544,6 +4544,7 @@ struct handle_info obj_handle_t handle; unsigned int access; unsigned int attributes; + unsigned int type; };
@@ -6227,7 +6228,7 @@ union generic_reply
/* ### protocol_version begin ### */
-#define SERVER_PROTOCOL_VERSION 683 +#define SERVER_PROTOCOL_VERSION 684
/* ### protocol_version end ### */
diff --git a/server/handle.c b/server/handle.c index 4291761ec6c..6e0848eedf0 100644 --- a/server/handle.c +++ b/server/handle.c @@ -833,6 +833,7 @@ static int enum_handles( struct process *process, void *user ) handle->owner = process->id; handle->handle = index_to_handle(i); handle->access = entry->access & ~RESERVED_ALL; + handle->type = entry->ptr->ops->type->index; handle->attributes = 0; if (entry->access & RESERVED_INHERIT) handle->attributes |= OBJ_INHERIT; if (entry->access & RESERVED_CLOSE_PROTECT) handle->attributes |= OBJ_PROTECT_CLOSE; diff --git a/server/protocol.def b/server/protocol.def index 5126a9e37e5..7f3b785df51 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -3198,6 +3198,7 @@ struct handle_info obj_handle_t handle; unsigned int access; unsigned int attributes; + unsigned int type; };
/* Return a list of all opened handles */ diff --git a/server/trace.c b/server/trace.c index 9faa3d5a443..b07935cc54b 100644 --- a/server/trace.c +++ b/server/trace.c @@ -1342,8 +1342,8 @@ static void dump_varargs_handle_infos( const char *prefix, data_size_t size ) while (size >= sizeof(*handle)) { handle = cur_data; - fprintf( stderr, "{owner=%04x,handle=%04x,access=%08x,attributes=%08x}", - handle->owner, handle->handle, handle->access, handle->attributes ); + fprintf( stderr, "{owner=%04x,handle=%04x,access=%08x,attributes=%08x,type=%u}", + handle->owner, handle->handle, handle->access, handle->attributes, handle->type ); size -= sizeof(*handle); remove_data( sizeof(*handle) ); if (size) fputc( ',', stderr );