mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-20 04:03:57 +00:00
Add token classes
This commit is contained in:
@@ -1821,6 +1821,36 @@ namespace
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (token_information_class == TokenUIAccess)
|
||||
{
|
||||
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(1);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (token_information_class == TokenElevation)
|
||||
{
|
||||
constexpr auto required_size = sizeof(TOKEN_ELEVATION);
|
||||
return_length.write(required_size);
|
||||
|
||||
if (required_size > token_information_length)
|
||||
{
|
||||
return STATUS_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
||||
c.emu.write_memory(token_information, TOKEN_ELEVATION{
|
||||
.TokenIsElevated = 0,
|
||||
});
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (token_information_class == TokenIsAppContainer)
|
||||
{
|
||||
constexpr auto required_size = sizeof(ULONG);
|
||||
@@ -1835,6 +1865,24 @@ namespace
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (token_information_class == TokenSecurityAttributes)
|
||||
{
|
||||
constexpr auto required_size = sizeof(TOKEN_SECURITY_ATTRIBUTES_INFORMATION);
|
||||
return_length.write(required_size);
|
||||
|
||||
if (required_size > token_information_length)
|
||||
{
|
||||
return STATUS_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
||||
c.emu.write_memory(token_information, TOKEN_SECURITY_ATTRIBUTES_INFORMATION{
|
||||
.Version = 0,
|
||||
.AttributeCount = 0,
|
||||
});
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
printf("Unsupported token info class: %lX\n", token_information_class);
|
||||
c.emu.stop();
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
|
||||
Reference in New Issue
Block a user