From 690f314302bd4de2cb70e27c47cf4da47df6ef2d Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sun, 3 Nov 2024 19:38:14 +0100 Subject: [PATCH] More token support --- src/windows-emulator/syscalls.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/windows-emulator/syscalls.cpp b/src/windows-emulator/syscalls.cpp index e59c7fb0..e01e1a1f 100644 --- a/src/windows-emulator/syscalls.cpp +++ b/src/windows-emulator/syscalls.cpp @@ -1679,7 +1679,15 @@ namespace const uint64_t token_information, const ULONG token_information_length, const emulator_object return_length) { - if (token_handle != ~3ULL) + if (token_handle != ~3ULL // NtCurrentProcessToken + && token_handle != ~4ULL // NtCurrentThreadToken + && token_handle != ~5ULL // NtCurrentThreadEffectiveToken + ) + { + return STATUS_NOT_SUPPORTED; + } + + if (token_information_class == TokenUser) { return STATUS_NOT_SUPPORTED; } @@ -1698,7 +1706,8 @@ namespace return STATUS_SUCCESS; } - printf("Unsupported token info class: %X\n", token_information_class); + printf("Unsupported token info class: %lX\n", token_information_class); + c.emu.stop(); return STATUS_NOT_SUPPORTED; }