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>
This commit is contained in:
Zebediah Figura 2021-02-17 22:59:17 -06:00 committed by Alexandre Julliard
parent 1f1d4da5f6
commit 33a80885ce
5 changed files with 10 additions and 5 deletions

View File

@ -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)

View File

@ -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 ### */

View File

@ -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;

View File

@ -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 */

View File

@ -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 );