mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-19 03:33:56 +00:00
Prepare token support
This commit is contained in:
@@ -1674,9 +1674,31 @@ namespace
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
NTSTATUS handle_NtQueryInformationToken()
|
||||
NTSTATUS handle_NtQueryInformationToken(const syscall_context& c, const uint64_t token_handle,
|
||||
const TOKEN_INFORMATION_CLASS token_information_class,
|
||||
const uint64_t token_information, const ULONG token_information_length,
|
||||
const emulator_object<ULONG> return_length)
|
||||
{
|
||||
//puts("NtQueryInformationToken not supported");
|
||||
if (token_handle != ~3ULL)
|
||||
{
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
if (token_information_class == TokenIsAppContainer)
|
||||
{
|
||||
constexpr auto required_size = sizeof(ULONG);
|
||||
return_length.write(required_size);
|
||||
|
||||
if (required_size > token_information_length)
|
||||
{
|
||||
return STATUS_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
||||
emulator_object<ULONG>{c.emu, token_information}.write(0);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
printf("Unsupported token info class: %X\n", token_information_class);
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
@@ -2072,6 +2094,11 @@ namespace
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
NTSTATUS handle_NtAccessCheck()
|
||||
{
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
NTSTATUS handle_NtRaiseHardError(const syscall_context& c, const NTSTATUS error_status,
|
||||
const ULONG /*number_of_parameters*/,
|
||||
const emulator_object<UNICODE_STRING> /*unicode_string_parameter_mask*/,
|
||||
@@ -2478,6 +2505,7 @@ void syscall_dispatcher::add_handlers(std::map<std::string, syscall_handler>& ha
|
||||
add_handler(NtQueryValueKey);
|
||||
add_handler(NtQueryKey);
|
||||
add_handler(NtGetNlsSectionPtr);
|
||||
add_handler(NtAccessCheck);
|
||||
|
||||
#undef add_handler
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user