Skip to content

Commit

Permalink
Dummy user info
Browse files Browse the repository at this point in the history
  • Loading branch information
momo5502 committed Nov 3, 2024
1 parent 3a26b3a commit 6937827
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/windows-emulator/syscalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1689,7 +1689,29 @@ namespace

if (token_information_class == TokenUser)
{
return STATUS_NOT_SUPPORTED;
const uint8_t sid[] =
{
0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
0x05, 0x15, 0x00, 0x00, 0x00, 0x84, 0x94,
0xD4, 0x04, 0x4B, 0x68, 0x42, 0x34, 0x23,
0xBE, 0x69, 0x4E, 0xE9, 0x03, 0x00, 0x00,
};

constexpr auto required_size = sizeof(sid) + 0x10;
return_length.write(required_size);

if (required_size > token_information_length)
{
return STATUS_BUFFER_TOO_SMALL;
}

TOKEN_USER user{};
user.User.Attributes = 0;
user.User.Sid = reinterpret_cast<void*>(token_information + 0x10);

emulator_object<TOKEN_USER>{c.emu, token_information}.write(user);
c.emu.write_memory(token_information + 0x10, sid, sizeof(sid));
return STATUS_SUCCESS;
}

if (token_information_class == TokenIsAppContainer)
Expand Down

0 comments on commit 6937827

Please sign in to comment.